mirror of
https://github.com/doublecmd/doublecmd.git
synced 2026-06-21 09:58:13 +00:00
ADD: File with available help files translations, use it when open online help
This commit is contained in:
parent
09d05e669d
commit
46c1b70416
5 changed files with 20 additions and 7 deletions
1
doublecmd.help
Normal file
1
doublecmd.help
Normal file
|
|
@ -0,0 +1 @@
|
|||
ru
|
||||
|
|
@ -32,6 +32,7 @@ mkdir -p $DC_INSTALL_DIR/plugins/wfx/ftp
|
|||
# Copy files
|
||||
cp -r doublecmd.app/* $DC_APP_DIR/
|
||||
cp -a doublecmd $DC_INSTALL_DIR/
|
||||
cp -a doublecmd.help $DC_INSTALL_DIR/
|
||||
cp -a doublecmd.zdli $DC_INSTALL_DIR/
|
||||
cp -a doublecmd.ext.example $DC_INSTALL_DIR/
|
||||
cp -a pixmaps.txt $DC_INSTALL_DIR/
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ mkdir -p $DC_INSTALL_DIR/plugins/dsx/dsxlocate
|
|||
|
||||
# Copy files
|
||||
cp -a doublecmd $DC_INSTALL_DIR/
|
||||
cp -a doublecmd.help $DC_INSTALL_DIR/
|
||||
cp -a doublecmd.zdli $DC_INSTALL_DIR/
|
||||
cp -a doublecmd.ext.example $DC_INSTALL_DIR/
|
||||
cp -a pixmaps.txt $DC_INSTALL_DIR/
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ xcopy /E highlighters %DC_INSTALL_DIR%\highlighters\
|
|||
rem Copy files
|
||||
copy doc\*.txt %DC_INSTALL_DIR%\doc\
|
||||
copy doublecmd.exe %DC_INSTALL_DIR%\
|
||||
copy doublecmd.help %DC_INSTALL_DIR%\
|
||||
copy doublecmd.zdli %DC_INSTALL_DIR%\
|
||||
copy doublecmd.ext.example %DC_INSTALL_DIR%\
|
||||
copy pixmaps.txt %DC_INSTALL_DIR%\
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
-------------------------------------------------------------------------
|
||||
Help manager
|
||||
|
||||
Copyright (C) 2008 Koblov Alexander (Alexx2000@mail.ru)
|
||||
Copyright (C) 2008-2021 Alexander Koblov (alexx2000@mail.ru)
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -16,8 +16,7 @@
|
|||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
}
|
||||
|
||||
unit dmHelpManager;
|
||||
|
|
@ -58,7 +57,7 @@ uses
|
|||
{$ELSE}
|
||||
HelpIntfs,
|
||||
{$ENDIF}
|
||||
uGlobsPaths, uGlobs, DCStrUtils, DCOSUtils, StrUtils;
|
||||
uGlobsPaths, uGlobs, DCStrUtils, DCOSUtils, StrUtils, DCClassesUtf8;
|
||||
|
||||
{$IF DEFINED(MSWINDOWS)}
|
||||
procedure OpenURLWithAnchor(URL: String);
|
||||
|
|
@ -100,15 +99,25 @@ procedure TdmHelpManager.DataModuleCreate(Sender: TObject);
|
|||
var
|
||||
ABrowser, AParams: String;
|
||||
{$ENDIF}
|
||||
var
|
||||
ATranslations: TStringList;
|
||||
begin
|
||||
if NumCountChars('.', gPOFileName) < 2 then
|
||||
gHelpLang:= 'en'
|
||||
else
|
||||
else begin
|
||||
gHelpLang:= ExtractDelimited(2, gPOFileName, ['.']);
|
||||
if not mbDirectoryExists(gpExePath + 'doc' + PathDelim + gHelpLang) then
|
||||
begin
|
||||
gHelpLang:= ExtractDelimited(2, gPOFileName, ['.']);
|
||||
if not mbDirectoryExists(gpExePath + 'doc' + PathDelim + gHelpLang) then
|
||||
ATranslations:= TStringListEx.Create;
|
||||
try
|
||||
ATranslations.LoadFromFile(gpExePath + 'doublecmd.help');
|
||||
if ATranslations.IndexOf(gHelpLang) < 0 then gHelpLang:= 'en';
|
||||
except
|
||||
gHelpLang:= 'en';
|
||||
end;
|
||||
ATranslations.Free;
|
||||
end;
|
||||
end;
|
||||
|
||||
if mbDirectoryExists(gpExePath + 'doc' + PathDelim + gHelpLang) then
|
||||
HTMLHelpDatabase.BaseURL:= 'file://' + gpExePath + 'doc' + PathDelim + gHelpLang
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue