LHelp: i18n and initial Hungarian translation, based on patch by Péter Gábor, bug #27576; also added Russian translation

git-svn-id: trunk@48106 -
This commit is contained in:
maxim 2015-03-02 21:48:44 +00:00
parent 459b8abc10
commit 2951a43270
12 changed files with 655 additions and 56 deletions

4
.gitattributes vendored
View File

@ -663,6 +663,9 @@ components/chmhelp/lhelp/images/lhelp32.png -text
components/chmhelp/lhelp/images/table_close.png -text
components/chmhelp/lhelp/images/table_item.png -text
components/chmhelp/lhelp/images/table_open.png -text
components/chmhelp/lhelp/languages/lhelp.hu.po svneol=native#text/plain
components/chmhelp/lhelp/languages/lhelp.po svneol=native#text/plain
components/chmhelp/lhelp/languages/lhelp.ru.po svneol=native#text/plain
components/chmhelp/lhelp/lhelp.app/Contents/Info.plist svneol=native#text/plain
components/chmhelp/lhelp/lhelp.app/Contents/MacOS/lhelp -text svneol=unset#application/octet-stream
components/chmhelp/lhelp/lhelp.app/Contents/PkgInfo svneol=native#text/plain
@ -672,6 +675,7 @@ components/chmhelp/lhelp/lhelp.lpr svneol=native#text/plain
components/chmhelp/lhelp/lhelp.res -text
components/chmhelp/lhelp/lhelpcore.lfm svneol=native#text/plain
components/chmhelp/lhelp/lhelpcore.pas svneol=native#text/plain
components/chmhelp/lhelp/lhelpstrconsts.pas svneol=native#text/pascal
components/chmhelp/lhelp/lnethttpdataprovider.pas svneol=native#text/plain
components/chmhelp/packages/help/Makefile svneol=native#text/plain
components/chmhelp/packages/help/Makefile.compiled svneol=native#text/plain

View File

@ -25,7 +25,8 @@ interface
uses
Classes, SysUtils, Laz2_XMLCfg,
LCLIntf, FileUtil, Forms, StdCtrls, ExtCtrls, ComCtrls, Controls, Menus,
BaseContentProvider, FileContentProvider, IpHtml, ChmReader, ChmDataProvider;
BaseContentProvider, FileContentProvider, IpHtml, ChmReader, ChmDataProvider,
lhelpstrconsts;
type
@ -361,7 +362,7 @@ var
Time: String;
begin
if (fChms = nil) and (AChm = nil) then exit;
fStatusBar.SimpleText :='Loading: '+Uri;
fStatusBar.SimpleText := Format(slhelp_Loading, [Uri]);
Application.ProcessMessages;
StartTime := Now;
@ -373,7 +374,7 @@ begin
if fChms.ObjectExists(FilteredURL, AChm) = 0 then
begin
fStatusBar.SimpleText := URI + ' not found!';
fStatusBar.SimpleText := Format(slhelp_NotFound, [URI]);
Exit;
end;
if (Pos('ms-its', Uri) = 0) and (AChm <> nil) then
@ -395,7 +396,7 @@ begin
EndTime := Now;
Time := INtToStr(DateTimeToTimeStamp(EndTime).Time - DateTimeToTimeStamp(StartTime).Time);
fStatusBar.SimpleText :='Loaded: '+Uri+' in '+ Time+'ms';
fStatusBar.SimpleText := Format(slhelp_LoadedInMs, [Uri, Time]);
end
else
@ -486,8 +487,8 @@ end;
procedure TChmContentProvider.QueueFillToc(AChm: TChmReader);
begin
fContentsTree.Visible := False;
fContentsPanel.Caption := 'Table of Contents Loading. Please Wait ...';
fStatusBar.SimpleText:= 'Table of Contents Loading ...';
fContentsPanel.Caption := slhelp_TableOfContentsLoadingPleaseWait;
fStatusBar.SimpleText := slhelp_TableOfContentsLoading;
Application.ProcessMessages;
Application.QueueAsyncCall(@FillToc, PtrInt(AChm));
end;
@ -574,7 +575,7 @@ begin
{$ENDIF}
if SM <> nil then
begin
fStatusBar.SimpleText:= 'Index Loading ...';
fStatusBar.SimpleText := slhelp_IndexLoading;
Application.ProcessMessages;
with TContentsFiller.Create(fIndexView, SM, @fStopTimer, CHMReader) do
begin
@ -992,7 +993,7 @@ begin
if (Length(DocURL) > 0) and (DocURL[1] <> '/') then
Insert('/', DocURL, 1);
if DocTitle = '' then
DocTitle := 'untitled';
DocTitle := slhelp_Untitled;
Item := TContentTreeNode(fSearchResults.Items.Add(Item, DocTitle));
Item.Data:= fChms.Chm[i];
Item.Url:= DocURL;
@ -1011,7 +1012,7 @@ begin
if fSearchResults.Items.Count = 0 then
begin
fSearchResults.Items.Add(nil, 'No Results');
fSearchResults.Items.Add(nil, slhelp_NoResults);
end;
fSearchResults.EndUpdate;
end;
@ -1157,7 +1158,7 @@ begin
fContentsTab := TTabSheet.Create(fTabsControl);
with fContentsTab do
begin
Caption := 'Contents';
Caption := slhelp_Contents;
Parent := fTabsControl;
//BorderSpacing.Around := 6;
end;
@ -1189,7 +1190,7 @@ begin
fIndexTab := TTabSheet.Create(fTabsControl);
with fIndexTab do
begin
Caption := 'Index';
Caption := slhelp_Index;
Parent := fTabsControl;
//BorderSpacing.Around := 6;
end;
@ -1204,7 +1205,7 @@ begin
AnchorSide[akRight].Control := fIndexTab;
AnchorSide[akRight].Side := asrBottom;
AnchorSide[akTop].Control := fIndexTab;
EditLabel.Caption := 'Search';
EditLabel.Caption := slhelp_Search;
EditLabel.AutoSize := True;
LabelPosition := lpAbove;
OnChange := @SearchEditChange;
@ -1240,7 +1241,7 @@ begin
fSearchTab := TTabSheet.Create(fTabsControl);
with fSearchTab do
begin
Caption := 'Search';
Caption := slhelp_Search;
Parent := fTabsControl;
end;
fKeywordLabel := TLabel.Create(fSearchTab);
@ -1248,7 +1249,7 @@ begin
begin
Parent := fSearchTab;
Top := 6;
Caption := 'Keyword:';
Caption := slhelp_Keyword;
Left := 6;
AutoSize := True;
end;
@ -1275,7 +1276,7 @@ begin
AnchorSide[akLeft].Control := fSearchTab;
AnchorSide[akTop].Control := fKeywordCombo;
AnchorSide[akTop].Side := asrBottom;
Caption := 'Find';
Caption := slhelp_Find;
OnClick := @SearchButtonClick;
end;
fResultsLabel := TLabel.Create(fSearchTab);
@ -1289,7 +1290,7 @@ begin
AnchorSide[akRight].Side := asrBottom;
AnchorSide[akTop].Control := fSearchBtn;
AnchorSide[akTop].Side := asrBottom;
Caption := 'Search Results:';
Caption := slhelp_SearchResults;
AutoSize := True;
end;
fSearchResults := TTreeView.Create(fSearchTab);
@ -1345,7 +1346,7 @@ begin
fPopUp.Items.Add(TMenuItem.Create(fPopup));
with fPopUp.Items.Items[0] do
begin
Caption := 'Copy';
Caption := slhelp_Copy;
OnClick := @PopupCopyClick;
end;
fHtml.PopupMenu := fPopUp;

View File

@ -26,7 +26,8 @@ uses
FPReadpng,
FPWritebmp,
FPWritePNG,
IntFGraphics;
IntFGraphics,
lhelpstrconsts;
type
@ -84,13 +85,15 @@ end;
function TIpChmDataProvider.DoGetHtmlStream(const URL: string;
PostData: TIpFormDataEntity): TStream;
var Tmp:string;
begin
Result := fChm.GetObject(StripInPageLink(URL));
// If for some reason we were not able to get the page return something so that
// we don't cause an AV
if Result = nil then begin
Result := TMemoryStream.Create;
Result.Write('<HTML>Page cannot be found!</HTML>',33);
Tmp := '<HTML>' + slhelp_PageCannotBeFound + '</HTML>';
Result.Write(Tmp,Length(tmp));
end;
if Assigned(FOnGetHtmlPage) then
FOnGetHtmlPage(Result);

View File

@ -6,7 +6,7 @@ interface
uses
Classes, SysUtils, BaseContentProvider, LNetHTTPDataProvider, IpHtml, ComCtrls,
Menus, Controls;
Menus, Controls, lhelpstrconsts;
type
@ -75,7 +75,7 @@ function THTTPContentProvider.LoadURL(const AURL: String;
const AContext: THelpContext): Boolean;
begin
Result:=True;
SetTitle('Loading : ' + AURL );
SetTitle(Format(slhelp_Loading, [AURL]) );
//WriteLn('Loading URL:', AURL);
fHtml.OpenURL(AURL);
SetTitle(AURL);
@ -110,7 +110,7 @@ begin
fPopUp := TPopupMenu.Create(fHtml);
fPopUp.Items.Add(TMenuItem.Create(fPopup));
with fPopUp.Items.Items[0] do begin
Caption := 'Copy';
Caption := slhelp_Copy;
OnClick := @PopupCopyClick;
end;

View File

@ -0,0 +1,180 @@
msgid ""
msgstr ""
"Language-Team: Magyar (Hungarian)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: hu\n"
"Project-Id-Version: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: Péter Gábor <ptrg@freemail.hu>\n"
"X-Generator: Poedit 1.5.4\n"
#: lhelpstrconsts.slhelp_about
msgid "About"
msgstr "Névjegy"
#: lhelpstrconsts.slhelp_about2
msgid "&About ..."
msgstr ""
#: lhelpstrconsts.slhelp_cannothandlethistypeofcontentforurl
msgid "Cannot handle this type of content. \"%s\" for url:%s%s"
msgstr "Nem kezelhetők az ilyen típusú tartalmak. \"%s\" a következő url-en:%s%s"
#: lhelpstrconsts.slhelp_cannothandlethistypeofsubcontentforurl
msgid "Cannot handle this type of subcontent. \"%s\" for url:%s%s"
msgstr "Nem kezelhetők az ilyen típusú altartalmak. \"%s\" a következő url-en:%s%s"
#: lhelpstrconsts.slhelp_closeall
msgid "&Close All"
msgstr ""
#: lhelpstrconsts.slhelp_contents
msgid "Contents"
msgstr "Tartalom"
#: lhelpstrconsts.slhelp_contextshowthehelpinformationrelatedtothiscontext
msgid " --context : Show the help information related to this context"
msgstr " --context : Megjeleníti az azonosítóhoz tartozó súgót"
#: lhelpstrconsts.slhelp_copy
msgid "Copy"
msgstr "Másolás"
#: lhelpstrconsts.slhelp_exit
msgid "E&xit"
msgstr ""
#: lhelpstrconsts.slhelp_file
msgid "&File"
msgstr ""
#: lhelpstrconsts.slhelp_find
msgid "Find"
msgstr "Keresés"
#: lhelpstrconsts.slhelp_help
msgid "&Help"
msgstr ""
#: lhelpstrconsts.slhelp_helpshowthisinformation
msgid " --help : Show this information"
msgstr " --help : Megjeleníti ezt a súgót"
#: lhelpstrconsts.slhelp_hidestarthiddenbutacceptcommunicationsviaipc
msgid " --hide : Start hidden but accept communications via IPC"
msgstr " --hide : Rejtve indul, de fogadja az IPC kéréseket"
#: lhelpstrconsts.slhelp_index
msgid "Index"
msgstr "Index"
#: lhelpstrconsts.slhelp_indexloading
msgid "Index Loading ..."
msgstr "Index betöltése ..."
#: lhelpstrconsts.slhelp_ipcnamethenameoftheipcservertolistenonforprogramsw
#, fuzzy
#| msgid " --ipcname : The name of the IPC server to listen on for programs who wish to control the viewer"
msgid " --ipcname : The name of the IPC server to listen on for%s programs who wish to control the viewer"
msgstr " --ipcname : Az IPC kiszolgáló neve, amely a megjelenítőt vezérelni szándékozó programok kéréseit várja"
#: lhelpstrconsts.slhelp_keyword
msgid "Keyword:"
msgstr "Kulcsszó:"
#: lhelpstrconsts.slhelp_lhelp
msgctxt "lhelpstrconsts.slhelp_lhelp"
msgid "LHelp"
msgstr "LHelp"
#: lhelpstrconsts.slhelp_lhelp2
msgid "LHelp - %s"
msgstr "LHelp - %s"
#: lhelpstrconsts.slhelp_lhelpchmfileviewerversioncopyrightcandrewhaineslaz
msgid "LHelp (CHM file viewer)%sVersion %s%sCopyright (C) Andrew Haines, %sLazarus contributors"
msgstr "LHelp (CHM megjelenítő)%sVáltozat: %s%sCopyright (C) Andrew Haines, %sLazarus közreműködők"
#: lhelpstrconsts.slhelp_lhelpoptions
msgid " LHelp options:"
msgstr " LHelp kapcsolók:"
#: lhelpstrconsts.slhelp_loadedinms
msgid "Loaded: %s in %sms"
msgstr "Betöltve: %s (%s ms)"
#: lhelpstrconsts.slhelp_loading
msgid "Loading: %s"
msgstr "Betöltés: %s"
#: lhelpstrconsts.slhelp_noresults
msgid "No Results"
msgstr "Nincs találat."
#: lhelpstrconsts.slhelp_notfound
msgid "%s not found!"
msgstr "A(z) %s nem található!"
#: lhelpstrconsts.slhelp_ok
msgid "Ok"
msgstr "Ok"
#: lhelpstrconsts.slhelp_open
msgid "&Open ..."
msgstr ""
#: lhelpstrconsts.slhelp_openrecent
msgid "Open Recent"
msgstr ""
#: lhelpstrconsts.slhelp_openurl
msgid "Open &URL ..."
msgstr ""
#: lhelpstrconsts.slhelp_pagecannotbefound
msgid "Page cannot be found!"
msgstr "Az oldal nem tölthető be!"
#: lhelpstrconsts.slhelp_pleaseenteraurl
msgid "Please enter a URL"
msgstr "Adjon meg egy URL-t!"
#: lhelpstrconsts.slhelp_search
msgid "Search"
msgstr "Keresés"
#: lhelpstrconsts.slhelp_searchresults
msgid "Search Results:"
msgstr "Keresési eredmények:"
#: lhelpstrconsts.slhelp_showcontents
msgid "Show contents"
msgstr ""
#: lhelpstrconsts.slhelp_supportedurltypes
msgid "Supported URL type(s): (%s)"
msgstr "Támogatott URL típus(ok): (%s)"
#: lhelpstrconsts.slhelp_tableofcontentsloading
msgid "Table of Contents Loading ..."
msgstr "Tartalomjegyzék betöltése ..."
#: lhelpstrconsts.slhelp_tableofcontentsloadingpleasewait
msgid "Table of Contents Loading. Please Wait ..."
msgstr "Tartalomjegyzék betöltése. Kis türelmet ..."
#: lhelpstrconsts.slhelp_untitled
msgid "untitled"
msgstr "névtelen"
#: lhelpstrconsts.slhelp_usagelhelpfilenamecontextidhideipcnamelhelpmyapp
msgid " Usage: lhelp [[filename] [--context id] [--hide] [--ipcname lhelp-myapp]]"
msgstr " Használat: lhelp [[fájlnév] [--context azonosító] [--hide] [--ipcname lhelp-alkalmazásom]]"
#: lhelpstrconsts.slhelp_view
msgid "&View"
msgstr ""

View File

@ -0,0 +1,167 @@
msgid ""
msgstr "Content-Type: text/plain; charset=UTF-8"
#: lhelpstrconsts.slhelp_about
msgid "About"
msgstr ""
#: lhelpstrconsts.slhelp_about2
msgid "&About ..."
msgstr ""
#: lhelpstrconsts.slhelp_cannothandlethistypeofcontentforurl
msgid "Cannot handle this type of content. \"%s\" for url:%s%s"
msgstr ""
#: lhelpstrconsts.slhelp_cannothandlethistypeofsubcontentforurl
msgid "Cannot handle this type of subcontent. \"%s\" for url:%s%s"
msgstr ""
#: lhelpstrconsts.slhelp_closeall
msgid "&Close All"
msgstr ""
#: lhelpstrconsts.slhelp_contents
msgid "Contents"
msgstr ""
#: lhelpstrconsts.slhelp_contextshowthehelpinformationrelatedtothiscontext
msgid " --context : Show the help information related to this context"
msgstr ""
#: lhelpstrconsts.slhelp_copy
msgid "Copy"
msgstr ""
#: lhelpstrconsts.slhelp_exit
msgid "E&xit"
msgstr ""
#: lhelpstrconsts.slhelp_file
msgid "&File"
msgstr ""
#: lhelpstrconsts.slhelp_find
msgid "Find"
msgstr ""
#: lhelpstrconsts.slhelp_help
msgid "&Help"
msgstr ""
#: lhelpstrconsts.slhelp_helpshowthisinformation
msgid " --help : Show this information"
msgstr ""
#: lhelpstrconsts.slhelp_hidestarthiddenbutacceptcommunicationsviaipc
msgid " --hide : Start hidden but accept communications via IPC"
msgstr ""
#: lhelpstrconsts.slhelp_index
msgid "Index"
msgstr ""
#: lhelpstrconsts.slhelp_indexloading
msgid "Index Loading ..."
msgstr ""
#: lhelpstrconsts.slhelp_ipcnamethenameoftheipcservertolistenonforprogramsw
msgid " --ipcname : The name of the IPC server to listen on for%s programs who wish to control the viewer"
msgstr ""
#: lhelpstrconsts.slhelp_keyword
msgid "Keyword:"
msgstr ""
#: lhelpstrconsts.slhelp_lhelp
msgid "LHelp"
msgstr ""
#: lhelpstrconsts.slhelp_lhelp2
msgid "LHelp - %s"
msgstr ""
#: lhelpstrconsts.slhelp_lhelpchmfileviewerversioncopyrightcandrewhaineslaz
msgid "LHelp (CHM file viewer)%sVersion %s%sCopyright (C) Andrew Haines, %sLazarus contributors"
msgstr ""
#: lhelpstrconsts.slhelp_lhelpoptions
msgid " LHelp options:"
msgstr ""
#: lhelpstrconsts.slhelp_loadedinms
msgid "Loaded: %s in %sms"
msgstr ""
#: lhelpstrconsts.slhelp_loading
msgid "Loading: %s"
msgstr ""
#: lhelpstrconsts.slhelp_noresults
msgid "No Results"
msgstr ""
#: lhelpstrconsts.slhelp_notfound
msgid "%s not found!"
msgstr ""
#: lhelpstrconsts.slhelp_ok
msgid "Ok"
msgstr ""
#: lhelpstrconsts.slhelp_open
msgid "&Open ..."
msgstr ""
#: lhelpstrconsts.slhelp_openrecent
msgid "Open Recent"
msgstr ""
#: lhelpstrconsts.slhelp_openurl
msgid "Open &URL ..."
msgstr ""
#: lhelpstrconsts.slhelp_pagecannotbefound
msgid "Page cannot be found!"
msgstr ""
#: lhelpstrconsts.slhelp_pleaseenteraurl
msgid "Please enter a URL"
msgstr ""
#: lhelpstrconsts.slhelp_search
msgid "Search"
msgstr ""
#: lhelpstrconsts.slhelp_searchresults
msgid "Search Results:"
msgstr ""
#: lhelpstrconsts.slhelp_showcontents
msgid "Show contents"
msgstr ""
#: lhelpstrconsts.slhelp_supportedurltypes
msgid "Supported URL type(s): (%s)"
msgstr ""
#: lhelpstrconsts.slhelp_tableofcontentsloading
msgid "Table of Contents Loading ..."
msgstr ""
#: lhelpstrconsts.slhelp_tableofcontentsloadingpleasewait
msgid "Table of Contents Loading. Please Wait ..."
msgstr ""
#: lhelpstrconsts.slhelp_untitled
msgid "untitled"
msgstr ""
#: lhelpstrconsts.slhelp_usagelhelpfilenamecontextidhideipcnamelhelpmyapp
msgid " Usage: lhelp [[filename] [--context id] [--hide] [--ipcname lhelp-myapp]]"
msgstr ""
#: lhelpstrconsts.slhelp_view
msgid "&View"
msgstr ""

View File

@ -0,0 +1,176 @@
msgid ""
msgstr ""
"Content-Type: text/plain; charset=UTF-8\n"
"Project-Id-Version: \n"
"POT-Creation-Date: \n"
"PO-Revision-Date: \n"
"Last-Translator: Maxim Ganetsky <maxkill@mail.ru>\n"
"Language-Team: \n"
"MIME-Version: 1.0\n"
"Content-Transfer-Encoding: 8bit\n"
#: lhelpstrconsts.slhelp_about
msgid "About"
msgstr "О программе"
#: lhelpstrconsts.slhelp_about2
msgid "&About ..."
msgstr "&О программе ..."
#: lhelpstrconsts.slhelp_cannothandlethistypeofcontentforurl
msgid "Cannot handle this type of content. \"%s\" for url:%s%s"
msgstr "Невозможно обработать данный тип содержимого. \"%s\" для адреса:%s%s"
#: lhelpstrconsts.slhelp_cannothandlethistypeofsubcontentforurl
msgid "Cannot handle this type of subcontent. \"%s\" for url:%s%s"
msgstr "Невозможно обработать данный тип содержимого. \"%s\" для адреса:%s%s"
#: lhelpstrconsts.slhelp_closeall
msgid "&Close All"
msgstr "Закрыть &всё"
#: lhelpstrconsts.slhelp_contents
msgid "Contents"
msgstr "Содержание"
#: lhelpstrconsts.slhelp_contextshowthehelpinformationrelatedtothiscontext
msgid " --context : Show the help information related to this context"
msgstr " --context : Вывести справку по данному контексту"
#: lhelpstrconsts.slhelp_copy
msgid "Copy"
msgstr "Копировать"
#: lhelpstrconsts.slhelp_exit
msgid "E&xit"
msgstr "В&ыход"
#: lhelpstrconsts.slhelp_file
msgid "&File"
msgstr "&Файл"
#: lhelpstrconsts.slhelp_find
msgid "Find"
msgstr "Найти"
#: lhelpstrconsts.slhelp_help
msgid "&Help"
msgstr "&Справка"
#: lhelpstrconsts.slhelp_helpshowthisinformation
msgid " --help : Show this information"
msgstr " --help : Вывести данную информацию"
#: lhelpstrconsts.slhelp_hidestarthiddenbutacceptcommunicationsviaipc
msgid " --hide : Start hidden but accept communications via IPC"
msgstr " --hide : Запуститься скрыто, но взаимодействовать по IPC"
#: lhelpstrconsts.slhelp_index
msgid "Index"
msgstr "Указатель"
#: lhelpstrconsts.slhelp_indexloading
msgid "Index Loading ..."
msgstr "Загрузка указателя ..."
#: lhelpstrconsts.slhelp_ipcnamethenameoftheipcservertolistenonforprogramsw
msgid " --ipcname : The name of the IPC server to listen on for%s programs who wish to control the viewer"
msgstr " --ipcname : Имя отслеживаемого сервера IPC для%s программ, управляющих данной программой просмотра"
#: lhelpstrconsts.slhelp_keyword
msgid "Keyword:"
msgstr "Ключевое слово:"
#: lhelpstrconsts.slhelp_lhelp
msgctxt "lhelpstrconsts.slhelp_lhelp"
msgid "LHelp"
msgstr "LHelp"
#: lhelpstrconsts.slhelp_lhelp2
msgid "LHelp - %s"
msgstr "LHelp - %s"
#: lhelpstrconsts.slhelp_lhelpchmfileviewerversioncopyrightcandrewhaineslaz
msgid "LHelp (CHM file viewer)%sVersion %s%sCopyright (C) Andrew Haines, %sLazarus contributors"
msgstr "LHelp (программа просмотра файлов CHM)%sВерсия %s%s(C) Andrew Haines, %sучастники проекта Lazarus"
#: lhelpstrconsts.slhelp_lhelpoptions
msgid " LHelp options:"
msgstr " Параметры LHelp:"
#: lhelpstrconsts.slhelp_loadedinms
msgid "Loaded: %s in %sms"
msgstr "Загружено: %s за %s мс"
#: lhelpstrconsts.slhelp_loading
msgid "Loading: %s"
msgstr "Загрузка: %s"
#: lhelpstrconsts.slhelp_noresults
msgid "No Results"
msgstr "Результаты отсутствуют"
#: lhelpstrconsts.slhelp_notfound
msgid "%s not found!"
msgstr "%s не найден!"
#: lhelpstrconsts.slhelp_ok
msgid "Ok"
msgstr "ОК"
#: lhelpstrconsts.slhelp_open
msgid "&Open ..."
msgstr "О&ткрыть ..."
#: lhelpstrconsts.slhelp_openrecent
msgid "Open Recent"
msgstr "Открыть недавний"
#: lhelpstrconsts.slhelp_openurl
msgid "Open &URL ..."
msgstr "Открыть по &адресу ..."
#: lhelpstrconsts.slhelp_pagecannotbefound
msgid "Page cannot be found!"
msgstr "Страница не найдена!"
#: lhelpstrconsts.slhelp_pleaseenteraurl
msgid "Please enter a URL"
msgstr "Введите адрес"
#: lhelpstrconsts.slhelp_search
msgid "Search"
msgstr "Поиск"
#: lhelpstrconsts.slhelp_searchresults
msgid "Search Results:"
msgstr "Результаты поиска:"
#: lhelpstrconsts.slhelp_showcontents
msgid "Show contents"
msgstr "Показывать содержание"
#: lhelpstrconsts.slhelp_supportedurltypes
msgid "Supported URL type(s): (%s)"
msgstr "Поддерживаемые типы адресов: (%s)"
#: lhelpstrconsts.slhelp_tableofcontentsloading
msgid "Table of Contents Loading ..."
msgstr "Загрузка содержания ..."
#: lhelpstrconsts.slhelp_tableofcontentsloadingpleasewait
msgid "Table of Contents Loading. Please Wait ..."
msgstr "Загрузка содержания. Подождите ..."
#: lhelpstrconsts.slhelp_untitled
msgid "untitled"
msgstr "неозаглавленный"
#: lhelpstrconsts.slhelp_usagelhelpfilenamecontextidhideipcnamelhelpmyapp
msgid " Usage: lhelp [[filename] [--context id] [--hide] [--ipcname lhelp-myapp]]"
msgstr " Использование: lhelp [[имя файла] [--context id] [--hide] [--ipcname lhelp-myapp]]"
#: lhelpstrconsts.slhelp_view
msgid "&View"
msgstr "&Вид"

View File

@ -11,6 +11,10 @@
<MainUnit Value="0"/>
<UseXPManifest Value="True"/>
</General>
<i18n>
<EnableI18N Value="True" LFM="False"/>
<OutDir Value="languages"/>
</i18n>
<BuildModes Count="2">
<Item1 Name="default" Default="True"/>
<Item2 Name="debug">
@ -73,7 +77,7 @@
<PackageName Value="LCL"/>
</Item3>
</RequiredPackages>
<Units Count="9">
<Units Count="10">
<Unit0>
<Filename Value="lhelp.lpr"/>
<IsPartOfProject Value="True"/>
@ -86,7 +90,6 @@
<Unit2>
<Filename Value="chmspecialparser.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="ChmSpecialParser"/>
</Unit2>
<Unit3>
<Filename Value="chmpopup.pas"/>
@ -100,7 +103,6 @@
<ComponentName Value="HelpForm"/>
<HasResources Value="True"/>
<ResourceBaseClass Value="Form"/>
<UnitName Value="lhelpcore"/>
</Unit4>
<Unit5>
<Filename Value="lnethttpdataprovider.pas"/>
@ -109,17 +111,20 @@
<Unit6>
<Filename Value="basecontentprovider.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="BaseContentProvider"/>
</Unit6>
<Unit7>
<Filename Value="chmcontentprovider.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="chmcontentprovider"/>
</Unit7>
<Unit8>
<Filename Value="httpcontentprovider.pas"/>
<IsPartOfProject Value="True"/>
</Unit8>
<Unit9>
<Filename Value="lhelpstrconsts.pas"/>
<IsPartOfProject Value="True"/>
<UnitName Value="lhelpstrconsts"/>
</Unit9>
</Units>
</ProjectOptions>
<CompilerOptions>

View File

@ -27,7 +27,7 @@ uses
{$ENDIF}
Interfaces, // this includes the LCL widgetset
SysUtils, Classes, Controls, Dialogs, Forms,
SimpleIPC, TurboPowerIPro, chmpopup, lhelpcontrolpkg, lhelpcore;
SimpleIPC, TurboPowerIPro, chmpopup, lhelpcontrolpkg, lhelpcore, lhelpstrconsts;
var
X: Integer;
@ -42,16 +42,14 @@ begin
if LowerCase(ParamStr(X)) = '--help' then
begin
S := TStringList.Create;
S.Add(' LHelp options:');
S.Add(slhelp_LHelpOptions);
S.Add('');
S.Add(' Usage: lhelp [[filename] [--context id] [--hide] [--ipcname lhelp-myapp]]');
S.Add(slhelp_UsageLhelpFilenameContextIdHideIpcnameLhelpMyapp);
S.Add('');
S.Add(' --help : Show this information');
S.Add(' --hide : Start hidden but accept communications via IPC');
S.Add(' --context : Show the help information related');
S.Add(' to this context');
S.Add(' --ipcname : The name of the IPC server to listen on for');
S.Add(' programs who wish to control the viewer');
S.Add(slhelp_HelpShowThisInformation);
S.Add(slhelp_HideStartHiddenButAcceptCommunicationsViaIPC);
S.Add(slhelp_ContextShowTheHelpInformationRelatedToThisContext);
S.Add(Format(slhelp_IpcnameTheNameOfTheIPCServerToListenOnForProgramsW, [LineEnding]));
if TextRec(Output).Mode = fmClosed then
MessageDlg(S.Text, mtInformation, [mbOk], 0)

View File

@ -5,7 +5,7 @@ object HelpForm: THelpForm
Width = 758
ActiveControl = Panel1
Caption = 'LHelp'
ClientHeight = 508
ClientHeight = 515
ClientWidth = 758
Icon.Data = {
7E04000000000100010010100000010020006804000016000000280000001000
@ -238,7 +238,7 @@ object HelpForm: THelpForm
end
object PageControl: TPageControl
Left = 0
Height = 476
Height = 483
Top = 32
Width = 758
Align = alClient
@ -306,7 +306,7 @@ object HelpForm: THelpForm
end
object ImageList1: TImageList
left = 80
top = 80
top = 75
Bitmap = {
4C690400000010000000100000007001E300B0CE2A000000000000000000F609
0200E1281B00005959000090AF00329FCCFF75888800003A3A00000E0E00FA11

View File

@ -39,8 +39,8 @@ uses
Classes, SysUtils, SimpleIPC, Laz2_XMLCfg,
FileUtil, Forms, Controls, Dialogs,
Buttons, LCLProc, ComCtrls, ExtCtrls, Menus, LCLType, LCLIntf, StdCtrls,
BaseContentProvider, ChmContentProvider
{$IFDEF USE_LNET}, HTTPContentProvider{$ENDIF},
BaseContentProvider, ChmContentProvider, lhelpstrconsts, DefaultTranslator,
{$IFDEF USE_LNET}, HTTPContentProvider{$ENDIF}
lazlogger;
type
@ -198,7 +198,7 @@ var
begin
f := TForm.Create(Application);
try
f.Caption := 'About';
f.Caption := slhelp_About;
f.BorderStyle := bsDialog;
f.Position := poMainFormCenter;
f.Constraints.MinWidth := 150;
@ -207,13 +207,10 @@ begin
l.Parent := f;;
l.Align := alTop;
l.BorderSpacing.Around := 6;
l.Caption := 'LHelp (CHM file viewer)' + LineEnding +
'Version ' + VERSION_STAMP + LineEnding +
LineEnding +
'Copyright (C) Andrew Haines, ' + LineEnding +
'Lazarus contributors';
l.Caption := Format(slhelp_LHelpCHMFileViewerVersionCopyrightCAndrewHainesLaz, [LineEnding, VERSION_STAMP, LineEnding +
LineEnding, LineEnding]);
l.AutoSize := True;
l.WordWrap := True;
//l.WordWrap := True; {don't wrap author's name}
b := TButton.Create(f);
b.Parent := f;
b.BorderSpacing.Around := 6;
@ -222,7 +219,7 @@ begin
b.AnchorSide[akTop].Side := asrBottom;
b.AnchorSide[akLeft].Control := f;
b.AnchorSide[akLeft].Side := asrCenter;
b.Caption := 'Ok';
b.Caption := slhelp_Ok;
b.ModalResult := mrOk;
f.AutoSize := False;
f.AutoSize := True;
@ -300,8 +297,8 @@ begin
URLSAllowed := Trim(URLSAllowed);
fRes:='';
if InputQuery('Please enter a URL',
'Supported URL type(s): (' +URLSAllowed+ ')', fRes) then
if InputQuery(slhelp_PleaseEnterAURL,
Format(slhelp_SupportedURLTypeS, [URLSAllowed]), fRes) then
begin
if OpenURL(fRes) = ord(srSuccess) then
AddRecentFile(fRes);
@ -320,6 +317,17 @@ end;
procedure THelpForm.FormCreate(Sender: TObject);
begin
FileMenuItem.Caption := slhelp_File;
FileMenuOpenItem.Caption := slhelp_Open;
FileMenuOpenRecentItem.Caption := slhelp_OpenRecent;
FileMenuOpenURLItem.Caption := slhelp_OpenURL;
FileMenuCloseItem.Caption := slhelp_CloseAll;
FileMenuExitItem.Caption := slhelp_EXit;
ViewMenuItem.Caption := slhelp_View;
ViewMenuContents.Caption := slhelp_ShowContents;
HelpMenuItem.Caption := slhelp_Help;
AboutItem.Caption := slhelp_About2;
fContext := -1;
// Safe default:
fHide := false;
@ -503,7 +511,7 @@ procedure THelpForm.ContentTitleChange(sender: TObject);
begin
if ActivePage = nil then
Exit;
Caption := 'LHelp - ' + ActivePage.fContentProvider.Title;
Caption := Format(slhelp_LHelp2, [ActivePage.fContentProvider.Title]);
end;
procedure THelpForm.OpenRecentItemClick(Sender: TObject);
@ -809,7 +817,7 @@ begin
if fContentProvider = nil then
begin
ShowError('Cannot handle this type of content. "' + fURLPrefix + '" for url:'+LineEnding+AURL);
ShowError(Format(slhelp_CannotHandleThisTypeOfContentForUrl, [fURLPrefix, LineEnding, AURL]));
Result := Ord(srInvalidURL);
Exit;
end;
@ -817,7 +825,7 @@ begin
if fRealContentProvider = nil then
begin
ShowError('Cannot handle this type of subcontent. "' + fURLPrefix + '" for url:'+LineEnding+AURL);
ShowError(Format(slhelp_CannotHandleThisTypeOfSubcontentForUrl, [fURLPrefix, LineEnding, AURL]));
Result := Ord(srInvalidURL);
Exit;
end;
@ -925,9 +933,9 @@ begin
ViewMenuContents.Enabled := en;
if en and not (csDestroying in ActivePage.ComponentState) then
Caption := 'LHelp - ' + ActivePage.fContentProvider.Title
Caption := Format(slhelp_LHelp2, [ActivePage.fContentProvider.Title])
else
Caption := 'LHelp';
Caption := slhelp_LHelp;
end;
procedure THelpForm.ShowError(AError: String);

View File

@ -0,0 +1,57 @@
unit lhelpstrconsts;
{$mode objfpc}{$H+}
interface
resourcestring
// GUI
slhelp_About = 'About';
slhelp_LHelpCHMFileViewerVersionCopyrightCAndrewHainesLaz = 'LHelp (CHM file viewer)%sVersion %s%sCopyright (C) Andrew Haines, %sLazarus contributors';
slhelp_Ok = 'Ok';
slhelp_PleaseEnterAURL = 'Please enter a URL';
slhelp_SupportedURLTypeS = 'Supported URL type(s): (%s)';
slhelp_File = '&File';
slhelp_Open = '&Open ...';
slhelp_OpenRecent = 'Open Recent';
slhelp_OpenURL = 'Open &URL ...';
slhelp_CloseAll = '&Close All';
slhelp_EXit = 'E&xit';
slhelp_View = '&View';
slhelp_ShowContents = 'Show contents';
slhelp_Help = '&Help';
slhelp_About2 = '&About ...';
slhelp_LHelp = 'LHelp';
slhelp_LHelp2 = 'LHelp - %s';
slhelp_CannotHandleThisTypeOfContentForUrl = 'Cannot handle this type of content. "%s" for url:%s%s';
slhelp_CannotHandleThisTypeOfSubcontentForUrl = 'Cannot handle this type of subcontent. "%s" for url:%s%s';
slhelp_Loading = 'Loading: %s';
slhelp_NotFound = '%s not found!';
slhelp_LoadedInMs = 'Loaded: %s in %sms';
slhelp_TableOfContentsLoadingPleaseWait = 'Table of Contents Loading. Please Wait ...';
slhelp_TableOfContentsLoading = 'Table of Contents Loading ...';
slhelp_IndexLoading = 'Index Loading ...';
slhelp_Untitled = 'untitled';
slhelp_NoResults = 'No Results';
slhelp_Contents = 'Contents';
slhelp_Index = 'Index';
slhelp_Search = 'Search';
slhelp_Keyword = 'Keyword:';
slhelp_Find = 'Find';
slhelp_SearchResults = 'Search Results:';
slhelp_Copy = 'Copy';
slhelp_PageCannotBeFound = 'Page cannot be found!';
// --help
slhelp_LHelpOptions = ' LHelp options:';
slhelp_UsageLhelpFilenameContextIdHideIpcnameLhelpMyapp = ' Usage: lhelp [[filename] [--context id] [--hide] [--ipcname lhelp-myapp]]';
slhelp_HelpShowThisInformation = ' --help : Show this information';
slhelp_HideStartHiddenButAcceptCommunicationsViaIPC = ' --hide : Start hidden but accept communications via IPC';
slhelp_ContextShowTheHelpInformationRelatedToThisContext = ' --context : Show the help information related to this context';
slhelp_IpcnameTheNameOfTheIPCServerToListenOnForProgramsW = ' --ipcname : The name of the IPC server to listen on for%s programs who wish to control the viewer';
implementation
end.