diff options
author | Vadim Dashevskiy <watcherhd@gmail.com> | 2014-01-29 16:06:04 +0000 |
---|---|---|
committer | Vadim Dashevskiy <watcherhd@gmail.com> | 2014-01-29 16:06:04 +0000 |
commit | d4afc92965408480f76698d5a56304e38c0cf1fe (patch) | |
tree | 844e6ebd0d90b57de63f229f265b498e2d0e4d61 /tools | |
parent | 78cbd552ec1d3ec2b0f837d95def4dc4c3b09775 (diff) |
LangPackMgr tool update (by Jerbifor)
git-svn-id: http://svn.miranda-ng.org/main/trunk@7950 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'tools')
-rw-r--r-- | tools/langpackmgr/Unit1.pas | 49 | ||||
-rw-r--r-- | tools/langpackmgr/clear.bat | 5 | ||||
-rw-r--r-- | tools/langpackmgr/langpackmgr.lpi | 2 | ||||
-rw-r--r-- | tools/langpackmgr/langpackmgr.lps | 84 | ||||
-rw-r--r-- | tools/langpackmgr/strip.exe | bin | 0 -> 286720 bytes | |||
-rw-r--r-- | tools/langpackmgr/unit1.lfm | 33 |
6 files changed, 117 insertions, 56 deletions
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.itemindex<listbox.items.Count-1 then listbox.itemindex:=listbox.ItemIndex+1;
+ savestring;
+ search:=tstringlist.Create;
+ combobox2.items.clear;
+ trline.Clear;
+ combobox2.items.add('english');
+ trline.add(copy(s[0,u[listbox.itemindex]],2,
+ length(s[0,u[listbox.itemindex]])-2));
+ for i:=0 to trlang.count-1 do
+ begin
+ if (fileexists(extractfilepath(application.exename)+
+ '/'+trlang[i]+'/'+filename+'.txt'))
+ and(trlang[i]<>locale) 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 @@ <UnitName Value="langpackmgr"/>
</Unit0>
<Unit1>
- <Filename Value="unit1.pas"/>
+ <Filename Value="Unit1.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
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 @@ <WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="28" Y="18"/>
- <UsageCount Value="38"/>
+ <UsageCount Value="40"/>
<Loaded Value="True"/>
</Unit0>
<Unit1>
- <Filename Value="unit1.pas"/>
+ <Filename Value="Unit1.pas"/>
<IsPartOfProject Value="True"/>
<ComponentName Value="Form1"/>
<HasResources Value="True"/>
@@ -26,9 +26,9 @@ <IsVisibleTab Value="True"/>
<EditorIndex Value="1"/>
<WindowIndex Value="0"/>
- <TopLine Value="482"/>
- <CursorPos X="3" Y="355"/>
- <UsageCount Value="38"/>
+ <TopLine Value="452"/>
+ <CursorPos X="26" Y="467"/>
+ <UsageCount Value="40"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
</Unit1>
@@ -62,123 +62,123 @@ <JumpHistory Count="30" HistoryIndex="29">
<Position1>
<Filename Value="unit1.pas"/>
- <Caret Line="137" Column="42" TopLine="125"/>
+ <Caret Line="307" Column="79" TopLine="297"/>
</Position1>
<Position2>
<Filename Value="unit1.pas"/>
- <Caret Line="269" Column="11" TopLine="253"/>
+ <Caret Line="316" Column="59" TopLine="296"/>
</Position2>
<Position3>
<Filename Value="unit1.pas"/>
- <Caret Line="100" Column="31" TopLine="88"/>
+ <Caret Line="102" Column="43" TopLine="84"/>
</Position3>
<Position4>
<Filename Value="unit1.pas"/>
- <Caret Line="109" Column="35" TopLine="94"/>
+ <Caret Line="93" Column="27" TopLine="83"/>
</Position4>
<Position5>
<Filename Value="unit1.pas"/>
- <Caret Line="113" Column="34" TopLine="100"/>
+ <Caret Line="94" Column="27" TopLine="84"/>
</Position5>
<Position6>
<Filename Value="unit1.pas"/>
- <Caret Line="115" Column="41" TopLine="100"/>
+ <Caret Line="95" Column="27" TopLine="85"/>
</Position6>
<Position7>
<Filename Value="unit1.pas"/>
- <Caret Line="307" Column="79" TopLine="297"/>
+ <Caret Line="96" Column="27" TopLine="86"/>
</Position7>
<Position8>
<Filename Value="unit1.pas"/>
- <Caret Line="316" Column="59" TopLine="296"/>
+ <Caret Line="97" Column="27" TopLine="87"/>
</Position8>
<Position9>
<Filename Value="unit1.pas"/>
- <Caret Line="102" Column="43" TopLine="84"/>
+ <Caret Line="99" Column="27" TopLine="89"/>
</Position9>
<Position10>
<Filename Value="unit1.pas"/>
- <Caret Line="93" Column="27" TopLine="83"/>
+ <Caret Line="89" Column="27" TopLine="71"/>
</Position10>
<Position11>
<Filename Value="unit1.pas"/>
- <Caret Line="94" Column="27" TopLine="84"/>
+ <Caret Line="336" Column="19" TopLine="326"/>
</Position11>
<Position12>
<Filename Value="unit1.pas"/>
- <Caret Line="95" Column="27" TopLine="85"/>
+ <Caret Line="353" Column="3" TopLine="344"/>
</Position12>
<Position13>
<Filename Value="unit1.pas"/>
- <Caret Line="96" Column="27" TopLine="86"/>
+ <Caret Line="354" Column="41" TopLine="175"/>
</Position13>
<Position14>
<Filename Value="unit1.pas"/>
- <Caret Line="97" Column="27" TopLine="87"/>
+ <Caret Line="363" Column="64" TopLine="345"/>
</Position14>
<Position15>
<Filename Value="unit1.pas"/>
- <Caret Line="99" Column="27" TopLine="89"/>
+ <Caret Line="367" Column="11" TopLine="357"/>
</Position15>
<Position16>
<Filename Value="unit1.pas"/>
- <Caret Line="89" Column="27" TopLine="71"/>
+ <Caret Line="385" Column="11" TopLine="378"/>
</Position16>
<Position17>
<Filename Value="unit1.pas"/>
- <Caret Line="336" Column="19" TopLine="326"/>
+ <Caret Line="369" Column="19" TopLine="360"/>
</Position17>
<Position18>
<Filename Value="unit1.pas"/>
- <Caret Line="353" Column="3" TopLine="344"/>
+ <Caret Line="373" Column="11" TopLine="363"/>
</Position18>
<Position19>
<Filename Value="unit1.pas"/>
- <Caret Line="354" Column="41" TopLine="175"/>
+ <Caret Line="110" Column="53" TopLine="96"/>
</Position19>
<Position20>
<Filename Value="unit1.pas"/>
- <Caret Line="363" Column="64" TopLine="345"/>
+ <Caret Line="411" Column="11" TopLine="386"/>
</Position20>
<Position21>
<Filename Value="unit1.pas"/>
- <Caret Line="367" Column="11" TopLine="357"/>
+ <Caret Line="395" Column="33" TopLine="385"/>
</Position21>
<Position22>
<Filename Value="unit1.pas"/>
- <Caret Line="385" Column="11" TopLine="378"/>
+ <Caret Line="364" Column="27" TopLine="355"/>
</Position22>
<Position23>
<Filename Value="unit1.pas"/>
- <Caret Line="369" Column="19" TopLine="360"/>
+ <Caret Line="139" Column="36" TopLine="80"/>
</Position23>
<Position24>
- <Filename Value="unit1.pas"/>
- <Caret Line="373" Column="11" TopLine="363"/>
+ <Filename Value="Unit1.pas"/>
+ <Caret Line="355" Column="3" TopLine="481"/>
</Position24>
<Position25>
- <Filename Value="unit1.pas"/>
- <Caret Line="110" Column="53" TopLine="96"/>
+ <Filename Value="Unit1.pas"/>
+ <Caret Line="357" Column="3" TopLine="357"/>
</Position25>
<Position26>
- <Filename Value="unit1.pas"/>
- <Caret Line="56" Column="16" TopLine="190"/>
+ <Filename Value="Unit1.pas"/>
+ <Caret Line="440" Column="86" TopLine="239"/>
</Position26>
<Position27>
- <Filename Value="unit1.pas"/>
- <Caret Line="411" Column="11" TopLine="386"/>
+ <Filename Value="Unit1.pas"/>
+ <Caret Line="97" Column="51" TopLine="255"/>
</Position27>
<Position28>
- <Filename Value="unit1.pas"/>
- <Caret Line="395" Column="33" TopLine="385"/>
+ <Filename Value="Unit1.pas"/>
+ <Caret Line="465" Column="35" TopLine="422"/>
</Position28>
<Position29>
- <Filename Value="unit1.pas"/>
- <Caret Line="364" Column="27" TopLine="355"/>
+ <Filename Value="Unit1.pas"/>
+ <Caret Line="111" Column="17" TopLine="95"/>
</Position29>
<Position30>
- <Filename Value="unit1.pas"/>
- <Caret Line="139" Column="36" TopLine="80"/>
+ <Filename Value="Unit1.pas"/>
+ <Caret Line="134" Column="10" TopLine="118"/>
</Position30>
</JumpHistory>
</ProjectSession>
diff --git a/tools/langpackmgr/strip.exe b/tools/langpackmgr/strip.exe Binary files differnew file mode 100644 index 0000000000..68cb9198d3 --- /dev/null +++ b/tools/langpackmgr/strip.exe 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
|