From 0f75fd5454a9c2b6d49600f0aa38b511154a60d6 Mon Sep 17 00:00:00 2001 From: maxim Date: Sat, 5 Jan 2019 14:35:40 +0000 Subject: [PATCH] Components, IDEScout: i18n-ed and added Russian translation git-svn-id: trunk@60003 - --- .gitattributes | 3 + components/idescout/frmscout.pas | 4 +- components/idescout/idescout.lpk | 6 +- components/idescout/idescout.pas | 2 +- components/idescout/idescoutoptions.lfm | 18 ++-- components/idescout/idescoutoptions.pas | 30 +++++-- components/idescout/idescoutstrconsts.pas | 33 +++++++ .../idescout/languages/idescoutstrconsts.po | 79 ++++++++++++++++ .../languages/idescoutstrconsts.ru.po | 89 +++++++++++++++++++ components/idescout/regidescout.pas | 10 ++- 10 files changed, 251 insertions(+), 23 deletions(-) create mode 100644 components/idescout/idescoutstrconsts.pas create mode 100644 components/idescout/languages/idescoutstrconsts.po create mode 100644 components/idescout/languages/idescoutstrconsts.ru.po diff --git a/.gitattributes b/.gitattributes index c389a5f60b..06b06d9eb3 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2164,6 +2164,9 @@ components/idescout/idescout.lpk svneol=native#text/plain components/idescout/idescout.pas svneol=native#text/plain components/idescout/idescoutoptions.lfm svneol=native#text/plain components/idescout/idescoutoptions.pas svneol=native#text/plain +components/idescout/idescoutstrconsts.pas svneol=native#text/pascal +components/idescout/languages/idescoutstrconsts.po svneol=native#text/plain +components/idescout/languages/idescoutstrconsts.ru.po svneol=native#text/plain components/idescout/regidescout.pas svneol=native#text/plain components/images/examples/README.txt svneol=native#text/plain components/images/examples/imagesexample.lpi svneol=native#text/plain diff --git a/components/idescout/frmscout.pas b/components/idescout/frmscout.pas index 6e531f3683..771b6ff0d1 100644 --- a/components/idescout/frmscout.pas +++ b/components/idescout/frmscout.pas @@ -35,7 +35,7 @@ interface uses Classes, SysUtils, FileUtil, LazUTF8, Forms, Controls, Graphics, Dialogs, ComponentReg, - StdCtrls, EditBtn, IDECommands, LazIDEIntf, Types, LCLType, IDEOptionsIntf, IDEOptEditorIntf; + StdCtrls, EditBtn, IDECommands, LazIDEIntf, Types, LCLType, IDEOptionsIntf, IDEOptEditorIntf, IDEScoutStrConsts; Type TScoutTerrain = (stCommands,stRecentProjects,stRecentFiles,stRecentPackages,stComponents); @@ -526,7 +526,9 @@ procedure TIDEScoutForm.FormCreate(Sender: TObject); begin FSearchItems:=TStringList.Create; FSearchItems.OwnsObjects:=True; + Caption:=isrsIDEScout; FOrgCaption:=Caption; + ESearch.TextHint:=isrsTypeSearchTerms; end; procedure TIDEScoutForm.FormDestroy(Sender: TObject); diff --git a/components/idescout/idescout.lpk b/components/idescout/idescout.lpk index ef0cc755e0..8b890c036e 100644 --- a/components/idescout/idescout.lpk +++ b/components/idescout/idescout.lpk @@ -14,7 +14,7 @@ See the ReadMe.txt included in the package for a more detailed explanation."/> - + @@ -32,6 +32,10 @@ See the ReadMe.txt included in the package for a more detailed explanation."/> + + + + diff --git a/components/idescout/idescout.pas b/components/idescout/idescout.pas index fe2083382d..7d9dc42139 100644 --- a/components/idescout/idescout.pas +++ b/components/idescout/idescout.pas @@ -8,7 +8,7 @@ unit idescout; interface uses - RegIDEScout, frmscout, IDEScoutOptions, LazarusPackageIntf; + RegIDEScout, frmscout, IDEScoutOptions, IDEScoutStrConsts, LazarusPackageIntf; implementation diff --git a/components/idescout/idescoutoptions.lfm b/components/idescout/idescoutoptions.lfm index 664100be08..d92aa54806 100644 --- a/components/idescout/idescoutoptions.lfm +++ b/components/idescout/idescoutoptions.lfm @@ -42,20 +42,20 @@ object IDEScoutOptionsFrame: TIDEScoutOptionsFrame 050000000202020202 } end - object Options: TGroupBox + object GBOptions: TGroupBox Left = 0 Height = 76 Top = 151 Width = 427 Align = alTop AutoSize = True - Caption = 'Options' + Caption = 'GBOptions' ClientHeight = 56 ClientWidth = 423 TabOrder = 1 object CBShowShortCut: TCheckBox - AnchorSideLeft.Control = Options - AnchorSideTop.Control = Options + AnchorSideLeft.Control = GBOptions + AnchorSideTop.Control = GBOptions Left = 6 Height = 19 Top = 6 @@ -66,7 +66,7 @@ object IDEScoutOptionsFrame: TIDEScoutOptionsFrame TabOrder = 0 end object CBShowCategory: TCheckBox - AnchorSideLeft.Control = Options + AnchorSideLeft.Control = GBOptions AnchorSideTop.Control = CBShowShortCut AnchorSideTop.Side = asrBottom Left = 6 @@ -80,14 +80,14 @@ object IDEScoutOptionsFrame: TIDEScoutOptionsFrame TabOrder = 1 end end - object Colors: TGroupBox + object GBColors: TGroupBox Left = 0 Height = 69 Top = 227 Width = 427 Align = alTop AutoSize = True - Caption = 'Colors' + Caption = 'GBColors' ClientHeight = 49 ClientWidth = 423 TabOrder = 2 @@ -117,8 +117,8 @@ object IDEScoutOptionsFrame: TIDEScoutOptionsFrame TabOrder = 1 end object LCBMatchColor: TLabel - AnchorSideLeft.Control = Colors - AnchorSideTop.Control = Colors + AnchorSideLeft.Control = GBColors + AnchorSideTop.Control = GBColors Left = 6 Height = 15 Top = 6 diff --git a/components/idescout/idescoutoptions.pas b/components/idescout/idescoutoptions.pas index 30916efbba..3a9e078d53 100644 --- a/components/idescout/idescoutoptions.pas +++ b/components/idescout/idescoutoptions.pas @@ -39,7 +39,7 @@ uses // LCL Forms, StdCtrls, Dialogs, Spin, ExtCtrls, ColorBox, // IdeIntf - IDEOptionsIntf, IDEOptEditorIntf, frmScout; + IDEOptionsIntf, IDEOptEditorIntf, frmScout, IDEScoutStrConsts; Type @@ -52,13 +52,13 @@ Type CBShortCutColor: TColorBox; CBShowCategory: TCheckBox; CBSelectComponent: TCheckBox; - Colors: TGroupBox; + GBColors: TGroupBox; GBComponents: TGroupBox; LSEComponentDefaultWidth: TLabel; LSEComponentDefaultHeight: TLabel; LCBShortCut: TLabel; LCBMatchColor: TLabel; - Options: TGroupBox; + GBOptions: TGroupBox; SEComponentDefaultWidth: TSpinEdit; SEComponentDefaultHeight: TSpinEdit; procedure CGSearchItemClick(Sender: TObject; Index: integer); @@ -86,14 +86,30 @@ end; function TIDEScoutOptionsFrame.GetTitle: String; begin - Result:='IDE Scout'; + Result:=isrsIDEScout; end; procedure TIDEScoutOptionsFrame.Setup(ADialog: TAbstractOptionsEditorDialog); - - begin - // Do nothing, maybe localize ? + CGSearch.Caption:=isrsSearchScope; + CGSearch.Items[0]:=isrsCommands; + CGSearch.Items[1]:=isrsRecentProjects; + CGSearch.Items[2]:=isrsRecentFiles; + CGSearch.Items[3]:=isrsRecentPackages; + CGSearch.Items[4]:=isrsComponents; + + GBOptions.Caption:=isrsOptions; + CBShowShortCut.Caption:=isrsShowShOrtcutWhenAvailable; + CBShowCategory.Caption:=isrsShowCategoryWhenAvailable; + + GBColors.Caption:=isrsColors; + LCBMatchColor.Caption:=isrsMatches; + LCBShortCut.Caption:=isrsShortcut; + + GBComponents.Caption:=isrsComponents; + CBSelectComponent.Caption:=isrsOnlySelectOnComponentPalette; + LSEComponentDefaultWidth.Caption:=isrsDefaultWidth; + LSEComponentDefaultHeight.Caption:=isrsDefaultHeight; end; procedure TIDEScoutOptionsFrame.ReadSettings(AOptions: TAbstractIDEOptions); diff --git a/components/idescout/idescoutstrconsts.pas b/components/idescout/idescoutstrconsts.pas new file mode 100644 index 0000000000..841e7f77cf --- /dev/null +++ b/components/idescout/idescoutstrconsts.pas @@ -0,0 +1,33 @@ +unit IDEScoutStrConsts; + +{$mode objfpc}{$H+} + +interface + +resourcestring + isrsShowIDEScout = 'Show IDE Scout'; + isrsShowIDEScoutMenu = 'Show IDE Scout ...'; + + isrsIDEScout = 'IDE Scout'; + isrsTypeSearchTerms = 'Type search terms'; + + isrsSearchScope = 'Search scope'; + isrsCommands = 'Commands'; + isrsRecentProjects = 'Recent Projects'; + isrsRecentFiles = 'Recent Files'; + isrsRecentPackages = 'Recent Packages'; + isrsComponents = 'Components'; + isrsOnlySelectOnComponentPalette = 'Only select on component palette'; + isrsDefaultWidth = 'Default width'; + isrsDefaultHeight = 'Default height'; + isrsOptions = 'Options'; + isrsShowShOrtcutWhenAvailable = 'Show Sh&ortcut when available'; + isrsShowCategoryWhenAvailable = 'Show &Category when available'; + isrsColors = 'Colors'; + isrsMatches = '&Matches'; + isrsShortcut = '&Shortcut'; + +implementation + +end. + diff --git a/components/idescout/languages/idescoutstrconsts.po b/components/idescout/languages/idescoutstrconsts.po new file mode 100644 index 0000000000..1d3ea966b6 --- /dev/null +++ b/components/idescout/languages/idescoutstrconsts.po @@ -0,0 +1,79 @@ +msgid "" +msgstr "Content-Type: text/plain; charset=UTF-8" + +#: idescoutstrconsts.isrscolors +msgid "Colors" +msgstr "" + +#: idescoutstrconsts.isrscommands +msgid "Commands" +msgstr "" + +#: idescoutstrconsts.isrscomponents +msgid "Components" +msgstr "" + +#: idescoutstrconsts.isrsdefaultheight +msgid "Default height" +msgstr "" + +#: idescoutstrconsts.isrsdefaultwidth +msgid "Default width" +msgstr "" + +#: idescoutstrconsts.isrsidescout +msgid "IDE Scout" +msgstr "" + +#: idescoutstrconsts.isrsmatches +msgid "&Matches" +msgstr "" + +#: idescoutstrconsts.isrsonlyselectoncomponentpalette +msgid "Only select on component palette" +msgstr "" + +#: idescoutstrconsts.isrsoptions +msgid "Options" +msgstr "" + +#: idescoutstrconsts.isrsrecentfiles +msgid "Recent Files" +msgstr "" + +#: idescoutstrconsts.isrsrecentpackages +msgid "Recent Packages" +msgstr "" + +#: idescoutstrconsts.isrsrecentprojects +msgid "Recent Projects" +msgstr "" + +#: idescoutstrconsts.isrssearchscope +msgid "Search scope" +msgstr "" + +#: idescoutstrconsts.isrsshortcut +msgid "&Shortcut" +msgstr "" + +#: idescoutstrconsts.isrsshowcategorywhenavailable +msgid "Show &Category when available" +msgstr "" + +#: idescoutstrconsts.isrsshowidescout +msgid "Show IDE Scout" +msgstr "" + +#: idescoutstrconsts.isrsshowidescoutmenu +msgid "Show IDE Scout ..." +msgstr "" + +#: idescoutstrconsts.isrsshowshortcutwhenavailable +msgid "Show Sh&ortcut when available" +msgstr "" + +#: idescoutstrconsts.isrstypesearchterms +msgid "Type search terms" +msgstr "" + diff --git a/components/idescout/languages/idescoutstrconsts.ru.po b/components/idescout/languages/idescoutstrconsts.ru.po new file mode 100644 index 0000000000..ba9b3eb515 --- /dev/null +++ b/components/idescout/languages/idescoutstrconsts.ru.po @@ -0,0 +1,89 @@ +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 \n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Transfer-Encoding: 8bit\n" +"Language: ru\n" +"X-Generator: Poedit 1.7.7\n" + +#: idescoutstrconsts.isrscolors +msgid "Colors" +msgstr "Цвета" + +#: idescoutstrconsts.isrscommands +msgid "Commands" +msgstr "Команды" + +#: idescoutstrconsts.isrscomponents +msgid "Components" +msgstr "Компоненты" + +#: idescoutstrconsts.isrsdefaultheight +msgid "Default height" +msgstr "Высота по умолчанию" + +#: idescoutstrconsts.isrsdefaultwidth +msgid "Default width" +msgstr "Ширина по умолчанию" + +#: idescoutstrconsts.isrsidescout +msgid "IDE Scout" +msgstr "Исследователь IDE" + +#: idescoutstrconsts.isrsmatches +msgid "&Matches" +msgstr "&Совпадения" + +#: idescoutstrconsts.isrsonlyselectoncomponentpalette +msgid "Only select on component palette" +msgstr "Только выбирать на палитре компонентов" + +#: idescoutstrconsts.isrsoptions +msgid "Options" +msgstr "Параметры" + +#: idescoutstrconsts.isrsrecentfiles +msgid "Recent Files" +msgstr "Недавние файлы" + +#: idescoutstrconsts.isrsrecentpackages +msgid "Recent Packages" +msgstr "Недавние пакеты" + +#: idescoutstrconsts.isrsrecentprojects +msgid "Recent Projects" +msgstr "Недавние проекты" + +#: idescoutstrconsts.isrssearchscope +msgid "Search scope" +msgstr "Область поиска" + +#: idescoutstrconsts.isrsshortcut +msgid "&Shortcut" +msgstr "Комбинация к&лавиш" + +#: idescoutstrconsts.isrsshowcategorywhenavailable +msgid "Show &Category when available" +msgstr "Показывать &категорию при её наличии" + +#: idescoutstrconsts.isrsshowidescout +msgid "Show IDE Scout" +msgstr "Показать окно исследователя IDE" + +#: idescoutstrconsts.isrsshowidescoutmenu +msgid "Show IDE Scout ..." +msgstr "Показать окно исследователя IDE ..." + +#: idescoutstrconsts.isrsshowshortcutwhenavailable +msgid "Show Sh&ortcut when available" +msgstr "Показывать к&омбинацию клавиш при её наличии" + +#: idescoutstrconsts.isrstypesearchterms +msgid "Type search terms" +msgstr "Введите ключевые слова для поиска" + diff --git a/components/idescout/regidescout.pas b/components/idescout/regidescout.pas index b896aceb8e..eecba099ba 100644 --- a/components/idescout/regidescout.pas +++ b/components/idescout/regidescout.pas @@ -35,13 +35,13 @@ interface uses // IdeIntf - IDEOptionsIntf, IDEOptEditorIntf, IDEUtils, Classes, SysUtils; + IDEOptionsIntf, IDEOptEditorIntf, Classes, SysUtils; Procedure Register; implementation -uses IDEScoutOptions,forms, graphics,lcltype,idecommands,toolbarintf, idewindowintf, menuintf, frmscout; +uses IDEScoutOptions,forms, graphics,lcltype,idecommands,toolbarintf, idewindowintf, menuintf, frmscout, IDEScoutStrConsts; Procedure IdeMenuClicked(Sender : TObject); @@ -72,14 +72,16 @@ begin IDECommandCategory := IDECommandList.FindCategoryByName(CommandCategoryViewName); if IDECommandCategory <> nil then begin - IDECommand := RegisterIDECommand(IDECommandCategory, 'IDEScout', 'Open IDE Scout', + IDECommand := RegisterIDECommand(IDECommandCategory, 'IDEScout', + isrsShowIDEScout, IDEShortCutX, nil, @IDEMenuClicked); if IDECommand <> nil then RegisterIDEButtonCommand(IDECommand); end; IDEScoutOptionsFrameID:=RegisterIDEOptionsEditor(GroupEnvironment,TIDEScoutOptionsFrame, IDEScoutOptionsFrameID)^.Index; - RegisterIDEMenuCommand(itmViewIDEInternalsWindows, 'IDEScout', 'Open IDE Scout', nil, + RegisterIDEMenuCommand(itmViewIDEInternalsWindows, 'IDEScout', + isrsShowIDEScoutMenu, nil, @IDEMenuClicked,IDECommand); IDEWindowCreators.Add('IDEScout',@CreateScoutWindow,nil,'40%','10%','+500','+240'); end;