From d4afc92965408480f76698d5a56304e38c0cf1fe Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Wed, 29 Jan 2014 16:06:04 +0000 Subject: LangPackMgr tool update (by Jerbifor) git-svn-id: http://svn.miranda-ng.org/main/trunk@7950 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- tools/langpackmgr/Unit1.pas | 49 +++++++++++++++++++++- tools/langpackmgr/clear.bat | 5 +++ tools/langpackmgr/langpackmgr.lpi | 2 +- tools/langpackmgr/langpackmgr.lps | 84 +++++++++++++++++++------------------- tools/langpackmgr/strip.exe | Bin 0 -> 286720 bytes tools/langpackmgr/unit1.lfm | 33 +++++++++------ 6 files changed, 117 insertions(+), 56 deletions(-) create mode 100644 tools/langpackmgr/clear.bat create mode 100644 tools/langpackmgr/strip.exe (limited to 'tools') diff --git a/tools/langpackmgr/Unit1.pas b/tools/langpackmgr/Unit1.pas index eab1fdc20e..05329e9287 100644 --- a/tools/langpackmgr/Unit1.pas +++ b/tools/langpackmgr/Unit1.pas @@ -17,6 +17,7 @@ type button4: tbutton; Button5: TButton; Button6: TButton; + Button7: TButton; CheckListBox1: TCheckListBox; Edit1: TEdit; Edit2: TEdit; @@ -33,6 +34,7 @@ type procedure Button4Click(Sender: TObject); procedure Button5Click(Sender: TObject); procedure Button6Click(Sender: TObject); + procedure Button7Click(Sender: TObject); procedure combobox1change(sender: tobject); procedure ComboBox2Change(Sender: TObject); procedure formcreate(sender: tobject); @@ -106,6 +108,7 @@ begin button2.visible:=false; button3.visible:=false; button4.visible:=false; + button7.visible:=false; label1.visible:=false; radiogroup1.visible:=false; edit1.visible:=true; @@ -119,7 +122,7 @@ end; procedure tform1.FormResize(Sender: TObject); begin combobox2.Left:=form1.Width-78; - label1.left:=form1.Width-140; + label1.left:=form1.Width-150; button1.Left:=form1.width-48; memo1.Width:=form1.Width-140; memo2.Width:=form1.Width-140; @@ -128,6 +131,7 @@ begin button2.top:=form1.Height-25; button3.top:=form1.Height-25; button4.top:=form1.Height-25; + button7.top:=form1.Height-25; listbox.height:=form1.Height-42; memo1.Height:=Trunc((form1.Height-80)/2); @@ -421,6 +425,49 @@ begin end; end; +procedure tform1.Button7Click(Sender: TObject); + var search:TStringList; r:integer; +begin +if (form1.caption<>'Miranda NG Langpack Tools: Editor') +then + begin +if listbox.itemindexlocale) then + begin + search.LoadFromFile(extractfilepath(application.exename)+ + '/'+trlang[i]+'/'+filename+'.txt'); + for r:=1 to search.Count-2 do + if (search[r]=s[0,u[listbox.itemindex]]) + and (search[r+1]<>'') + and (search[r+1]<>'[') + and (search[r+1]<>';') + then begin + combobox2.items.add(trlang[i]); + trline.add(search[r+1]); + break; + end; + end; + end; + search.free; + combobox2.itemindex:=0; + memo1.lines.clear; + memo2.lines.clear; + stringview; + memo2.setFocus(); + end; +end; + procedure tform1.ListBox1Click(sender: tobject); var search:TStringList; r:integer; begin diff --git a/tools/langpackmgr/clear.bat b/tools/langpackmgr/clear.bat new file mode 100644 index 0000000000..feb8c9c531 --- /dev/null +++ b/tools/langpackmgr/clear.bat @@ -0,0 +1,5 @@ +RD /S /Q backup\ +RD /S /Q lib\ +del langpackmgr.res +strip langpackmgr.exe +upx -9 --lzma langpackmgr.exe diff --git a/tools/langpackmgr/langpackmgr.lpi b/tools/langpackmgr/langpackmgr.lpi index cfb49d06ed..8ea95e7e06 100644 --- a/tools/langpackmgr/langpackmgr.lpi +++ b/tools/langpackmgr/langpackmgr.lpi @@ -42,7 +42,7 @@ - + diff --git a/tools/langpackmgr/langpackmgr.lps b/tools/langpackmgr/langpackmgr.lps index 5b9036e12f..b883367121 100644 --- a/tools/langpackmgr/langpackmgr.lps +++ b/tools/langpackmgr/langpackmgr.lps @@ -13,11 +13,11 @@ - + - + @@ -26,9 +26,9 @@ - - - + + + @@ -62,123 +62,123 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + diff --git a/tools/langpackmgr/strip.exe b/tools/langpackmgr/strip.exe new file mode 100644 index 0000000000..68cb9198d3 Binary files /dev/null and b/tools/langpackmgr/strip.exe differ diff --git a/tools/langpackmgr/unit1.lfm b/tools/langpackmgr/unit1.lfm index 76c8ce4d9a..7bd8982ab1 100644 --- a/tools/langpackmgr/unit1.lfm +++ b/tools/langpackmgr/unit1.lfm @@ -2,16 +2,16 @@ object Form1: TForm1 Left = 291 Height = 340 Top = 170 - Width = 505 + Width = 500 HorzScrollBar.Page = 532 HorzScrollBar.Range = 528 VertScrollBar.Page = 296 VertScrollBar.Range = 283 Caption = 'Miranda NG Langpack Tools: Editor' ClientHeight = 340 - ClientWidth = 505 + ClientWidth = 500 Constraints.MinHeight = 340 - Constraints.MinWidth = 450 + Constraints.MinWidth = 460 OnCreate = FormCreate OnResize = FormResize LCLVersion = '1.0.14.0' @@ -45,20 +45,20 @@ object Form1: TForm1 end object ComboBox1: TComboBox Left = 8 - Height = 21 + Height = 23 Top = 8 Width = 120 - ItemHeight = 13 + ItemHeight = 15 OnChange = ComboBox1Change Style = csDropDownList TabOrder = 3 end object ComboBox2: TComboBox Left = 427 - Height = 21 + Height = 23 Top = 8 Width = 72 - ItemHeight = 13 + ItemHeight = 15 ItemIndex = 0 Items.Strings = ( 'english' @@ -131,16 +131,16 @@ object Form1: TForm1 TabOrder = 9 end object Label1: TLabel - Left = 363 - Height = 14 + Left = 344 + Height = 16 Top = 15 - Width = 61 + Width = 65 Caption = 'Other langs:' ParentColor = False end object Edit1: TEdit Left = 8 - Height = 21 + Height = 23 Top = 8 Width = 400 TabOrder = 10 @@ -148,7 +148,7 @@ object Form1: TForm1 end object Edit2: TEdit Left = 8 - Height = 21 + Height = 23 Top = 36 Width = 400 TabOrder = 11 @@ -174,6 +174,15 @@ object Form1: TForm1 TabOrder = 13 Visible = False end + object Button7: TButton + Left = 328 + Height = 21 + Top = 315 + Width = 56 + Caption = 'Next' + OnClick = Button7Click + TabOrder = 15 + end object CheckListBox1: TCheckListBox Left = 8 Height = 272 -- cgit v1.2.3