Ignore:
Timestamp:
Jun 30, 2023, 10:01:24 PM (17 months ago)
Author:
chronos
Message:
  • Modified: Updated Common package.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Packages/Common/Translator.pas

    r159 r162  
    173173begin
    174174  FPoFiles.Clear;
    175   if Assigned(FLanguage) then
    176   try
     175  if Assigned(FLanguage) then begin
    177176    LocaleShort := GetLocaleShort;
    178     //ShowMessage(ExtractFileDir(Application.ExeName) +
    179     //  DirectorySeparator + 'Languages' + ' ' + '*.' + LocaleShort + '.po');
    180177    SearchMask := '*';
    181178    if LocaleShort <> '' then SearchMask := SearchMask + '.' + LocaleShort;
     
    184181    for J := 0 to LangDirs.Count - 1 do begin
    185182      FileList := FindAllFiles(LangDirs[J], SearchMask);
    186       for I := 0 to FileList.Count - 1 do begin
    187         FileName := FileList[I];
    188         //FileName := FindLocaleFileName('.po');
    189         if FileExists(FileName) and (
    190         ((LocaleShort = '') and (Pos('.', FileName) = Pos(PoExt, FileName))) or
    191         (LocaleShort <> '')) then FPoFiles.Add(TPOFile.Create(FileName));
     183      try
     184        for I := 0 to FileList.Count - 1 do begin
     185          FileName := FileList[I];
     186          //FileName := FindLocaleFileName('.po');
     187           if FileExists(FileName) and (
     188          ((LocaleShort = '') and (Pos('.', FileName) = Pos(PoExt, FileName))) or
     189          (LocaleShort <> '')) then FPoFiles.Add(TPOFile.Create(FileName));
     190        end;
     191      finally
     192        FileList.Free;
    192193      end;
    193194    end;
    194195    LangDirs.Free;
    195   finally
    196     FileList.Free;
    197196  end;
    198197end;
Note: See TracChangeset for help on using the changeset viewer.