mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-09 18:08:35 +02:00
LCLTranslator: make GetDefaultLang function result independent of LCL translation presence. Now it depends only on presence of interface translation. This behavior makes sense in cases when interface translation present and LCL one missing, or the other way round.
git-svn-id: trunk@61543 -
This commit is contained in:
parent
631fcf53e1
commit
787897eba2
@ -536,8 +536,12 @@ end;
|
||||
|
||||
procedure TranslateLCLResourceStrings(Lang, Dir: string);
|
||||
var
|
||||
LCLPath: string;
|
||||
LCLPath, DefaultLangBackup: string;
|
||||
begin
|
||||
// DefaultLang value is preserved when translating LCL, so it will depend only
|
||||
// on presence of interface translation. Useful when interface translation present
|
||||
// and LCL one missing, or the other way round.
|
||||
DefaultLangBackup:=DefaultLang;
|
||||
LCLPath:=FindLocaleFileName('.po', Lang, ExtractFilePath(Dir), 'lclstrconsts');
|
||||
if LCLPath<>'' then
|
||||
Translations.TranslateUnitResourceStrings('LCLStrConsts', LCLPath)
|
||||
@ -547,6 +551,7 @@ begin
|
||||
if LCLPath<>'' then
|
||||
GetText.TranslateResourceStrings(UTF8ToSys(LCLPath));
|
||||
end;
|
||||
DefaultLang:=DefaultLangBackup;
|
||||
end;
|
||||
|
||||
procedure SetDefaultLang(Lang: string; Dir: string = ''; LocaleFileName: string = ''; ForceUpdate: boolean = true);
|
||||
|
Loading…
Reference in New Issue
Block a user