Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- unit1.pas 2011-01-25 00:27:02.000000000 -0500
- +++ unit2.pas 2011-03-23 16:24:16.234563500 -0400
- @@ -23,13 +23,13 @@
- interface
- uses
- - Classes, SysUtils, LResources, Forms, Controls, Graphics, Dialogs,
- + Classes, LResources, Forms, Controls, Graphics, Dialogs,
- {$IFDEF WIN32} windows, shellapi, dos,{$endif}
- {$IFDEF unix} baseunix, unix, {$endif}
- laz_xmlcfg, dom, xmlread, xmlwrite, StdCtrls, Buttons, ActnList, Menus, unit2, unit3,
- unit4, unit5, gettext, translations, process
- {$IFDEF TRANSLATESTRING}, DefaultTranslator{$ENDIF}, ExtCtrls, ComCtrls, MaskEdit, Spin,
- - PoTranslator;
- + PoTranslator, SysUtils;
- type
- @@ -309,7 +309,7 @@
- // start setup
- {$IFDEF WIN32}
- ansicodepage:=getacp();
- - presetspath :=GetappdataPath() + '\Winff\';
- + presetspath :=extraspath + '\config\';
- if not DirectoryExists(presetspath) then
- createdir(presetspath);
- @@ -963,12 +963,7 @@
- var
- ppidl: PItemIdList;
- begin
- - ppidl := nil;
- - SHGetSpecialFolderLocation(frmMain.Handle,CSIDL_APPDATA , ppidl);
- - SetLength(Result, MAX_PATH);
- - if not SHGetPathFromIDList(ppidl, PChar(Result)) then
- - raise exception.create('SHGetPathFromIDList failed : invalid pidl');
- - SetLength(Result, lStrLen(PChar(Result)));
- + result := extraspath;
- end;
- {$endif}
- {$ifdef unix}
- @@ -1818,11 +1813,15 @@
- {$I unit1.lrs}
- {$ifdef win32}PODirectory := extraspath + '\languages\'{$endif};
- {$ifdef unix}PODirectory := '/usr/share/winff/languages/'{$endif};
- + Lang := GetEnvironmentVariable('LC_ALL');
- + FallbackLang := '';
- + if Lang = '' then
- + Lang := GetEnvironmentVariable('LANG');
- + if Lang = '' then
- GetLanguageIDs(Lang, FallbackLang); // in unit gettext
- POFile := PODirectory + 'winff.' + Lang + '.po';
- if not FileExists(POFile) then
- POFile := PODirectory + 'winff.' + FallbackLang + '.po';
- -
- if FileExists(POFile) then
- begin
- try
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement