Changeset 79
- Timestamp:
- Aug 2, 2016, 10:06:50 PM (8 years ago)
- Location:
- trunk
- Files:
-
- 1 deleted
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Forms/UFormMain.pas
r75 r79 9 9 ComCtrls, StdCtrls, ExtCtrls, ActnList, UAcronym, UPersistentForm, URegistry, 10 10 ULastOpenedList, UListViewSort, UJobProgressView, UCoolTranslator, Registry, 11 SpecializedList, LazUTF8 ;11 SpecializedList, LazUTF8, LazFileUtils; 12 12 13 13 type … … 167 167 ProjectExt = '.adp'; 168 168 DefaultFileName = 'Acronyms' + ProjectExt; 169 DefaultRegKey = '\Software\ Acronym Decoder';169 DefaultRegKey = '\Software\Chronosoft\Acronym Decoder'; 170 170 RegistryRunKey = '\Software\Microsoft\Windows\CurrentVersion\Run'; 171 171 ExampleFile = 'Example acronyms.adp'; … … 480 480 LoadConfig; 481 481 482 {$IFDEF 0}482 {$IFDEF 0} 483 483 if Application.HasOption('h', 'help') then begin 484 484 WriteLn('AcronymDecoder <project file>'); … … 488 488 Exit; 489 489 end; 490 {$ENDIF} 490 {$ENDIF} 491 491 492 if Application.HasOption('t', 'tray') then begin 492 493 Visible := False; … … 504 505 end else begin 505 506 // Open default database with examples if no item is in recent openned history 506 ProjectOpen(ExtractFileDir(Application.ExeName) + DirectorySeparator + ExampleFile); 507 FileNameOption := ExtractFileDir(Application.ExeName) + DirectorySeparator + ExampleFile; 508 {$IFDEF Linux} 509 // If installed in Linux system then use installation directory for po files 510 if Application.ExeName = '/usr/bin/' + ExtractFileNameOnly(Application.ExeName) then 511 FileNameOption := '/usr/share/' + ExtractFileNameOnly(Application.ExeName) + '/Examples/' + ExampleFile; 512 {$ENDIF} 513 ProjectOpen(FileNameOption); 507 514 end; 508 515 UpdateAcronymsList; … … 620 627 LastOpenedList1.LoadFromRegistry(RegistryContext); 621 628 629 {$IFDEF Linux} 630 // If installed in Linux system then use installation directory for po files 631 if Application.ExeName = '/usr/bin/' + ExtractFileNameOnly(Application.ExeName) then 632 CoolTranslator1.POFilesFolder := '/usr/share/' + ExtractFileNameOnly(Application.ExeName) + '/languages'; 633 {$ENDIF} 634 622 635 with TRegistryEx.Create do 623 636 try -
trunk/Install/deb/build-deb-amd64.sh
r49 r79 7 7 cat >AcronymDecoder/DEBIAN/control << EOF 8 8 Package: AcronymDecoder 9 Version: 1. 0.19 Version: 1.2.0 10 10 Section: custom 11 11 Priority: optional 12 12 Architecture: amd64 13 13 Essential: no 14 Installed-Size: 646119215 14 Maintainer: Chronos <robie@centrum.cz> 16 Description: A tool for quick searching of acronym meaning15 Description: A tool for quick searching of acronym or abbreviaton meaning 17 16 HomePage: http://svn.zdechov.net/trac/AcronymDecoder 18 17 EOF -
trunk/Install/deb/build-deb-i386.sh
r49 r79 7 7 cat >AcronymDecoder/DEBIAN/control << EOF 8 8 Package: AcronymDecoder 9 Version: 1. 0.19 Version: 1.2.0 10 10 Section: custom 11 11 Priority: optional 12 12 Architecture: i386 13 13 Essential: no 14 Installed-Size: 646119215 14 Maintainer: Chronos <robie@centrum.cz> 16 15 Description: A tool for quick searching of acronym meaning -
trunk/Packages/Common/Languages/UJobProgressView.cs.po
r54 r79 39 39 msgid "Total estimated time: %s" 40 40 msgstr "Celkový odhadovaný čas: %s" 41 -
trunk/Packages/CoolTranslator/UCoolTranslator.pas
r43 r79 46 46 procedure TranslateProperty(Component: TPersistent; PropInfo: PPropInfo); 47 47 function IsExcluded(Component: TPersistent; PropertyName: string): Boolean; 48 function GetLangFileDir: string; 48 49 public 49 50 ComponentExcludes: TComponentExcludesList; … … 161 162 if LocaleShort <> '' then SearchMask := SearchMask + '.' + LocaleShort; 162 163 SearchMask := SearchMask + '.po'; 163 FileList := FindAllFiles(ExtractFileDir(UTF8Encode(Application.ExeName)) + 164 DirectorySeparator + FPOFilesFolder, SearchMask); 164 FileList := FindAllFiles(GetLangFileDir, SearchMask); 165 165 for I := 0 to FileList.Count - 1 do begin 166 166 FileName := FileList[I]; … … 180 180 FPoFilesFolder := AValue; 181 181 ReloadFiles; 182 CheckLanguageFiles; 182 183 end; 183 184 … … 290 291 end; 291 292 293 function TCoolTranslator.GetLangFileDir: string; 294 begin 295 Result := FPOFilesFolder; 296 if Copy(Result, 1, 1) <> DirectorySeparator then 297 Result := ExtractFileDir(UTF8Encode(Application.ExeName)) + 298 DirectorySeparator + Result; 299 end; 300 292 301 procedure TCoolTranslator.LanguageListToStrings(Strings: TStrings); 293 302 var … … 349 358 var 350 359 I: Integer; 351 begin 360 LangDir: string; 361 begin 362 LangDir := GetLangFileDir; 352 363 TLanguage(Languages[0]).Available := True; // Automatic 353 364 354 365 for I := 1 to Languages.Count - 1 do 355 366 with TLanguage(Languages[I]) do begin 356 Available := FileExists(ExtractFileDir(UTF8Encode(Application.ExeName)) + 357 DirectorySeparator + POFilesFolder + DirectorySeparator + ExtractFileNameOnly(Application.ExeName) + 367 Available := FileExists(LangDir + DirectorySeparator + ExtractFileNameOnly(Application.ExeName) + 358 368 '.' + Code + ExtensionSeparator + 'po') or (Code = 'en'); 359 369 end;
Note:
See TracChangeset
for help on using the changeset viewer.