diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/corelib/gfx_constants.pas | 15 | ||||
-rw-r--r-- | src/corelib/lang_afrikaans.inc | 2 | ||||
-rw-r--r-- | src/corelib/lang_english.inc | 2 | ||||
-rw-r--r-- | src/corelib/lang_french.inc | 2 | ||||
-rw-r--r-- | src/corelib/lang_german.inc | 10 | ||||
-rw-r--r-- | src/corelib/lang_portuguese.inc | 3 | ||||
-rw-r--r-- | src/corelib/lang_russian.inc | 2 | ||||
-rw-r--r-- | src/gui/gui_dialogs.pas | 50 |
8 files changed, 61 insertions, 25 deletions
diff --git a/src/corelib/gfx_constants.pas b/src/corelib/gfx_constants.pas index e723f674..a4d82de8 100644 --- a/src/corelib/gfx_constants.pas +++ b/src/corelib/gfx_constants.pas @@ -14,24 +14,33 @@ interface resourcestring -{ Define Compiler language symbol (eg: gr for German) to include the correct +{ Define Compiler language symbol (eg: de for German) to include the correct language resource file otherwise the Default (English) resource file will be used. } -{.$DEFINE gr} // German +{.$DEFINE de} // German {.$DEFINE ru} // Russian {.$DEFINE fr} // French {.$DEFINE pt} // Portuguese +{.$DEFINE za} // Afrikaans -{$IF defined(gr)} + +{$IF defined(de)} {$I lang_german.inc} + {$ELSEIF defined(ru)} {$I lang_russian.inc} + {$ELSEIF defined(fr)} {$I lang_french.inc} + {$ELSEIF defined(pt)} {$I lang_portuguese.inc} + +{$ELSEIF defined(za)} + {$I lang_afrikaans.inc} + {$ELSE} {$I lang_english.inc} {$IFEND} diff --git a/src/corelib/lang_afrikaans.inc b/src/corelib/lang_afrikaans.inc index 96f3badd..c1fde87d 100644 --- a/src/corelib/lang_afrikaans.inc +++ b/src/corelib/lang_afrikaans.inc @@ -27,6 +27,8 @@ rsInsert = 'Insert'; rsEdit = 'Edit'; rsDelete = 'Delete'; rsExit = 'Exit'; +rsYesToAll = 'Yes to All'; +rsNoToAll = 'No to All'; // Captions diff --git a/src/corelib/lang_english.inc b/src/corelib/lang_english.inc index b080ee2d..f2098cc2 100644 --- a/src/corelib/lang_english.inc +++ b/src/corelib/lang_english.inc @@ -27,6 +27,8 @@ rsInsert = 'Insert'; rsEdit = 'Edit'; rsDelete = 'Delete'; rsExit = 'Exit'; +rsYesToAll = 'Yes to All'; +rsNoToAll = 'No to All'; // Captions diff --git a/src/corelib/lang_french.inc b/src/corelib/lang_french.inc index 0a934eb6..fa802f90 100644 --- a/src/corelib/lang_french.inc +++ b/src/corelib/lang_french.inc @@ -27,6 +27,8 @@ rsInsert = 'Insert'; rsEdit = 'Edit'; rsDelete = 'Delete'; rsExit = 'Exit'; +rsYesToAll = 'Yes to All'; +rsNoToAll = 'No to All'; // Captions diff --git a/src/corelib/lang_german.inc b/src/corelib/lang_german.inc index 1be28722..6a9c4e59 100644 --- a/src/corelib/lang_german.inc +++ b/src/corelib/lang_german.inc @@ -27,13 +27,15 @@ rsInsert = 'Einfgen'; rsEdit = 'Bearbeiten'; rsDelete = 'Lschen'; rsExit = 'Exit'; +rsYesToAll = 'Yes to All'; +rsNoToAll = 'No to All'; // Captions rsError = 'Fehler'; rsCriticalError = 'Schwerer Fehler'; rsInformation = 'Information'; -rsConfirmation = 'Besttigen'; +rsConfirmation = 'Bestätigen'; rsWarning = 'Warnung'; rsMessage = 'Nachricht'; @@ -49,10 +51,10 @@ rsCannotCreateDir = 'Verzeichnis kann nicht erzeugt werden'; // Font Dialog -rsSelectAFont = 'Zeichensatz auswhlen'; +rsSelectAFont = 'Wählen Sie eine Schriftart'; rsName = 'Name'; rsCollection = 'Collection'; -rsSize = 'Gráe'; +rsSize = 'Größe'; rsStyle = 'Stil'; rsItalic = 'Kursiv'; rsBold = 'Fett'; @@ -61,7 +63,7 @@ rsExampleText = 'Beispieltext'; // Open Dialog -rsOpenAFile = 'Datei ffnen'; +rsOpenAFile = 'Öffnen einer Datei'; rsFileName = 'Dateiname'; rsFileType = 'Dateityp'; rsDrive = 'Laufwerk'; diff --git a/src/corelib/lang_portuguese.inc b/src/corelib/lang_portuguese.inc index d86e9079..5410c866 100644 --- a/src/corelib/lang_portuguese.inc +++ b/src/corelib/lang_portuguese.inc @@ -27,6 +27,9 @@ rsInsert = 'Insert'; rsEdit = 'Edit'; rsDelete = 'Delete'; rsExit = 'Exit'; +rsYesToAll = 'Yes to All'; +rsNoToAll = 'No to All'; + // Captions diff --git a/src/corelib/lang_russian.inc b/src/corelib/lang_russian.inc index 0637a107..3881b9b3 100644 --- a/src/corelib/lang_russian.inc +++ b/src/corelib/lang_russian.inc @@ -27,6 +27,8 @@ rsInsert = 'Insert'; rsEdit = 'Edit'; rsDelete = 'Delete'; rsExit = 'Exit'; +rsYesToAll = 'Yes to All'; +rsNoToAll = 'No to All'; // Captions diff --git a/src/gui/gui_dialogs.pas b/src/gui/gui_dialogs.pas index e830809e..abe41396 100644 --- a/src/gui/gui_dialogs.pas +++ b/src/gui/gui_dialogs.pas @@ -1,7 +1,7 @@ { fpGUI - Free Pascal GUI Library - Copyright (C) 2006 - 2007 See the file AUTHORS.txt, included in this + Copyright (C) 2006 - 2008 See the file AUTHORS.txt, included in this distribution, for details of the copyright. See the file COPYING.modifiedLGPL, included in this distribution, @@ -36,6 +36,7 @@ uses gfxbase, fpgfx, gfx_imgfmt_bmp, + gfx_constants, gui_form, gui_button, gui_label, @@ -62,10 +63,9 @@ const mbAbortRetryIgnore = [mbAbort, mbRetry, mbIgnore]; - { todo: Somehow we need to localize this } cMsgDlgBtnText: array[TfpgMsgDlgBtn] of string = - ( '', 'OK', 'Cancel', 'Yes', 'No', 'Abort', 'Retry', 'Ignore', - 'Yes to All', 'No to All', 'Help', 'Close' ); + ( '', rsOK, rsCancel, rsYes, rsNo, rsAbort, rsRetry, rsIgnore, + rsYesToAll, rsNoToAll, rsHelp, rsClose ); type @@ -99,6 +99,7 @@ type procedure btnOKClick(Sender: TObject); virtual; procedure btnCancelClick(Sender: TObject); virtual; procedure HandleKeyPress(var keycode: word; var shiftstate: TShiftState; var consumed: boolean); override; + procedure SetupCaptions; virtual; public constructor Create(AOwner: TComponent); override; end; @@ -125,6 +126,7 @@ type protected function GetFontDesc: string; procedure SetFontDesc(Desc: string); + procedure SetupCaptions; override; public constructor Create(AOwner: TComponent); override; procedure SetSampleText(AText: string); @@ -306,7 +308,7 @@ end; procedure ShowMessage(AMessage: string; ACentreText: Boolean); begin - ShowMessage(AMessage, 'Message', ACentreText); + ShowMessage(AMessage, rsMessage, ACentreText); end; function SelectFontDialog(var FontDesc: string): boolean; @@ -378,7 +380,7 @@ begin FCentreText := False; FButton := TfpgButton.Create(self); - FButton.Text := cMsgDlgBtnText[mbOK]; // We must localize this + FButton.Text := cMsgDlgBtnText[mbOK]; FButton.Width := 75; FButton.ModalResult := Ord(mbOK); end; @@ -432,6 +434,12 @@ begin inherited HandleKeyPress(keycode, shiftstate, consumed); end; +procedure TfpgBaseDialog.SetupCaptions; +begin + btnCancel.Text := rsCancel; + btnOK.Text := rsOK; +end; + constructor TfpgBaseDialog.Create(AOwner: TComponent); begin inherited Create(AOwner); @@ -444,13 +452,13 @@ begin FSpacing := 6; FDefaultButtonWidth := 80; - btnCancel := CreateButton(self, Width-FDefaultButtonWidth-FSpacing, 370, FDefaultButtonWidth, 'Cancel', @btnCancelClick); + btnCancel := CreateButton(self, Width-FDefaultButtonWidth-FSpacing, 370, FDefaultButtonWidth, rsCancel, @btnCancelClick); btnCancel.Name := 'btnCancel'; btnCancel.ImageName := 'stdimg.Cancel'; btnCancel.ShowImage := True; btnCancel.Anchors := [anRight, anBottom]; - btnOK := CreateButton(self, btnCancel.Left-FDefaultButtonWidth-FSpacing, 370, FDefaultButtonWidth, 'OK', @btnOKClick); + btnOK := CreateButton(self, btnCancel.Left-FDefaultButtonWidth-FSpacing, 370, FDefaultButtonWidth, rsOK, @btnOKClick); btnOK.Name := 'btnOK'; btnOK.ImageName := 'stdimg.OK'; btnOK.ShowImage := True; @@ -594,11 +602,16 @@ begin OnParamChange(self); end; +procedure TfpgFontSelectDialog.SetupCaptions; +begin + inherited SetupCaptions; +end; + constructor TfpgFontSelectDialog.Create(AOwner: TComponent); begin inherited Create(AOwner); {TODO: We need to localize this dialog } - WindowTitle := 'Select Font...'; + WindowTitle := rsSelectAFont; Width := 600; MinWidth := Width; MinHeight := Height; @@ -611,10 +624,11 @@ begin with lblLabel5 do begin SetPosition(8, 8, 73, 16); - Text := 'Collection:'; + Text := rsCollection + ':'; end; - {TODO: This need to be implemented at some stage. } + { TODO : This need to be implemented at some stage. } + { TODO : This needs to be localized. } lbCollection := TfpgListBox.Create(self); with lbCollection do begin @@ -637,7 +651,7 @@ begin with lblLabel1 do begin SetPosition(161, 8, 73, 16); - Text := 'Font:'; + Text := rsName + ':'; end; lbFaces := TfpgListBox.Create(self); @@ -652,7 +666,7 @@ begin with lblLabel3 do begin SetPosition(401, 8, 54, 16); - Text := 'Size:'; + Text := rsSize + ':'; end; lbSize := TfpgListBox.Create(self); @@ -687,14 +701,14 @@ begin with lblLabel2 do begin SetPosition(461, 8, 54, 16); - Text := 'Typeface:'; + Text := 'Typeface:'; { TODO : Localize this } end; cbBold := TfpgCheckBox.Create(self); with cbBold do begin SetPosition(461, 32, 87, 20); - Text := 'Bold'; + Text := rsBold; OnChange := @OnParamChange; end; @@ -702,7 +716,7 @@ begin with cbItalic do begin SetPosition(461, 56, 87, 20); - Text := 'Italic'; + Text := rsItalic; OnChange := @OnParamChange; end; @@ -726,8 +740,8 @@ begin lblLabel4 := TfpgLabel.Create(self); with lblLabel4 do begin - SetPosition(8, 268, 55, 16); - Text := 'Sample:'; + SetPosition(8, 268, 584, 16); + Text := rsExampleText + ':'; end; edSample := TfpgEdit.Create(self); |