diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-03-04 13:38:17 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-03-04 13:38:17 +0000 |
commit | b9a8fee7794d03513a6d8b7bfb3f77df811582da (patch) | |
tree | 4d3967e00bc835e79b48e6688d186b913ed98ec5 | |
parent | cfbb1096706f6234cf8ac8fb0feefaae8b881ba9 (diff) | |
download | fpGUI-b9a8fee7794d03513a6d8b7bfb3f77df811582da.tar.xz |
* More more on the MiG Layout port.
* Added new resourcestring constants to the translation language files.
* Localized all the GUI units.
29 files changed, 493 insertions, 118 deletions
diff --git a/prototypes/miglayout/gui_mig_lc.pas b/prototypes/miglayout/gui_mig_lc.pas index 49316592..1b787268 100644 --- a/prototypes/miglayout/gui_mig_lc.pas +++ b/prototypes/miglayout/gui_mig_lc.pas @@ -27,9 +27,12 @@ type FNoCache: Boolean; FAlignX: TUnitValue; FAlignY: TUnitValue; + FInsets: TUnitValueArray; FLeftToRight: Boolean; FTopToBottom: Boolean; + function GetInsets: TUnitValueArray; procedure SetHideMode(const AValue: integer); + procedure SetInsets(const AValue: TUnitValueArray); public constructor Create; property NoCache: Boolean read FNoCache write FNoCache default False; @@ -42,6 +45,7 @@ type property GridGapX: TBoundSize read FGridGapX write FGridGapX; property GridGapY: TBoundSize read FGridGapY write FGridGapY; property HideMode: integer read FHideMode write SetHideMode; + property Insets: TUnitValueArray read GetInsets write SetInsets; property LeftToRight: Boolean read FLeftToRight write FLeftToRight; property TopToBottom: Boolean read FTopToBottom write FTopToBottom; end; @@ -61,6 +65,16 @@ begin FHideMode:=AValue; end; +function TLC.GetInsets: TUnitValueArray; +begin + +end; + +procedure TLC.SetInsets(const AValue: TUnitValueArray); +begin + +end; + constructor TLC.Create; begin FNoCache := False; diff --git a/prototypes/miglayout/gui_mig_unitvalue.pas b/prototypes/miglayout/gui_mig_unitvalue.pas index 44925357..ef98936a 100644 --- a/prototypes/miglayout/gui_mig_unitvalue.pas +++ b/prototypes/miglayout/gui_mig_unitvalue.pas @@ -15,6 +15,8 @@ type public property Pixels: integer read FPixels; end; + + TUnitValueArray = array[0..3] of TUnitValue; implementation diff --git a/src/corelib/gfx_constants.pas b/src/corelib/gfx_constants.pas index 79c0e798..e1b8d7b4 100644 --- a/src/corelib/gfx_constants.pas +++ b/src/corelib/gfx_constants.pas @@ -1,10 +1,12 @@ { Constants used throughout fpGUI will be defined here. This includes - language constants for localization. For now, localization is very simplistic - and done at compile time. At a later date we can autodetect and autoselect - the correct language resource at runtime. + language constants for localization. - GetText might also be a better option. + You only need to changes these defines if you want the default fpGUI language + to be something other than English. + + Soon the lang_*.inc files will be auto generated from the actual *.po files. + At which point only the .po files need to be maintained. } unit gfx_constants; @@ -12,6 +14,9 @@ unit gfx_constants; interface +uses + gfxbase; + resourcestring { Define Compiler language symbol (eg: de for German) to include the correct @@ -54,7 +59,19 @@ resourcestring {$IFEND} +{ This is so that when we support LTR and RTL languages, the colon will be + added at the correct place. } +function fpgAddColon(const AText: TfpgString): TfpgString; + + implementation + +function fpgAddColon(const AText: TfpgString): TfpgString; +begin + { TODO : Check language direction and add colon at appropriate end. } + result := AText + ':'; +end; + end. diff --git a/src/corelib/gfx_stringhashlist.pas b/src/corelib/gfx_stringhashlist.pas index 1c5d2724..1fb9521d 100644 --- a/src/corelib/gfx_stringhashlist.pas +++ b/src/corelib/gfx_stringhashlist.pas @@ -310,7 +310,7 @@ begin begin if Count > 0 then begin - raise EListError.Create(rsListMustBeEmpty); + raise EListError.Create(rsErrListMustBeEmpty); exit; end; fCaseSensitive := Value; diff --git a/src/corelib/gfx_widget.pas b/src/corelib/gfx_widget.pas index 026e9b81..5122af1c 100644 --- a/src/corelib/gfx_widget.pas +++ b/src/corelib/gfx_widget.pas @@ -781,9 +781,9 @@ begin Result := nil; FoundIt := False; if direction in [fsdLast, fsdPrev] then - lasttaborder := -999999 + lasttaborder := Low(integer) else - lasttaborder := 999999; + lasttaborder := High(integer); for n := 0 to ComponentCount - 1 do if Components[n] is TfpgWidget then diff --git a/src/corelib/lang_afrikaans.inc b/src/corelib/lang_afrikaans.inc index fe7d3a1f..557b361c 100644 --- a/src/corelib/lang_afrikaans.inc +++ b/src/corelib/lang_afrikaans.inc @@ -29,6 +29,9 @@ rsDelete = 'Skrap'; rsExit = 'Staak'; rsYesToAll = 'Ja vir Alles'; rsNoToAll = 'Nee vir Alles'; +rsCut = 'Cut'; +rsCopy = 'Copy'; +rsPaste = 'Paste'; // Captions @@ -38,6 +41,7 @@ rsInformation = 'Informasie'; rsConfirmation = 'Bevestiging'; rsWarning = 'Waarskuwing'; rsMessage = 'Boodskap'; +rsAbout = 'About %s'; // Standard file filters @@ -59,7 +63,16 @@ rsStyle = 'Steil'; rsItalic = 'Kursief'; rsBold = 'Vetdruk'; rsUnderScore = 'Onderstreep'; +rsTypeface = 'Typeface'; +rsAntiAliasing = 'Anti aliasing'; rsExampleText = 'Teks Voorbeeld'; +rsCollectionAllFonts = 'All Fonts'; +rsCollectionRecentlyUsed = 'Recently Used'; +rsCollectionFavourites = 'Favourites'; +rsCollectionFixedWidth = 'Fixed Width'; +rsCollectionSans = 'Sans'; +rsCollectionSerif = 'Serif'; +rsCollectionFontAliases = 'Font Aliases'; // Open Dialog @@ -70,11 +83,41 @@ rsDrive = 'Dryf'; rsFiles = 'Lers'; rsDirectories = 'Lêergidse'; rsShowHidden = 'Wys verseekte lêers'; +rsFileSelection = 'File Selection'; +rsFileModifiedTime = 'Mod. Time'; +rsFileAttributes = 'Attributes'; +rsFileRights = 'Rights'; +rsFileOwner = 'Owner'; +rsFileGroup = 'Group'; // Save Dialog rsSaveAFile = 'Stoor ''n ler'; + // Error messages -rsListMustBeEmpty = 'Lys moet leeg wees'; +rsErrListMustBeEmpty = 'Lys moet leeg wees'; +rsErrCouldNotOpenDir = 'Could not open the directory <%s>'; +rsErrItemOfWrongType = 'Item is not of <%s> type!'; +rsErrFailedToCreateDir = 'Failed to create the directory <%s>'; +rsErrNotAssigned = '<%s> not assigned'; + + +// Calendar Combo & Dialog +rsShortMon = 'Mon'; +rsShortTue = 'Tue'; +rsShortWed = 'Wed'; +rsShortThu = 'Thu'; +rsShortFri = 'Fri'; +rsShortSat = 'Sat'; +rsShortSun = 'Sun'; +rsLongMon = 'Monday'; +rsLongTue = 'Tuesday'; +rsLongWed = 'Wednesday'; +rsLongThu = 'Thursday'; +rsLongFri = 'Friday'; +rsLongSat = 'Saturday'; +rsLongSun = 'Sunday'; + + diff --git a/src/corelib/lang_english.inc b/src/corelib/lang_english.inc index 291f66fd..d2b3ea77 100644 --- a/src/corelib/lang_english.inc +++ b/src/corelib/lang_english.inc @@ -29,6 +29,9 @@ rsDelete = 'Delete'; rsExit = 'Exit'; rsYesToAll = 'Yes to All'; rsNoToAll = 'No to All'; +rsCut = 'Cut'; +rsCopy = 'Copy'; +rsPaste = 'Paste'; // Captions @@ -38,6 +41,7 @@ rsInformation = 'Information'; rsConfirmation = 'Confirmation'; rsWarning = 'Warning'; rsMessage = 'Message'; +rsAbout = 'About %s'; // Standard file filters @@ -59,7 +63,16 @@ rsStyle = 'Style'; rsItalic = 'Italic'; rsBold = 'Bold'; rsUnderScore = 'UnderScore'; +rsTypeface = 'Typeface'; +rsAntiAliasing = 'Anti aliasing'; rsExampleText = 'Example Text'; +rsCollectionAllFonts = 'All Fonts'; +rsCollectionRecentlyUsed = 'Recently Used'; +rsCollectionFavourites = 'Favourites'; +rsCollectionFixedWidth = 'Fixed Width'; +rsCollectionSans = 'Sans'; +rsCollectionSerif = 'Serif'; +rsCollectionFontAliases = 'Font Aliases'; // Open Dialog @@ -70,13 +83,41 @@ rsDrive = 'Drive'; rsFiles = 'Files'; rsDirectories = 'Directories'; rsShowHidden = 'Show hidden files'; +rsFileSelection = 'File Selection'; +rsFileModifiedTime = 'Mod. Time'; +rsFileAttributes = 'Attributes'; +rsFileRights = 'Rights'; +rsFileOwner = 'Owner'; +rsFileGroup = 'Group'; // Save Dialog rsSaveAFile = 'Save file as'; + // Error messages -rsListMustBeEmpty = 'List must be empty'; +rsErrListMustBeEmpty = 'List must be empty'; +rsErrCouldNotOpenDir = 'Could not open the directory <%s>'; +rsErrItemOfWrongType = 'Item is not of <%s> type!'; +rsErrFailedToCreateDir = 'Failed to create the directory <%s>'; +rsErrNotAssigned = '<%s> not assigned'; + + +// Calendar Combo & Dialog +rsShortMon = 'Mon'; +rsShortTue = 'Tue'; +rsShortWed = 'Wed'; +rsShortThu = 'Thu'; +rsShortFri = 'Fri'; +rsShortSat = 'Sat'; +rsShortSun = 'Sun'; +rsLongMon = 'Monday'; +rsLongTue = 'Tuesday'; +rsLongWed = 'Wednesday'; +rsLongThu = 'Thursday'; +rsLongFri = 'Friday'; +rsLongSat = 'Saturday'; +rsLongSun = 'Sunday'; diff --git a/src/corelib/lang_french.inc b/src/corelib/lang_french.inc index dd1945f5..8b4c49b0 100644 --- a/src/corelib/lang_french.inc +++ b/src/corelib/lang_french.inc @@ -29,6 +29,9 @@ rsDelete = 'Supprimer'; rsExit = 'Sortir'; rsYesToAll = 'Oui à tous'; rsNoToAll = 'Non à tous'; +rsCut = 'Cut'; +rsCopy = 'Copy'; +rsPaste = 'Paste'; // Captions @@ -38,6 +41,7 @@ rsInformation = 'Information'; rsConfirmation = 'Confirmation'; rsWarning = 'Alerte'; rsMessage = 'Message'; +rsAbout = 'About %s'; // Standard file filters @@ -59,7 +63,16 @@ rsStyle = 'Style'; rsItalic = 'Italique'; rsBold = 'Gras'; rsUnderScore = 'Souligné'; +rsTypeface = 'Typeface'; +rsAntiAliasing = 'Anti aliasing'; rsExampleText = 'Texte exemple'; +rsCollectionAllFonts = 'All Fonts'; +rsCollectionRecentlyUsed = 'Recently Used'; +rsCollectionFavourites = 'Favourites'; +rsCollectionFixedWidth = 'Fixed Width'; +rsCollectionSans = 'Sans'; +rsCollectionSerif = 'Serif'; +rsCollectionFontAliases = 'Font Aliases'; // Open Dialog @@ -70,6 +83,12 @@ rsDrive = 'Disque'; rsFiles = 'Fichiers'; rsDirectories = 'Répertoires'; rsShowHidden = 'Montrer les fichiers cachés'; +rsFileSelection = 'File Selection'; +rsFileModifiedTime = 'Mod. Time'; +rsFileAttributes = 'Attributes'; +rsFileRights = 'Rights'; +rsFileOwner = 'Owner'; +rsFileGroup = 'Group'; // Save Dialog @@ -77,5 +96,28 @@ rsSaveAFile = 'Sauver sous'; // Error messages -rsListMustBeEmpty = 'Liste doit être vide'; +rsErrListMustBeEmpty = 'Liste doit être vide'; +rsErrCouldNotOpenDir = 'Could not open the directory <%s>'; +rsErrItemOfWrongType = 'Item is not of <%s> type!'; +rsErrFailedToCreateDir = 'Failed to create the directory <%s>'; +rsErrNotAssigned = '<%s> not assigned'; + + +// Calendar Combo & Dialog +rsShortMon = 'Mon'; +rsShortTue = 'Tue'; +rsShortWed = 'Wed'; +rsShortThu = 'Thu'; +rsShortFri = 'Fri'; +rsShortSat = 'Sat'; +rsShortSun = 'Sun'; +rsLongMon = 'Monday'; +rsLongTue = 'Tuesday'; +rsLongWed = 'Wednesday'; +rsLongThu = 'Thursday'; +rsLongFri = 'Friday'; +rsLongSat = 'Saturday'; +rsLongSun = 'Sunday'; + + diff --git a/src/corelib/lang_german.inc b/src/corelib/lang_german.inc index 6bc34d97..e14a5d0e 100644 --- a/src/corelib/lang_german.inc +++ b/src/corelib/lang_german.inc @@ -29,6 +29,9 @@ rsDelete = 'Lschen'; rsExit = 'Exit'; rsYesToAll = 'Yes to All'; rsNoToAll = 'No to All'; +rsCut = 'Cut'; +rsCopy = 'Copy'; +rsPaste = 'Paste'; // Captions @@ -38,6 +41,7 @@ rsInformation = 'Information'; rsConfirmation = 'Bestätigen'; rsWarning = 'Warnung'; rsMessage = 'Nachricht'; +rsAbout = 'About %s'; // Standard file filters @@ -59,7 +63,16 @@ rsStyle = 'Stil'; rsItalic = 'Kursiv'; rsBold = 'Fett'; rsUnderScore = 'Unterstrichen'; +rsTypeface = 'Typeface'; +rsAntiAliasing = 'Anti aliasing'; rsExampleText = 'Beispieltext'; +rsCollectionAllFonts = 'All Fonts'; +rsCollectionRecentlyUsed = 'Recently Used'; +rsCollectionFavourites = 'Favourites'; +rsCollectionFixedWidth = 'Fixed Width'; +rsCollectionSans = 'Sans'; +rsCollectionSerif = 'Serif'; +rsCollectionFontAliases = 'Font Aliases'; // Open Dialog @@ -70,6 +83,12 @@ rsDrive = 'Laufwerk'; rsFiles = 'Dateien'; rsDirectories = 'Verzeichnisse'; rsShowHidden = 'Show hidden files'; +rsFileSelection = 'File Selection'; +rsFileModifiedTime = 'Mod. Time'; +rsFileAttributes = 'Attributes'; +rsFileRights = 'Rights'; +rsFileOwner = 'Owner'; +rsFileGroup = 'Group'; // Save Dialog @@ -77,5 +96,28 @@ rsSaveAFile = 'Datei speichern'; // Error messages -rsListMustBeEmpty = 'Liste müssen leer sein'; +rsErrListMustBeEmpty = 'Liste müssen leer sein'; +rsErrCouldNotOpenDir = 'Could not open the directory <%s>'; +rsErrItemOfWrongType = 'Item is not of <%s> type!'; +rsErrFailedToCreateDir = 'Failed to create the directory <%s>'; +rsErrNotAssigned = '<%s> not assigned'; + + +// Calendar Combo & Dialog +rsShortMon = 'Mon'; +rsShortTue = 'Tue'; +rsShortWed = 'Wed'; +rsShortThu = 'Thu'; +rsShortFri = 'Fri'; +rsShortSat = 'Sat'; +rsShortSun = 'Sun'; +rsLongMon = 'Monday'; +rsLongTue = 'Tuesday'; +rsLongWed = 'Wednesday'; +rsLongThu = 'Thursday'; +rsLongFri = 'Friday'; +rsLongSat = 'Saturday'; +rsLongSun = 'Sunday'; + + diff --git a/src/corelib/lang_italian.inc b/src/corelib/lang_italian.inc index 93b372d3..016ac873 100644 --- a/src/corelib/lang_italian.inc +++ b/src/corelib/lang_italian.inc @@ -29,6 +29,9 @@ rsDelete = 'Cancella'; rsExit = 'Esci'; rsYesToAll = 'Sì a Tutto'; rsNoToAll = 'No a Tutto'; +rsCut = 'Cut'; +rsCopy = 'Copy'; +rsPaste = 'Paste'; // Captions @@ -38,6 +41,7 @@ rsInformation = 'Informazione'; rsConfirmation = 'Conferma'; rsWarning = 'Attenzione'; rsMessage = 'Messaggio'; +rsAbout = 'About %s'; // Standard file filters @@ -59,7 +63,16 @@ rsStyle = 'Stile'; rsItalic = 'Italico'; rsBold = 'Grassetto'; rsUnderScore = 'Sottolineato'; +rsTypeface = 'Typeface'; +rsAntiAliasing = 'Anti aliasing'; rsExampleText = 'Testo di Esempio'; +rsCollectionAllFonts = 'All Fonts'; +rsCollectionRecentlyUsed = 'Recently Used'; +rsCollectionFavourites = 'Favourites'; +rsCollectionFixedWidth = 'Fixed Width'; +rsCollectionSans = 'Sans'; +rsCollectionSerif = 'Serif'; +rsCollectionFontAliases = 'Font Aliases'; // Open Dialog @@ -70,6 +83,12 @@ rsDrive = 'Disco'; rsFiles = 'Files'; rsDirectories = 'Cartelle'; rsShowHidden = 'Mostra files nascosti'; +rsFileSelection = 'File Selection'; +rsFileModifiedTime = 'Mod. Time'; +rsFileAttributes = 'Attributes'; +rsFileRights = 'Rights'; +rsFileOwner = 'Owner'; +rsFileGroup = 'Group'; // Save Dialog @@ -77,5 +96,28 @@ rsSaveAFile = 'Salva con nome'; // Error messages -rsListMustBeEmpty = 'Elenco deve essere vuoto'; +rsErrListMustBeEmpty = 'Elenco deve essere vuoto'; +rsErrCouldNotOpenDir = 'Could not open the directory <%s>'; +rsErrItemOfWrongType = 'Item is not of <%s> type!'; +rsErrFailedToCreateDir = 'Failed to create the directory <%s>'; +rsErrNotAssigned = '<%s> not assigned'; + + +// Calendar Combo & Dialog +rsShortMon = 'Mon'; +rsShortTue = 'Tue'; +rsShortWed = 'Wed'; +rsShortThu = 'Thu'; +rsShortFri = 'Fri'; +rsShortSat = 'Sat'; +rsShortSun = 'Sun'; +rsLongMon = 'Monday'; +rsLongTue = 'Tuesday'; +rsLongWed = 'Wednesday'; +rsLongThu = 'Thursday'; +rsLongFri = 'Friday'; +rsLongSat = 'Saturday'; +rsLongSun = 'Sunday'; + + diff --git a/src/corelib/lang_portuguese.inc b/src/corelib/lang_portuguese.inc index 07cc50cd..445ad578 100644 --- a/src/corelib/lang_portuguese.inc +++ b/src/corelib/lang_portuguese.inc @@ -29,7 +29,9 @@ rsDelete = 'Deletar'; rsExit = 'Sair'; rsYesToAll = 'Sim para todos'; rsNoToAll = 'Não para todos'; - +rsCut = 'Cut'; +rsCopy = 'Copy'; +rsPaste = 'Paste'; // Captions @@ -39,6 +41,7 @@ rsInformation = 'Informação'; rsConfirmation = 'Confirmação'; rsWarning = 'Advertência'; rsMessage = 'Mensagem'; +rsAbout = 'About %s'; // Standard file filters @@ -60,7 +63,16 @@ rsStyle = 'Estilo'; rsItalic = 'Itálico'; rsBold = 'Negrito'; rsUnderScore = 'Sublinhado'; +rsTypeface = 'Typeface'; +rsAntiAliasing = 'Anti aliasing'; rsExampleText = 'Texto de Exemplo'; +rsCollectionAllFonts = 'All Fonts'; +rsCollectionRecentlyUsed = 'Recently Used'; +rsCollectionFavourites = 'Favourites'; +rsCollectionFixedWidth = 'Fixed Width'; +rsCollectionSans = 'Sans'; +rsCollectionSerif = 'Serif'; +rsCollectionFontAliases = 'Font Aliases'; // Open Dialog @@ -71,6 +83,12 @@ rsDrive = 'Drive'; rsFiles = 'Arquivos'; rsDirectories = 'Diretórios'; rsShowHidden = 'Mostrar arquivos ocultos'; +rsFileSelection = 'File Selection'; +rsFileModifiedTime = 'Mod. Time'; +rsFileAttributes = 'Attributes'; +rsFileRights = 'Rights'; +rsFileOwner = 'Owner'; +rsFileGroup = 'Group'; // Save Dialog @@ -78,5 +96,28 @@ rsSaveAFile = 'Salvar arquivo como'; // Error messages -rsListMustBeEmpty = 'Lista deve estar vazio'; +rsErrListMustBeEmpty = 'Lista deve estar vazio'; +rsErrCouldNotOpenDir = 'Could not open the directory <%s>'; +rsErrItemOfWrongType = 'Item is not of <%s> type!'; +rsErrFailedToCreateDir = 'Failed to create the directory <%s>'; +rsErrNotAssigned = '<%s> not assigned'; + + +// Calendar Combo & Dialog +rsShortMon = 'Mon'; +rsShortTue = 'Tue'; +rsShortWed = 'Wed'; +rsShortThu = 'Thu'; +rsShortFri = 'Fri'; +rsShortSat = 'Sat'; +rsShortSun = 'Sun'; +rsLongMon = 'Monday'; +rsLongTue = 'Tuesday'; +rsLongWed = 'Wednesday'; +rsLongThu = 'Thursday'; +rsLongFri = 'Friday'; +rsLongSat = 'Saturday'; +rsLongSun = 'Sunday'; + + diff --git a/src/corelib/lang_russian.inc b/src/corelib/lang_russian.inc index e2e2ecf8..20110199 100644 --- a/src/corelib/lang_russian.inc +++ b/src/corelib/lang_russian.inc @@ -29,6 +29,9 @@ rsDelete = 'Удалить'; rsExit = 'Выход'; rsYesToAll = 'Да для всех'; rsNoToAll = 'Нет для всех'; +rsCut = 'Cut'; +rsCopy = 'Copy'; +rsPaste = 'Paste'; // Captions @@ -38,6 +41,7 @@ rsInformation = 'Информация'; rsConfirmation = 'Подтверждение'; rsWarning = 'Внимание'; rsMessage = 'Сообщение'; +rsAbout = 'About %s'; // Standard file filters @@ -59,7 +63,16 @@ rsStyle = 'Стиль'; rsItalic = 'Курсив'; rsBold = 'Жирный'; rsUnderScore = 'Подчеркнутый'; +rsTypeface = 'Typeface'; +rsAntiAliasing = 'Anti aliasing'; rsExampleText = 'Пример текста'; +rsCollectionAllFonts = 'All Fonts'; +rsCollectionRecentlyUsed = 'Recently Used'; +rsCollectionFavourites = 'Favourites'; +rsCollectionFixedWidth = 'Fixed Width'; +rsCollectionSans = 'Sans'; +rsCollectionSerif = 'Serif'; +rsCollectionFontAliases = 'Font Aliases'; // Open Dialog @@ -70,6 +83,12 @@ rsDrive = 'Диск'; rsFiles = 'Файлы'; rsDirectories = 'Директории'; rsShowHidden = 'Показывать скрытые файлы'; +rsFileSelection = 'File Selection'; +rsFileModifiedTime = 'Mod. Time'; +rsFileAttributes = 'Attributes'; +rsFileRights = 'Rights'; +rsFileOwner = 'Owner'; +rsFileGroup = 'Group'; // Save Dialog @@ -77,5 +96,28 @@ rsSaveAFile = 'Сохранить файл как'; // Error messages -rsListMustBeEmpty = 'Список должен быть пустым'; +rsErrListMustBeEmpty = 'Список должен быть пустым'; +rsErrCouldNotOpenDir = 'Could not open the directory <%s>'; +rsErrItemOfWrongType = 'Item is not of <%s> type!'; +rsErrFailedToCreateDir = 'Failed to create the directory <%s>'; +rsErrNotAssigned = '<%s> not assigned'; + + +// Calendar Combo & Dialog +rsShortMon = 'Mon'; +rsShortTue = 'Tue'; +rsShortWed = 'Wed'; +rsShortThu = 'Thu'; +rsShortFri = 'Fri'; +rsShortSat = 'Sat'; +rsShortSun = 'Sun'; +rsLongMon = 'Monday'; +rsLongTue = 'Tuesday'; +rsLongWed = 'Wednesday'; +rsLongThu = 'Thursday'; +rsLongFri = 'Friday'; +rsLongSat = 'Saturday'; +rsLongSun = 'Sunday'; + + diff --git a/src/corelib/lang_spanish.inc b/src/corelib/lang_spanish.inc index 531b1720..9e7a4119 100644 --- a/src/corelib/lang_spanish.inc +++ b/src/corelib/lang_spanish.inc @@ -29,6 +29,9 @@ rsDelete = 'Borrar'; rsExit = 'Salir'; rsYesToAll = 'Si a Todo'; rsNoToAll = 'No a Todo'; +rsCut = 'Cut'; +rsCopy = 'Copy'; +rsPaste = 'Paste'; // Captions @@ -38,6 +41,7 @@ rsInformation = 'Información'; rsConfirmation = 'Confirmación'; rsWarning = 'Advertencia'; rsMessage = 'Mensaje'; +rsAbout = 'About %s'; // Standard file filters @@ -59,7 +63,16 @@ rsStyle = 'Estilo'; rsItalic = 'Italica'; rsBold = 'Negrita'; rsUnderScore = 'Subrayado'; +rsTypeface = 'Typeface'; +rsAntiAliasing = 'Anti aliasing'; rsExampleText = 'Texto de Ejemplo'; +rsCollectionAllFonts = 'All Fonts'; +rsCollectionRecentlyUsed = 'Recently Used'; +rsCollectionFavourites = 'Favourites'; +rsCollectionFixedWidth = 'Fixed Width'; +rsCollectionSans = 'Sans'; +rsCollectionSerif = 'Serif'; +rsCollectionFontAliases = 'Font Aliases'; // Open Dialog @@ -70,13 +83,41 @@ rsDrive = 'Unidad'; rsFiles = 'Archivos'; rsDirectories = 'Carpetas'; rsShowHidden = 'Mostrar archivos ocultos'; +rsFileSelection = 'File Selection'; +rsFileModifiedTime = 'Mod. Time'; +rsFileAttributes = 'Attributes'; +rsFileRights = 'Rights'; +rsFileOwner = 'Owner'; +rsFileGroup = 'Group'; // Save Dialog rsSaveAFile = 'Guardar como'; + // Error messages -rsListMustBeEmpty = 'La lista debe estar vacia'; +rsErrListMustBeEmpty = 'La lista debe estar vacia'; +rsErrCouldNotOpenDir = 'Could not open the directory <%s>'; +rsErrItemOfWrongType = 'Item is not of <%s> type!'; +rsErrFailedToCreateDir = 'Failed to create the directory <%s>'; +rsErrNotAssigned = '<%s> not assigned'; + + +// Calendar Combo & Dialog +rsShortMon = 'Mon'; +rsShortTue = 'Tue'; +rsShortWed = 'Wed'; +rsShortThu = 'Thu'; +rsShortFri = 'Fri'; +rsShortSat = 'Sat'; +rsShortSun = 'Sun'; +rsLongMon = 'Monday'; +rsLongTue = 'Tuesday'; +rsLongWed = 'Wednesday'; +rsLongThu = 'Thursday'; +rsLongFri = 'Friday'; +rsLongSat = 'Saturday'; +rsLongSun = 'Sunday'; diff --git a/src/gui/db/fpgui_db.pas b/src/gui/db/fpgui_db.pas index 90090fcd..810abe70 100644 --- a/src/gui/db/fpgui_db.pas +++ b/src/gui/db/fpgui_db.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, diff --git a/src/gui/gui_checkbox.pas b/src/gui/gui_checkbox.pas index 9863ff05..0ccf2c02 100644 --- a/src/gui/gui_checkbox.pas +++ b/src/gui/gui_checkbox.pas @@ -148,7 +148,7 @@ begin tx := r.right + 8; inc(r.left, 2); inc(r.top, 1); - img := fpgImages.GetImage('sys.checkboxes'); + img := fpgImages.GetImage('sys.checkboxes'); // Do NOT localize Canvas.DrawImagePart(r.Left, r.Top, img, ix*13, 0, 13, 13); ty := (Height div 2) - (Font.Height div 2); diff --git a/src/gui/gui_customgrid.pas b/src/gui/gui_customgrid.pas index 2e253dad..c1fb1272 100644 --- a/src/gui/gui_customgrid.pas +++ b/src/gui/gui_customgrid.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, diff --git a/src/gui/gui_dialogs.pas b/src/gui/gui_dialogs.pas index 308e94b5..e3b916fb 100644 --- a/src/gui/gui_dialogs.pas +++ b/src/gui/gui_dialogs.pas @@ -443,7 +443,6 @@ end; constructor TfpgBaseDialog.Create(AOwner: TComponent); begin inherited Create(AOwner); - {TODO: We need to localize this dialog } Width := 500; Height := 400; MinWidth := 300; @@ -454,13 +453,13 @@ begin btnCancel := CreateButton(self, Width-FDefaultButtonWidth-FSpacing, 370, FDefaultButtonWidth, rsCancel, @btnCancelClick); btnCancel.Name := 'btnCancel'; - btnCancel.ImageName := 'stdimg.Cancel'; + btnCancel.ImageName := 'stdimg.Cancel'; // Do NOT localize btnCancel.ShowImage := True; btnCancel.Anchors := [anRight, anBottom]; btnOK := CreateButton(self, btnCancel.Left-FDefaultButtonWidth-FSpacing, 370, FDefaultButtonWidth, rsOK, @btnOKClick); btnOK.Name := 'btnOK'; - btnOK.ImageName := 'stdimg.OK'; + btnOK.ImageName := 'stdimg.OK'; // Do NOT localize btnOK.ShowImage := True; btnOK.Anchors := [anRight, anBottom]; end; @@ -624,24 +623,23 @@ begin with lblLabel5 do begin SetPosition(8, 8, 73, 16); - Text := rsCollection + ':'; + Text := fpgAddColon(rsCollection); end; { TODO : This need to be implemented at some stage. } - { TODO : This needs to be localized. } lbCollection := TfpgListBox.Create(self); with lbCollection do begin SetPosition(8, 28, 145, 236); - Items.Add('All Fonts'); + Items.Add(rsCollectionAllFonts); // These should be stored in <users config path>/fpgui directory - Items.Add('Recently Used'); - Items.Add('Favourites'); + Items.Add(rsCollectionRecentlyUsed); + Items.Add(rsCollectionFavourites); // From here onwards, these should be created automatically. - Items.Add('Fixed Width'); - Items.Add('Sans'); - Items.Add('Serif'); - Items.Add('Font Aliases'); + Items.Add(rsCollectionFixedWidth); + Items.Add(rsCollectionSans); + Items.Add(rsCollectionSerif); + Items.Add(rsCollectionFontAliases); // OnChange := @OnParamChange; FocusItem := 1; Enabled := False; @@ -651,7 +649,7 @@ begin with lblLabel1 do begin SetPosition(161, 8, 73, 16); - Text := rsName + ':'; + Text := fpgAddColon(rsName); end; lbFaces := TfpgListBox.Create(self); @@ -666,7 +664,7 @@ begin with lblLabel3 do begin SetPosition(401, 8, 54, 16); - Text := rsSize + ':'; + Text := fpgAddColon(rsSize); end; lbSize := TfpgListBox.Create(self); @@ -701,7 +699,7 @@ begin with lblLabel2 do begin SetPosition(461, 8, 54, 16); - Text := 'Typeface:'; { TODO : Localize this } + Text := fpgAddColon(rsTypeface); end; cbBold := TfpgCheckBox.Create(self); @@ -732,7 +730,7 @@ begin with cbAntiAlias do begin SetPosition(461, 124, 110, 20); - Text := 'Anti aliasing'; + Text := rsAntiAliasing; OnChange := @OnParamChange; Checked := True; end; @@ -741,7 +739,7 @@ begin with lblLabel4 do begin SetPosition(8, 268, 584, 16); - Text := rsExampleText + ':'; + Text := fpgAddColon(rsExampleText); end; edSample := TfpgEdit.Create(self); @@ -845,7 +843,7 @@ begin Anchors := [anRight, anTop]; Text := ''; FontDesc := '#Label1'; - ImageName := 'stdimg.folderup'; + ImageName := 'stdimg.folderup'; // Do NOT localize ModalResult := 0; Focusable := False; OnClick := @UpDirClick; @@ -858,7 +856,7 @@ begin Anchors := [anRight, anTop]; Text := ''; FontDesc := '#Label1'; - ImageName := 'stdimg.foldernew'; + ImageName := 'stdimg.foldernew'; // Do NOT localize ModalResult := 0; Focusable := False; end; @@ -870,7 +868,7 @@ begin Anchors := [anRight, anTop]; Text := ''; FontDesc := '#Label1'; - ImageName := 'stdimg.hidden'; + ImageName := 'stdimg.hidden'; // Do NOT localize ModalResult := 0; Focusable := False; GroupIndex := 1; @@ -924,7 +922,7 @@ begin begin SetPosition(8, 283, 80, 16); Anchors := [anLeft, anBottom]; - Text := 'Filename:'; + Text := fpgAddColon(rsFileName); FontDesc := '#Label1'; end; @@ -933,13 +931,13 @@ begin begin SetPosition(8, 327, 64, 16); Anchors := [anLeft, anBottom]; - Text := 'File type:'; + Text := fpgAddColon(rsFileType); FontDesc := '#Label1'; end; ActiveWidget := grid; FileName := ''; - Filter := 'All Files (*)|*'; + Filter := rsAllFiles + ' (*)|*'; chlFilter.FocusItem := 1; end; @@ -977,7 +975,7 @@ end; constructor TfpgFileDialog.Create(AOwner: TComponent); begin inherited Create(AOwner); - WindowTitle := 'File Selection'; + WindowTitle := rsFileSelection; Width := 640; Height := 410; WindowPosition := wpScreenCenter; @@ -1045,7 +1043,7 @@ begin if not SetCurrentDir(ADir) then begin - ShowMessage('Could not open the directory ' + ADir, 'Error'); + ShowMessage(Format(rsErrCouldNotOpenDir, [ADir]), rsError); Exit; //==> end; @@ -1199,9 +1197,9 @@ begin if not SelectFile(fname) then edFilename.Text := fname; - WindowTitle := 'Open File...'; - btnOK.ImageName := 'stdimg.open'; - btnOK.Text := 'Open'; + WindowTitle := rsOpenAFile; + btnOK.ImageName := 'stdimg.open'; // Do NOT localize + btnOK.Text := rsOpen; if ShowModal = 1 then Result := True @@ -1223,9 +1221,9 @@ begin if not SelectFile(fname) then edFilename.Text := fname; - WindowTitle := 'Save File...'; - btnOK.ImageName := 'stdimg.save'; - btnOK.Text := 'Save'; + WindowTitle := rsSaveAFile; + btnOK.ImageName := 'stdimg.save'; // Do NOT localize + btnOK.Text := rsSave; if ShowModal = 1 then Result := True diff --git a/src/gui/gui_edit.pas b/src/gui/gui_edit.pas index 77deecee..ee97e4f4 100644 --- a/src/gui/gui_edit.pas +++ b/src/gui/gui_edit.pas @@ -135,7 +135,8 @@ function CreateEdit(AOwner: TComponent; x, y, w, h: TfpgCoord): TfpgEdit; implementation uses - gfx_UTF8utils; + gfx_UTF8utils, + gfx_constants; const // internal popupmenu item names @@ -751,13 +752,13 @@ begin begin { todo: This text needs to be localized } FDefaultPopupMenu := TfpgPopupMenu.Create(nil); - itm := FDefaultPopupMenu.AddMenuItem('Cut', '', @DefaultPopupCut); + itm := FDefaultPopupMenu.AddMenuItem(rsCut, '', @DefaultPopupCut); itm.Name := ipmCut; - itm := FDefaultPopupMenu.AddMenuItem('Copy', '', @DefaultPopupCopy); + itm := FDefaultPopupMenu.AddMenuItem(rsCopy, '', @DefaultPopupCopy); itm.Name := ipmCopy; - itm := FDefaultPopupMenu.AddMenuItem('Paste', '', @DefaultPopupPaste); + itm := FDefaultPopupMenu.AddMenuItem(rsPaste, '', @DefaultPopupPaste); itm.Name := ipmPaste; - itm := FDefaultPopupMenu.AddMenuItem('Clear all text', '', @DefaultPopupClearAll); + itm := FDefaultPopupMenu.AddMenuItem(rsDelete, '', @DefaultPopupClearAll); itm.Name := ipmClearAll; end; diff --git a/src/gui/gui_editcombo.pas b/src/gui/gui_editcombo.pas index da04f75d..2bfc8353 100644 --- a/src/gui/gui_editcombo.pas +++ b/src/gui/gui_editcombo.pas @@ -56,7 +56,6 @@ uses SysUtils, gfx_widget, gfxbase, - gui_button, fpgfx, gfx_popupwindow; diff --git a/src/gui/gui_gauge.pas b/src/gui/gui_gauge.pas index 52ac9df3..156ba872 100644 --- a/src/gui/gui_gauge.pas +++ b/src/gui/gui_gauge.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, diff --git a/src/gui/gui_grid.pas b/src/gui/gui_grid.pas index e1a6b718..70e20ba1 100644 --- a/src/gui/gui_grid.pas +++ b/src/gui/gui_grid.pas @@ -220,6 +220,7 @@ implementation uses gfx_utils + ,gfx_constants {$IFDEF MSWINDOWS} ,Windows // Graeme: temporary, just to see how the grid looks under Windows. {$ENDIF} @@ -554,17 +555,17 @@ begin case ACol of 1: begin if e.EntryType = etDir then - img := fpgImages.GetImage('stdimg.folder') + img := fpgImages.GetImage('stdimg.folder') // Do NOT localize else begin - img := fpgImages.GetImage('stdimg.document'); + img := fpgImages.GetImage('stdimg.document'); // Do NOT localize {$IFDEF UNIX} if (e.Mode and $40) <> 0 then - img := fpgImages.GetImage('stdimg.executable'); + img := fpgImages.GetImage('stdimg.executable'); // Do NOT localize {$ENDIF} {$IFDEF MSWINDOWS} if lowercase(e.Extention) = 'exe' then - img := fpgImages.GetImage('stdimg.executable'); + img := fpgImages.GetImage('stdimg.executable'); // Do NOT localize {$ENDIF} end; @@ -639,19 +640,19 @@ begin {$Note No IFDEF's allowed!!! But how the hell to we get around this? } {$ifdef MSWINDOWS} - AddColumn('Name', 320); + AddColumn(rsName, 320); {$else} - AddColumn('Name', 220); + AddColumn(rsName, 220); {$endif} - AddColumn('Size', 80); - AddColumn('Mod. Time', 108); + AddColumn(rsSize, 80); + AddColumn(rsFileModifiedTime, 108); {$ifdef MSWINDOWS} - AddColumn('Attributes', 78); + AddColumn(rsFileAttributes, 78); {$else} - AddColumn('Rights', 78); - AddColumn('Owner', 54); - AddColumn('Group', 54); + AddColumn(rsFileRights, 78); + AddColumn(rsFileOwner, 54); + AddColumn(rsFileGroup, 54); {$endif} RowSelect := True; diff --git a/src/gui/gui_iniutils.pas b/src/gui/gui_iniutils.pas index 9d045f3d..30123675 100644 --- a/src/gui/gui_iniutils.pas +++ b/src/gui/gui_iniutils.pas @@ -52,7 +52,8 @@ function gINI(const AFileName: string = ''): TfpgINIFile; implementation uses - fpgfx; + fpgfx + ,gfx_constants; var uINI: TfpgINIFile; @@ -82,7 +83,7 @@ begin { We used a non-Global config dir, so should be able to create the dir } if not ForceDirectories(lDir) then - raise Exception.Create('Failed to create the directory <' + lDir + '>'); + raise Exception.CreateFmt(rsErrFailedToCreateDir, [lDir]); if lFileName = '' then @@ -153,6 +154,7 @@ begin Result := inherited ReadTime(ASection, AName, ADefault); end; +// Do NOT localize procedure TfpgINIFile.ReadFormState(AForm: TfpgForm; AHeight: integer; AWidth: integer); var LINISection: string; @@ -161,7 +163,7 @@ var LHeight: integer; LWidth: integer; begin - Assert(AForm <> nil, 'pForm not assigned'); + Assert(AForm <> nil, Format(rsErrNotAssigned, ['pForm'])); LINISection := AForm.Name + 'State'; // Read form position, -1 if not stored in registry LTop := readInteger(LINISection, 'Top', -1); @@ -207,6 +209,7 @@ begin //{$ENDIF MSWINDOWS} end; +// Do NOT localize procedure TfpgINIFile.WriteFormState(AForm: TfpgForm); var LINISection: string; diff --git a/src/gui/gui_listview.pas b/src/gui/gui_listview.pas index 5c2a4b27..d82f022d 100644 --- a/src/gui/gui_listview.pas +++ b/src/gui/gui_listview.pas @@ -263,6 +263,10 @@ type implementation +uses + gfx_constants; + + type // used to access protected methods TfpgScrollbarFriend = class(TfpgScrollbar) @@ -442,7 +446,7 @@ begin if AItem.InheritsFrom(TfpgLVItem) then FItems.Insert(AIndex, AItem) else - raise Exception.Create('Item is not of TfpgLVItem type!'); + raise Exception.CreateFmt(rsErrItemOfWrongType, ['TfpgLVItem']); end; procedure TfpgLVItems.BeginUpdate; diff --git a/src/gui/gui_mru.pas b/src/gui/gui_mru.pas index b50bc170..2baa25f8 100644 --- a/src/gui/gui_mru.pas +++ b/src/gui/gui_mru.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, diff --git a/src/gui/gui_popupcalendar.pas b/src/gui/gui_popupcalendar.pas index 506482d7..cf70b2be 100644 --- a/src/gui/gui_popupcalendar.pas +++ b/src/gui/gui_popupcalendar.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, @@ -142,7 +142,8 @@ type implementation uses - gui_scrollbar; + gui_scrollbar + ,gfx_constants; {@VFD_NEWFORM_IMPL} @@ -575,13 +576,13 @@ begin begin Name := 'grdName1'; SetPosition(0, 23, 233, 119); - AddColumn('Mon', 33, taCenter); - AddColumn('Tue', 32, taCenter); - AddColumn('Wed', 33, taCenter); - AddColumn('Thu', 32, taCenter); - AddColumn('Fri', 33, taCenter); - AddColumn('Sat', 32, taCenter); - AddColumn('Sun', 33, taCenter); + AddColumn(rsShortMon, 33, taCenter); + AddColumn(rsShortTue, 32, taCenter); + AddColumn(rsShortWed, 33, taCenter); + AddColumn(rsShortThu, 32, taCenter); + AddColumn(rsShortFri, 33, taCenter); + AddColumn(rsShortSat, 32, taCenter); + AddColumn(rsShortSun, 33, taCenter); FontDesc := '#Grid'; HeaderFontDesc := '#GridHeader'; RowCount := 6; diff --git a/src/gui/gui_radiobutton.pas b/src/gui/gui_radiobutton.pas index b9012c98..d59f6f23 100644 --- a/src/gui/gui_radiobutton.pas +++ b/src/gui/gui_radiobutton.pas @@ -198,7 +198,7 @@ begin tx := r.right + 8; inc(r.left, 2); inc(r.top, 1); - img := fpgImages.GetImage('sys.radiobuttons'); + img := fpgImages.GetImage('sys.radiobuttons'); // Do NOT localize Canvas.DrawImagePart(r.Left, r.Top, img, ix*12, 0, 12, 12); ty := (Height div 2) - (Font.Height div 2); @@ -287,9 +287,9 @@ begin begin FoundIt := False; if direction in [fsdLast, fsdPrev] then - bestdtab := Low(integer) // or "-999999" like that in TfpgWidget.FindFocusWidget? + bestdtab := Low(integer) else - bestdtab := High(integer); // or "999999"? + bestdtab := High(integer); for i := 0 to Parent.ComponentCount-1 do begin diff --git a/src/gui/gui_scrollbar.pas b/src/gui/gui_scrollbar.pas index aa4ffdc9..7c039861 100644 --- a/src/gui/gui_scrollbar.pas +++ b/src/gui/gui_scrollbar.pas @@ -123,6 +123,7 @@ end; procedure TfpgScrollBar.HandlePaint; begin + // Do NOT localize Canvas.BeginDraw; if Orientation = orVertical then diff --git a/src/gui/gui_style.pas b/src/gui/gui_style.pas index 7daf0ae0..bee9122d 100644 --- a/src/gui/gui_style.pas +++ b/src/gui/gui_style.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, diff --git a/src/gui/messagedialog.inc b/src/gui/messagedialog.inc index 7953e03d..e2c45fb8 100644 --- a/src/gui/messagedialog.inc +++ b/src/gui/messagedialog.inc @@ -1292,10 +1292,10 @@ begin if ATitle = '' then begin case DialogType of - mtAbout: SetWindowTitle('About fpGUI...'); - mtError: SetWindowTitle('Error'); - mtWarning: SetWindowTitle('Warning'); - mtConfirmation: SetWindowTitle('Confirmation'); + mtAbout: SetWindowTitle(Format(rsAbout, [fpGUIName])); + mtError: SetWindowTitle(rsError); + mtWarning: SetWindowTitle(rsWarning); + mtConfirmation: SetWindowTitle(rsConfirmation); end; end else @@ -1324,22 +1324,22 @@ begin mtError: begin - Canvas.DrawImage(12, 12, fpgImages.GetImage('stdimg.dlg.critical')); + Canvas.DrawImage(12, 12, fpgImages.GetImage('stdimg.dlg.critical')); // Do NOT localize end; mtConfirmation: begin - Canvas.DrawImage(12, 12, fpgImages.GetImage('stdimg.dlg.help')); + Canvas.DrawImage(12, 12, fpgImages.GetImage('stdimg.dlg.help')); // Do NOT localize end; mtWarning: begin - Canvas.DrawImage(12, 12, fpgImages.GetImage('stdimg.dlg.warning')); + Canvas.DrawImage(12, 12, fpgImages.GetImage('stdimg.dlg.warning')); // Do NOT localize end; else begin // default to Information - Canvas.DrawImage(12, 12, fpgImages.GetImage('stdimg.dlg.info')); + Canvas.DrawImage(12, 12, fpgImages.GetImage('stdimg.dlg.info')); // Do NOT localize end; end; @@ -1421,7 +1421,7 @@ begin try dlg.FDialogType := mtAbout; if ATitle = '' then - dlg.WindowTitle := 'About fpGUI...' + dlg.WindowTitle := Format(rsAbout, [fpGUIName]) else dlg.WindowTitle := ATitle; dlg.ShowModal; @@ -1438,12 +1438,12 @@ var begin dlg := TfpgMessageDialog.Create(nil); try - dlg.FDialogType := mtWarning; - dlg.FButtons := AButtons; - dlg.Text := 'A title can go here'; + dlg.FDialogType := mtWarning; + dlg.FButtons := AButtons; + dlg.Text := ATitle; dlg.InformativeText := AText; - dlg.WindowTitle := ATitle; - dlg.FDefaultButton := ADefaultButton; + dlg.WindowTitle := ATitle; + dlg.FDefaultButton := ADefaultButton; dlg.PrepareLayout; Result := TfpgMsgDlgBtn(dlg.ShowModal); finally @@ -1459,12 +1459,12 @@ var begin dlg := TfpgMessageDialog.Create(nil); try - dlg.FDialogType := mtInformation; - dlg.FButtons := AButtons; - dlg.Text := 'A title can go here'; + dlg.FDialogType := mtInformation; + dlg.FButtons := AButtons; + dlg.Text := ATitle; dlg.InformativeText := AText; - dlg.WindowTitle := ATitle; - dlg.FDefaultButton := ADefaultButton; + dlg.WindowTitle := ATitle; + dlg.FDefaultButton := ADefaultButton; dlg.PrepareLayout; dlg.ShowModal; finally @@ -1480,12 +1480,12 @@ var begin dlg := TfpgMessageDialog.Create(nil); try - dlg.FDialogType := mtConfirmation; - dlg.FButtons := AButtons; - dlg.Text := 'A title can go here'; + dlg.FDialogType := mtConfirmation; + dlg.FButtons := AButtons; + dlg.Text := ATitle; dlg.InformativeText := AText; - dlg.WindowTitle := ATitle; - dlg.FDefaultButton := ADefaultButton; + dlg.WindowTitle := ATitle; + dlg.FDefaultButton := ADefaultButton; dlg.PrepareLayout; Result := TfpgMsgDlgBtn(dlg.ShowModal); finally @@ -1501,12 +1501,12 @@ var begin dlg := TfpgMessageDialog.Create(nil); try - dlg.FDialogType := mtWarning; - dlg.FButtons := AButtons; - dlg.Text := 'A title can go here'; + dlg.FDialogType := mtWarning; + dlg.FButtons := AButtons; + dlg.Text := ATitle; dlg.InformativeText := AText; - dlg.WindowTitle := ATitle; - dlg.FDefaultButton := ADefaultButton; + dlg.WindowTitle := ATitle; + dlg.FDefaultButton := ADefaultButton; dlg.PrepareLayout; Result := TfpgMsgDlgBtn(dlg.ShowModal); finally @@ -1518,8 +1518,8 @@ procedure TfpgMessageDialog.AfterCreate; begin {@VFD_BODY_BEGIN: fpgMessageDialog} Name := 'fpgMessageDialog'; - WindowTitle := 'Message...'; - Sizeable := False; + WindowTitle := rsMessage; + Sizeable := False; Width := 500; Height := 400; MinWidth := 300; |