Changeset 23 for trunk/UCore.pas
- Timestamp:
- Aug 19, 2021, 11:47:56 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/UCore.pas
r22 r23 41 41 ActionList1: TActionList; 42 42 ApplicationInfo1: TApplicationInfo; 43 CoolTranslator1: TTranslator;43 Translator: TTranslator; 44 44 ImageList1: TImageList; 45 45 LastOpenedList1: TLastOpenedList; … … 273 273 274 274 procedure TCore.DataModuleCreate(Sender: TObject); 275 begin 275 const 276 LinuxLanguagesDir = '/usr/share/vCardStudio/Languages'; 277 begin 278 {$IFDEF Linux} 279 // If installed in Linux system then use installation directory for po files 280 if not DirectoryExists(Translator.POFilesFolder) and DirectoryExists(LinuxLanguagesDir) then 281 Translator.POFilesFolder := LinuxLanguagesDir; 282 {$ENDIF} 283 276 284 DataFile := nil; 277 285 DefaultDataFileClass := TContactsFile; … … 396 404 CurrentContext := ApplicationInfo1.GetRegistryContext; 397 405 if ValueExists('LanguageCode') then 398 CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode(ReadStringWithDefault('LanguageCode', ''))399 else CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode('');406 Translator.Language := Translator.Languages.SearchByCode(ReadStringWithDefault('LanguageCode', '')) 407 else Translator.Language := Translator.Languages.SearchByCode(''); 400 408 if ValueExists('Theme') then 401 409 ThemeManager1.Theme := ThemeManager1.Themes.FindByName(ReadStringWithDefault('Theme', 'System')) … … 416 424 try 417 425 CurrentContext := ApplicationInfo1.GetRegistryContext; 418 if Assigned( CoolTranslator1.Language) and (CoolTranslator1.Language.Code <> '') then419 WriteString('LanguageCode', CoolTranslator1.Language.Code)426 if Assigned(Translator.Language) and (Translator.Language.Code <> '') then 427 WriteString('LanguageCode', Translator.Language.Code) 420 428 else DeleteValue('LanguageCode'); 421 429 if Assigned(ThemeManager1.Theme) and (ThemeManager1.Theme.Name <> '') then
Note:
See TracChangeset
for help on using the changeset viewer.