LCL DefaultTranslator unit:

1) Removed useless TranslateResourceStrings call when translating using .mo files;
  2) Fixed path to LCL translation .mo file

git-svn-id: trunk@23881 -
This commit is contained in:
maxim 2010-03-08 18:40:28 +00:00
parent 8e10349b20
commit 6645384685

View File

@ -359,13 +359,12 @@ initialization
lcfn := FindLocaleFileName('.mo'); lcfn := FindLocaleFileName('.mo');
if lcfn <> '' then if lcfn <> '' then
begin begin
TranslateResourceStrings(UTF8ToSys(lcfn));
LCLPath := ExtractFileName(lcfn); LCLPath := ExtractFileName(lcfn);
Dot1 := pos('.', LCLPath); Dot1 := pos('.', LCLPath);
if Dot1 > 1 then if Dot1 > 1 then
begin begin
Delete(LCLPath, 1, Dot1 - 1); Delete(LCLPath, 1, Dot1 - 1);
LCLPath := ExtractFilePath(lcfn) + 'lcl' + LCLPath; LCLPath := ExtractFilePath(lcfn) + 'lclstrconsts' + LCLPath;
if FileExistsUTF8(LCLPath) then if FileExistsUTF8(LCLPath) then
TranslateResourceStrings(UTF8ToSys(LCLPath)); TranslateResourceStrings(UTF8ToSys(LCLPath));
end; end;