diff options
author | Dart Raiden <wowemuh@gmail.com> | 2013-12-27 07:35:46 +0000 |
---|---|---|
committer | Dart Raiden <wowemuh@gmail.com> | 2013-12-27 07:35:46 +0000 |
commit | 15b0fa58cc06f1cb25da6f2ddc9f17113eedb71c (patch) | |
tree | 0a82c9c23248cf7a93c56dba1cafa57661d105d8 /tools/langpackmgr | |
parent | f230de50ea95c26a550666a8bca2445d6b8061c3 (diff) |
langpacks/belarusian: update (from Jerbifor)
replacer is now combined with langpackmgr
git-svn-id: http://svn.miranda-ng.org/main/trunk@7386 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'tools/langpackmgr')
-rw-r--r-- | tools/langpackmgr/Unit1.pas | 150 | ||||
-rw-r--r-- | tools/langpackmgr/langpackmgr.lps | 70 | ||||
-rw-r--r-- | tools/langpackmgr/unit1.lfm | 46 |
3 files changed, 208 insertions, 58 deletions
diff --git a/tools/langpackmgr/Unit1.pas b/tools/langpackmgr/Unit1.pas index e708bbbee3..eab1fdc20e 100644 --- a/tools/langpackmgr/Unit1.pas +++ b/tools/langpackmgr/Unit1.pas @@ -4,7 +4,7 @@ interface uses
classes, sysutils, fileutil, forms, controls, graphics, dialogs, stdctrls,
- extctrls, Windows;
+ extctrls, CheckLst, Windows;
type
@@ -15,6 +15,11 @@ type button2: tbutton;
button3: tbutton;
button4: tbutton;
+ Button5: TButton;
+ Button6: TButton;
+ CheckListBox1: TCheckListBox;
+ Edit1: TEdit;
+ Edit2: TEdit;
Label1: TLabel;
memo1: tmemo;
memo2: tmemo;
@@ -26,6 +31,8 @@ type procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
procedure Button4Click(Sender: TObject);
+ procedure Button5Click(Sender: TObject);
+ procedure Button6Click(Sender: TObject);
procedure combobox1change(sender: tobject);
procedure ComboBox2Change(Sender: TObject);
procedure formcreate(sender: tobject);
@@ -68,29 +75,44 @@ begin view:='english';
trlang:=TstringList.Create;
trline:=TstringList.Create;
- if (paramstr(1)='-r') then
- begin
- form1.caption:='Miranda NG Langpack Tools: Replacer';
- end
- else
- begin
- res:=findfirst(extractfilepath(application.exename)+'*',faanyfile,sr);
- while res = 0 do
- begin
- if ((sr.attr and fadirectory)=fadirectory)
- and ((sr.name='.')or(sr.name='..')) then
+begin
+ res:=findfirst(extractfilepath(application.exename)+'*',faanyfile,sr);
+ while res = 0 do
+ begin
+ if ((sr.attr and fadirectory)=fadirectory)
+ and ((sr.name='.')or(sr.name='..')) then
begin res:=findnext(sr); continue; end;
- if ((sr.attr and fadirectory)=fadirectory)
- and (fileexists(extractfilepath(application.exename)+
- '/'+sr.name+'/=head=.txt')) and (sr.name<>'english') then
- begin
- ListBox.items.add(sr.name);
- trlang.add(sr.name);
- end;
- res:=findnext(sr);
- end;
- SysUtils.FindClose(sr);
+ if ((sr.attr and fadirectory)=fadirectory)
+ and (fileexists(extractfilepath(application.exename)+
+ '/'+sr.name+'/=head=.txt')) and (sr.name<>'english') then
+ begin
+ ListBox.items.add(sr.name);
+ trlang.add(sr.name);
+ end;
+ res:=findnext(sr);
+ end;
+ SysUtils.FindClose(sr);
+ end;
+ if (paramstr(1)='-r') then
+ begin
+ form1.caption:='Miranda NG Langpack Tools: Replacer';
+ listbox.visible:=false;
+ memo1.Visible:=false;
+ memo2.Visible:=false;
+ combobox1.visible:=false;
+ combobox2.visible:=false;
+ button1.visible:=false;
+ button2.visible:=false;
+ button3.visible:=false;
+ button4.visible:=false;
+ label1.visible:=false;
+ radiogroup1.visible:=false;
+ edit1.visible:=true;
+ edit2.visible:=true;
+ button5.visible:=true;
+ button6.visible:=true;
+ checklistbox1.visible:=true;
end;
end;
@@ -111,6 +133,14 @@ begin memo1.Height:=Trunc((form1.Height-80)/2);
memo2.Height:=Trunc((form1.Height-80)/2);
memo2.top:=44+memo1.Height;
+
+ edit1.width:=form1.width-105;
+ edit2.width:=form1.width-105;
+ button5.left:=form1.width-88;
+ button6.left:=form1.width-88;
+ checklistbox1.width:=form1.width-12;
+ checklistbox1.height:=form1.height-68;
+
end;
procedure tform1.stringlist;
@@ -315,6 +345,82 @@ procedure tform1.Button4Click(Sender: TObject); ShellExecute(0, 'open',PChar(str), nil, nil, SW_SHOW);
end;
+procedure tform1.Button5Click(Sender: TObject);
+begin
+ CheckListBox1.Items.clear;
+ for i := 0 to trlang.Count-1 do
+begin
+ trline:=TstringList.Create;
+ if fileexists(extractfilepath(application.exename)
+ +trlang[i]+'/'+'=CORE=.txt') then
+ begin
+ trline.LoadFromFile(extractfilepath(application.exename)
+ +trlang[i]+'/'+'=CORE=.txt');
+ for j := 0 to trline.count-1 do
+ if trline[j]=edit1.text then
+ begin
+ CheckListBox1.Items.Add(trlang[i]+'/'+'=CORE=.txt');
+ break;
+ end;
+ end;
+ trline.Free;
+
+ res:=FindFirst(ExtractFilePath(Application.ExeName)+'/'
++trlang[i]+'/plugins/*.txt', faAnyFile, sr);
+ while res = 0 do
+ begin
+ trline:=TstringList.Create;
+ trline.LoadFromFile(extractfilepath(application.exename)
+ +'/'+trlang[i]+'/'+'plugins/'+sr.name);
+ for j := 0 to trline.count-1 do
+ if trline[j]=edit1.text then
+ begin
+ CheckListBox1.Items.Add(trlang[i]+'/'+'plugins/'+sr.name);
+ break;
+ end;
+ trline.free;
+ res:=FindNext(sr);
+ end;
+ FindClose(res);
+
+res:=FindFirst(ExtractFilePath(Application.ExeName)+'/'
++trlang[i]+'/weather/*.txt', faAnyFile, sr);
+ while res = 0 do
+ begin
+ trline:=TstringList.Create;
+ trline.LoadFromFile(extractfilepath(application.exename)
+ +'/'+trlang[i]+'/'+'weather/'+sr.name);
+ for j := 0 to trline.count-1 do
+ if trline[j]=edit1.text then
+ begin
+ CheckListBox1.Items.Add(trlang[i]+'/'+'plugins/'+sr.name);
+ break;
+ end;
+ trline.free;
+ res:=FindNext(sr);
+ end;
+ FindClose(res);
+
+end;
+for i := 0 to CheckListBox1.Count-1 do
+ CheckListBox1.Checked[i]:=true;
+end;
+
+procedure tform1.Button6Click(Sender: TObject);
+begin
+ for i := 0 to CheckListBox1.Count-1 do
+ if CheckListBox1.Checked[i]=true then
+ begin
+ trline:=TstringList.Create;
+ trline.LoadFromFile(extractfilepath(application.exename)
+ +'/'+CheckListBox1.Items[i]);
+ for j := 1 to trline.Count-1 do
+ if trline[j]=edit1.text then trline[j]:=edit2.text;
+ trline.SaveToFile(extractfilepath(application.exename)
+ +'/'+CheckListBox1.Items[i]);
+ end;
+end;
+
procedure tform1.ListBox1Click(sender: tobject);
var search:TStringList; r:integer;
begin
diff --git a/tools/langpackmgr/langpackmgr.lps b/tools/langpackmgr/langpackmgr.lps index d130412174..5b9036e12f 100644 --- a/tools/langpackmgr/langpackmgr.lps +++ b/tools/langpackmgr/langpackmgr.lps @@ -13,7 +13,7 @@ <WindowIndex Value="0"/>
<TopLine Value="1"/>
<CursorPos X="28" Y="18"/>
- <UsageCount Value="34"/>
+ <UsageCount Value="38"/>
<Loaded Value="True"/>
</Unit0>
<Unit1>
@@ -26,9 +26,9 @@ <IsVisibleTab Value="True"/>
<EditorIndex Value="1"/>
<WindowIndex Value="0"/>
- <TopLine Value="300"/>
- <CursorPos X="10" Y="309"/>
- <UsageCount Value="34"/>
+ <TopLine Value="482"/>
+ <CursorPos X="3" Y="355"/>
+ <UsageCount Value="38"/>
<Loaded Value="True"/>
<LoadedDesigner Value="True"/>
</Unit1>
@@ -50,12 +50,10 @@ </Unit3>
<Unit4>
<Filename Value="E:\lazarus\lcl\interfaces\win32\win32listsl.inc"/>
- <EditorIndex Value="2"/>
<WindowIndex Value="0"/>
<TopLine Value="160"/>
<CursorPos X="1" Y="173"/>
<UsageCount Value="10"/>
- <Loaded Value="True"/>
</Unit4>
</Units>
<General>
@@ -64,123 +62,123 @@ <JumpHistory Count="30" HistoryIndex="29">
<Position1>
<Filename Value="unit1.pas"/>
- <Caret Line="202" Column="34" TopLine="182"/>
+ <Caret Line="137" Column="42" TopLine="125"/>
</Position1>
<Position2>
<Filename Value="unit1.pas"/>
- <Caret Line="309" Column="57" TopLine="288"/>
+ <Caret Line="269" Column="11" TopLine="253"/>
</Position2>
<Position3>
<Filename Value="unit1.pas"/>
- <Caret Line="303" Column="35" TopLine="291"/>
+ <Caret Line="100" Column="31" TopLine="88"/>
</Position3>
<Position4>
<Filename Value="unit1.pas"/>
- <Caret Line="304" Column="28" TopLine="292"/>
+ <Caret Line="109" Column="35" TopLine="94"/>
</Position4>
<Position5>
<Filename Value="unit1.pas"/>
- <Caret Line="303" Column="56" TopLine="292"/>
+ <Caret Line="113" Column="34" TopLine="100"/>
</Position5>
<Position6>
<Filename Value="unit1.pas"/>
- <Caret Line="306" Column="12" TopLine="303"/>
+ <Caret Line="115" Column="41" TopLine="100"/>
</Position6>
<Position7>
<Filename Value="unit1.pas"/>
- <Caret Line="312" Column="66" TopLine="173"/>
+ <Caret Line="307" Column="79" TopLine="297"/>
</Position7>
<Position8>
<Filename Value="unit1.pas"/>
- <Caret Line="199" Column="17" TopLine="182"/>
+ <Caret Line="316" Column="59" TopLine="296"/>
</Position8>
<Position9>
<Filename Value="unit1.pas"/>
- <Caret Line="196" Column="17" TopLine="184"/>
+ <Caret Line="102" Column="43" TopLine="84"/>
</Position9>
<Position10>
<Filename Value="unit1.pas"/>
- <Caret Line="287" Column="30" TopLine="269"/>
+ <Caret Line="93" Column="27" TopLine="83"/>
</Position10>
<Position11>
<Filename Value="unit1.pas"/>
- <Caret Line="259" Column="30" TopLine="248"/>
+ <Caret Line="94" Column="27" TopLine="84"/>
</Position11>
<Position12>
<Filename Value="unit1.pas"/>
- <Caret Line="260" Column="54" TopLine="248"/>
+ <Caret Line="95" Column="27" TopLine="85"/>
</Position12>
<Position13>
<Filename Value="unit1.pas"/>
- <Caret Line="279" Column="52" TopLine="265"/>
+ <Caret Line="96" Column="27" TopLine="86"/>
</Position13>
<Position14>
<Filename Value="unit1.pas"/>
- <Caret Line="259" Column="57" TopLine="248"/>
+ <Caret Line="97" Column="27" TopLine="87"/>
</Position14>
<Position15>
<Filename Value="unit1.pas"/>
- <Caret Line="285" Column="35" TopLine="271"/>
+ <Caret Line="99" Column="27" TopLine="89"/>
</Position15>
<Position16>
<Filename Value="unit1.pas"/>
- <Caret Line="284" Column="35" TopLine="270"/>
+ <Caret Line="89" Column="27" TopLine="71"/>
</Position16>
<Position17>
<Filename Value="unit1.pas"/>
- <Caret Line="67" Column="8" TopLine="55"/>
+ <Caret Line="336" Column="19" TopLine="326"/>
</Position17>
<Position18>
<Filename Value="unit1.pas"/>
- <Caret Line="328" Column="28" TopLine="296"/>
+ <Caret Line="353" Column="3" TopLine="344"/>
</Position18>
<Position19>
<Filename Value="unit1.pas"/>
- <Caret Line="203" Column="26" TopLine="195"/>
+ <Caret Line="354" Column="41" TopLine="175"/>
</Position19>
<Position20>
<Filename Value="unit1.pas"/>
- <Caret Line="204" Column="26" TopLine="196"/>
+ <Caret Line="363" Column="64" TopLine="345"/>
</Position20>
<Position21>
<Filename Value="unit1.pas"/>
- <Caret Line="56" Column="3" TopLine="35"/>
+ <Caret Line="367" Column="11" TopLine="357"/>
</Position21>
<Position22>
<Filename Value="unit1.pas"/>
- <Caret Line="143" Column="59" TopLine="126"/>
+ <Caret Line="385" Column="11" TopLine="378"/>
</Position22>
<Position23>
<Filename Value="unit1.pas"/>
- <Caret Line="137" Column="42" TopLine="125"/>
+ <Caret Line="369" Column="19" TopLine="360"/>
</Position23>
<Position24>
<Filename Value="unit1.pas"/>
- <Caret Line="269" Column="11" TopLine="253"/>
+ <Caret Line="373" Column="11" TopLine="363"/>
</Position24>
<Position25>
<Filename Value="unit1.pas"/>
- <Caret Line="100" Column="31" TopLine="88"/>
+ <Caret Line="110" Column="53" TopLine="96"/>
</Position25>
<Position26>
<Filename Value="unit1.pas"/>
- <Caret Line="109" Column="35" TopLine="94"/>
+ <Caret Line="56" Column="16" TopLine="190"/>
</Position26>
<Position27>
<Filename Value="unit1.pas"/>
- <Caret Line="113" Column="34" TopLine="100"/>
+ <Caret Line="411" Column="11" TopLine="386"/>
</Position27>
<Position28>
<Filename Value="unit1.pas"/>
- <Caret Line="115" Column="41" TopLine="100"/>
+ <Caret Line="395" Column="33" TopLine="385"/>
</Position28>
<Position29>
<Filename Value="unit1.pas"/>
- <Caret Line="307" Column="79" TopLine="297"/>
+ <Caret Line="364" Column="27" TopLine="355"/>
</Position29>
<Position30>
<Filename Value="unit1.pas"/>
- <Caret Line="316" Column="59" TopLine="296"/>
+ <Caret Line="139" Column="36" TopLine="80"/>
</Position30>
</JumpHistory>
</ProjectSession>
diff --git a/tools/langpackmgr/unit1.lfm b/tools/langpackmgr/unit1.lfm index ae62917e23..76c8ce4d9a 100644 --- a/tools/langpackmgr/unit1.lfm +++ b/tools/langpackmgr/unit1.lfm @@ -138,4 +138,50 @@ object Form1: TForm1 Caption = 'Other langs:'
ParentColor = False
end
+ object Edit1: TEdit
+ Left = 8
+ Height = 21
+ Top = 8
+ Width = 400
+ TabOrder = 10
+ Visible = False
+ end
+ object Edit2: TEdit
+ Left = 8
+ Height = 21
+ Top = 36
+ Width = 400
+ TabOrder = 11
+ Visible = False
+ end
+ object Button5: TButton
+ Left = 416
+ Height = 21
+ Top = 8
+ Width = 83
+ Caption = 'Find'
+ OnClick = Button5Click
+ TabOrder = 12
+ Visible = False
+ end
+ object Button6: TButton
+ Left = 416
+ Height = 21
+ Top = 36
+ Width = 83
+ Caption = 'Replace'
+ OnClick = Button6Click
+ TabOrder = 13
+ Visible = False
+ end
+ object CheckListBox1: TCheckListBox
+ Left = 8
+ Height = 272
+ Top = 64
+ Width = 491
+ Columns = 2
+ ItemHeight = 0
+ TabOrder = 14
+ Visible = False
+ end
end
|