Changeset 162 for trunk/Packages/Common/Translator.pas
- Timestamp:
- Jun 30, 2023, 10:01:24 PM (17 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/Translator.pas
r159 r162 173 173 begin 174 174 FPoFiles.Clear; 175 if Assigned(FLanguage) then 176 try 175 if Assigned(FLanguage) then begin 177 176 LocaleShort := GetLocaleShort; 178 //ShowMessage(ExtractFileDir(Application.ExeName) +179 // DirectorySeparator + 'Languages' + ' ' + '*.' + LocaleShort + '.po');180 177 SearchMask := '*'; 181 178 if LocaleShort <> '' then SearchMask := SearchMask + '.' + LocaleShort; … … 184 181 for J := 0 to LangDirs.Count - 1 do begin 185 182 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; 192 193 end; 193 194 end; 194 195 LangDirs.Free; 195 finally196 FileList.Free;197 196 end; 198 197 end;
Note:
See TracChangeset
for help on using the changeset viewer.