From 7c809200754d707f440ec45686692db405da8ae1 Mon Sep 17 00:00:00 2001 From: whiteshark0 Date: Sat, 24 Mar 2007 12:23:00 +0000 Subject: Fixed Bug: Not translating Texts reading Theme.Ini Compiler doesn't define CompilerConst Translate correctly. Fixed by Commenting IFDEF Operations out git-svn-id: svn://svn.code.sf.net/p/ultrastardx/svn/trunk@21 b956fd51-792f-4845-bead-9b4dfca2ff2c --- Game/Code/Classes/UThemes.pas | 26 +++++++++++++------------- Game/Code/Screens/UScreenScore.pas | 10 +++++----- Game/Code/UltraStar.dpr | 2 +- 3 files changed, 19 insertions(+), 19 deletions(-) (limited to 'Game/Code') diff --git a/Game/Code/Classes/UThemes.pas b/Game/Code/Classes/UThemes.pas index c4b83d8b..7dbac5a9 100644 --- a/Game/Code/Classes/UThemes.pas +++ b/Game/Code/Classes/UThemes.pas @@ -3,9 +3,6 @@ unit UThemes; interface uses -{$IFDEF TRANSLATE} - ULanguage, -{$ENDIF} IniFiles, SysUtils, Classes; type @@ -580,6 +577,9 @@ var implementation uses +{{$IFDEF TRANSLATE} + ULanguage, +{{$ENDIF} USkins, UIni; constructor TTheme.Create(FileName: string); @@ -716,7 +716,7 @@ begin //Score Text Translation Start - {$IFDEF TRANSLATE} + {{$IFDEF TRANSLATE} Main.Description[0] := Language.Translate('SING_SING'); Main.DescriptionLong[0] := Language.Translate('SING_SING_DESC'); Main.Description[1] := Language.Translate('SING_EDITOR'); @@ -725,7 +725,7 @@ begin Main.DescriptionLong[2] := Language.Translate('SING_GAME_OPTIONS_DESC'); Main.Description[3] := Language.Translate('SING_EXIT'); Main.DescriptionLong[3] := Language.Translate('SING_EXIT_DESC'); - {$ENDIF} + {{$ENDIF} //Score Text Translation End @@ -910,7 +910,7 @@ begin ThemeLoadButton(Options.ButtonRecord, 'OptionsButtonRecord'); ThemeLoadButton(Options.ButtonExit, 'OptionsButtonExit'); - {$IFDEF TRANSLATE} + {{$IFDEF TRANSLATE} Options.Description[0] := Language.Translate('SING_OPTIONS_GAME'); Options.Description[1] := Language.Translate('SING_OPTIONS_GRAPHICS'); Options.Description[2] := Language.Translate('SING_OPTIONS_SOUND'); @@ -918,7 +918,7 @@ begin Options.Description[4] := Language.Translate('SING_OPTIONS_THEMES'); Options.Description[5] := Language.Translate('SING_OPTIONS_RECORD'); Options.Description[6] := Language.Translate('SING_OPTIONS_EXIT'); - {$ENDIF} + {{$ENDIF} ThemeLoadText(Options.TextDescription, 'OptionsTextDescription'); Options.TextDescription.Text := Options.Description[0]; @@ -1137,9 +1137,9 @@ begin ThemeText.Size := ThemeIni.ReadInteger(Name, 'Size', 0); ThemeText.Align := ThemeIni.ReadInteger(Name, 'Align', 0); - {$IFDEF TRANSLATE} + {{$IFDEF TRANSLATE} ThemeText.Text := Language.Translate(ThemeIni.ReadString(Name, 'Text', '')); - {$ELSE} + {{$ELSE}{ ThemeText.Text := ThemeIni.ReadString(Name, 'Text', ''); {$ENDIF} @@ -1268,9 +1268,9 @@ var begin DecimalSeparator := '.'; - {$IFDEF TRANSLATE} + {{$IFDEF TRANSLATE} ThemeSelect.Text := Language.Translate(ThemeIni.ReadString(Name, 'Text', '')); - {$ELSE} + {{$ELSE}{ ThemeSelect.Text := ThemeIni.ReadString(Name, 'Text', ''); {$ENDIF} @@ -1314,9 +1314,9 @@ var begin DecimalSeparator := '.'; - {$IFDEF TRANSLATE} + {{$IFDEF TRANSLATE} ThemeSelectS.Text := Language.Translate(ThemeIni.ReadString(Name, 'Text', '')); - {$ELSE} + {{$ELSE}{ ThemeSelectS.Text := ThemeIni.ReadString(Name, 'Text', ''); {$ENDIF} diff --git a/Game/Code/Screens/UScreenScore.pas b/Game/Code/Screens/UScreenScore.pas index 2e509a6f..eb92a3d2 100644 --- a/Game/Code/Screens/UScreenScore.pas +++ b/Game/Code/Screens/UScreenScore.pas @@ -45,11 +45,11 @@ type implementation -{$IFDEF TRANSLATE} +{{$IFDEF TRANSLATE} uses UGraphic, UScreenSong, UMenuStatic, UTime, UMain, UIni, ULanguage; -{$ELSE} +{{$ELSE}{ uses UGraphic, UScreenSong, UMenuStatic, UTime, UMain, UIni; -{$ENDIF} +{{$ENDIF} function TScreenScore.ParseInput(PressedKey: Cardinal; ScanCode: byte; PressedDown: Boolean): Boolean; begin Result := true; @@ -291,7 +291,7 @@ begin Text[TextName[PP]].Text := Ini.Name[P]; - {$IFDEF TRANSLATE} + {{$IFDEF TRANSLATE} case (Player[P].ScoreTotalI) of 0..2000: Text[TextScore[PP]].Text := Language.Translate('SING_SCORE_TONE_DEAF'); 2010..4000: Text[TextScore[PP]].Text := Language.Translate('SING_SCORE_AMATEUR'); @@ -301,7 +301,7 @@ begin 9010..9800: Text[TextScore[PP]].Text := Language.Translate('SING_SCORE_SUPERSTAR'); 9810..10000: Text[TextScore[PP]].Text := Language.Translate('SING_SCORE_ULTRASTAR'); end; - {$ELSE} + {{$ELSE}{ case (Player[P].ScoreTotalI) of 0..2000: Text[TextScore[PP]].Text := 'Tone Deaf'; 2010..4000: Text[TextScore[PP]].Text := 'Amateur'; diff --git a/Game/Code/UltraStar.dpr b/Game/Code/UltraStar.dpr index 408405f8..9b73883a 100644 --- a/Game/Code/UltraStar.dpr +++ b/Game/Code/UltraStar.dpr @@ -1,4 +1,4 @@ - program UltraStar; +program UltraStar; {$DEFINE TRANSLATE} //DEFINE THEMESAVE} -- cgit v1.2.3