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 | |
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')
-rw-r--r-- | tools/langpackmgr/Unit1.pas | 150 | ||||
-rw-r--r-- | tools/langpackmgr/langpackmgr.lps | 70 | ||||
-rw-r--r-- | tools/langpackmgr/unit1.lfm | 46 | ||||
-rw-r--r-- | tools/replacer/replacer.ico | bin | 15086 -> 0 bytes | |||
-rw-r--r-- | tools/replacer/replacer.lpi | 91 | ||||
-rw-r--r-- | tools/replacer/replacer.lpr | 21 | ||||
-rw-r--r-- | tools/replacer/replacer.lps | 39 | ||||
-rw-r--r-- | tools/replacer/unit1.lfm | 52 | ||||
-rw-r--r-- | tools/replacer/unit1.pas | 143 |
9 files changed, 208 insertions, 404 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
diff --git a/tools/replacer/replacer.ico b/tools/replacer/replacer.ico Binary files differdeleted file mode 100644 index e5fe684d9c..0000000000 --- a/tools/replacer/replacer.ico +++ /dev/null diff --git a/tools/replacer/replacer.lpi b/tools/replacer/replacer.lpi deleted file mode 100644 index 4441bbc3e7..0000000000 --- a/tools/replacer/replacer.lpi +++ /dev/null @@ -1,91 +0,0 @@ -<?xml version="1.0"?>
-<CONFIG>
- <ProjectOptions>
- <Version Value="9"/>
- <PathDelim Value="\"/>
- <General>
- <SessionStorage Value="InProjectDir"/>
- <MainUnit Value="0"/>
- <Title Value="replacer"/>
- <ResourceType Value="res"/>
- <UseXPManifest Value="True"/>
- <Icon Value="0"/>
- </General>
- <i18n>
- <EnableI18N LFM="False"/>
- </i18n>
- <VersionInfo>
- <StringTable ProductVersion=""/>
- </VersionInfo>
- <BuildModes Count="1">
- <Item1 Name="Default" Default="True"/>
- </BuildModes>
- <PublishOptions>
- <Version Value="2"/>
- <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
- <ExcludeFileFilter Value="*.(bak|ppu|o|so);*~;backup"/>
- </PublishOptions>
- <RunParams>
- <local>
- <FormatVersion Value="1"/>
- </local>
- </RunParams>
- <RequiredPackages Count="1">
- <Item1>
- <PackageName Value="LCL"/>
- </Item1>
- </RequiredPackages>
- <Units Count="2">
- <Unit0>
- <Filename Value="replacer.lpr"/>
- <IsPartOfProject Value="True"/>
- <UnitName Value="replacer"/>
- </Unit0>
- <Unit1>
- <Filename Value="unit1.pas"/>
- <IsPartOfProject Value="True"/>
- <ComponentName Value="Form1"/>
- <HasResources Value="True"/>
- <ResourceBaseClass Value="Form"/>
- <UnitName Value="Unit1"/>
- </Unit1>
- </Units>
- </ProjectOptions>
- <CompilerOptions>
- <Version Value="11"/>
- <PathDelim Value="\"/>
- <Target>
- <Filename Value="replacer"/>
- </Target>
- <SearchPaths>
- <IncludeFiles Value="$(ProjOutDir)"/>
- <UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
- </SearchPaths>
- <Linking>
- <Options>
- <Win32>
- <GraphicApplication Value="True"/>
- </Win32>
- </Options>
- </Linking>
- <Other>
- <CompilerMessages>
- <MsgFileName Value=""/>
- </CompilerMessages>
- <CompilerPath Value="$(CompPath)"/>
- </Other>
- </CompilerOptions>
- <Debugging>
- <Exceptions Count="3">
- <Item1>
- <Name Value="EAbort"/>
- </Item1>
- <Item2>
- <Name Value="ECodetoolError"/>
- </Item2>
- <Item3>
- <Name Value="EFOpenError"/>
- </Item3>
- </Exceptions>
- </Debugging>
-</CONFIG>
diff --git a/tools/replacer/replacer.lpr b/tools/replacer/replacer.lpr deleted file mode 100644 index f81d096866..0000000000 --- a/tools/replacer/replacer.lpr +++ /dev/null @@ -1,21 +0,0 @@ -program replacer;
-
-{$mode objfpc}{$H+}
-
-uses
- {$IFDEF UNIX}{$IFDEF UseCThreads}
- cthreads,
- {$ENDIF}{$ENDIF}
- Interfaces, // this includes the LCL widgetset
- Forms, Unit1
- { you can add units after this };
-
-{$R *.res}
-
-begin
- RequireDerivedFormResource := True;
- Application.Initialize;
- Application.CreateForm(TForm1, Form1);
- Application.Run;
-end.
-
diff --git a/tools/replacer/replacer.lps b/tools/replacer/replacer.lps deleted file mode 100644 index 4a32f93491..0000000000 --- a/tools/replacer/replacer.lps +++ /dev/null @@ -1,39 +0,0 @@ -<?xml version="1.0"?>
-<CONFIG>
- <ProjectSession>
- <PathDelim Value="\"/>
- <Version Value="9"/>
- <BuildModes Active="Default"/>
- <Units Count="2">
- <Unit0>
- <Filename Value="replacer.lpr"/>
- <IsPartOfProject Value="True"/>
- <UnitName Value="replacer"/>
- <WindowIndex Value="0"/>
- <TopLine Value="1"/>
- <CursorPos X="1" Y="1"/>
- <UsageCount Value="22"/>
- </Unit0>
- <Unit1>
- <Filename Value="unit1.pas"/>
- <IsPartOfProject Value="True"/>
- <ComponentName Value="Form1"/>
- <HasResources Value="True"/>
- <ResourceBaseClass Value="Form"/>
- <UnitName Value="Unit1"/>
- <IsVisibleTab Value="True"/>
- <EditorIndex Value="0"/>
- <WindowIndex Value="0"/>
- <TopLine Value="69"/>
- <CursorPos X="26" Y="80"/>
- <UsageCount Value="22"/>
- <Loaded Value="True"/>
- <LoadedDesigner Value="True"/>
- </Unit1>
- </Units>
- <General>
- <ActiveWindowIndexAtStart Value="0"/>
- </General>
- <JumpHistory Count="0" HistoryIndex="-1"/>
- </ProjectSession>
-</CONFIG>
diff --git a/tools/replacer/unit1.lfm b/tools/replacer/unit1.lfm deleted file mode 100644 index a260da370d..0000000000 --- a/tools/replacer/unit1.lfm +++ /dev/null @@ -1,52 +0,0 @@ -object Form1: TForm1
- Left = 292
- Height = 275
- Top = 156
- Width = 361
- BorderIcons = [biSystemMenu]
- BorderStyle = bsDialog
- Caption = 'Miranda NG Langpack Tools: Replacer'
- ClientHeight = 275
- ClientWidth = 361
- LCLVersion = '1.0.14.0'
- object CheckListBox1: TCheckListBox
- Left = 8
- Height = 208
- Top = 64
- Width = 347
- ItemHeight = 0
- TabOrder = 0
- end
- object Edit1: TEdit
- Left = 8
- Height = 21
- Top = 8
- Width = 280
- TabOrder = 1
- end
- object Button1: TButton
- Left = 296
- Height = 21
- Top = 8
- Width = 59
- Caption = 'Find'
- OnClick = Button1Click
- TabOrder = 2
- end
- object Edit2: TEdit
- Left = 8
- Height = 21
- Top = 36
- Width = 280
- TabOrder = 3
- end
- object Button2: TButton
- Left = 296
- Height = 21
- Top = 36
- Width = 59
- Caption = 'Replace'
- OnClick = Button2Click
- TabOrder = 4
- end
-end
diff --git a/tools/replacer/unit1.pas b/tools/replacer/unit1.pas deleted file mode 100644 index b6a66bed0c..0000000000 --- a/tools/replacer/unit1.pas +++ /dev/null @@ -1,143 +0,0 @@ -unit Unit1;
-
-
-
-interface
-
-uses
- Classes, SysUtils, FileUtil, Forms, Controls, Graphics, Dialogs, StdCtrls,
- CheckLst;
-{ IMAGE_FILE_LINE_NUMS_STRIPPED or IMAGE_FILE_LOCAL_SYMS_STRIPPED
- $WEAKLINKRTTI ON $RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([]) }
-type
-
- { TForm1 }
-
- TForm1 = class(TForm)
- Button1: TButton;
- Button2: TButton;
- CheckListBox1: TCheckListBox;
- Edit1: TEdit;
- Edit2: TEdit;
- procedure Button1Click(Sender: TObject);
- procedure Button2Click(Sender: TObject);
-
- private
- { private declarations }
- public
- { public declarations }
- end;
-
-var
-
- Form1: TForm1;
- d:tsearchrec;
- a:TStringList;
- langs:TStringList;
- i,j:integer;
- s:string;
- r,t:integer;
-
-implementation
-
-{$R *.lfm}
-
-{ TForm1 }
-
-procedure TForm1.Button1Click(Sender: TObject);
-begin
- CheckListBox1.Items.clear;
- langs:=TstringList.Create;
- r:=findfirst(extractfilePath(application.exename)+'*',faanyfile,d);
- while r = 0 do
- begin
- if ((d.attr and fadirectory)=fadirectory)
- and ((d.name='.')or(d.name='..')) then
- begin r:=findnext(d); continue; end;
- if ((d.attr and fadirectory)=fadirectory)
- and (fileexists(extractfilepath(application.exename)+
- '/'+d.name+'/=HEAD=.txt')) then
- begin
- langs.Add(d.name);
- end;
- r:=FindNext(d);
- end;
-FindClose(d);
-
-
-for i := 0 to langs.Count-1 do
-begin
- a:=TstringList.Create;
- if fileexists(extractfilepath(application.exename)+langs[i]+'/'+'=CORE=.txt') then
- begin
- a.LoadFromFile(extractfilepath(application.exename)+langs[i]+'/'+'=CORE=.txt');
- for j := 0 to a.count-1 do
- if a[j]=edit1.text then
- begin
- CheckListBox1.Items.Add(langs[i]+'/'+'=CORE=.txt');
- break;
- end;
-
- end;
- a.Free;
-
- r:=FindFirst(ExtractFilePath(Application.ExeName)+'/'
-+langs[i]+'/plugins/*.txt', faAnyFile, d);
- while r = 0 do
- begin
- a:=TstringList.Create;
- a.LoadFromFile(extractfilepath(application.exename)
- +'/'+langs[i]+'/'+'plugins/'+d.name);
- for j := 0 to a.count-1 do
- if a[j]=edit1.text then
- begin
- CheckListBox1.Items.Add(langs[i]+'/'+'plugins/'+d.name);
- break;
- end;
- a.free;
- r:=FindNext(d);
- end;
- FindClose(d);
-
-r:=FindFirst(ExtractFilePath(Application.ExeName)+'/'
-+langs[i]+'/weather/*.txt', faAnyFile, d);
- while r = 0 do
- begin
- a:=TstringList.Create;
- a.LoadFromFile(extractfilepath(application.exename)
- +'/'+langs[i]+'/'+'weather/'+d.name);
- for j := 0 to a.count-1 do
- if a[j]=edit1.text then
- begin
- CheckListBox1.Items.Add(langs[i]+'/'+'plugins/'+d.name);
- break;
- end;
- a.free;
- r:=FindNext(d);
- end;
- FindClose(d);
-
-end;
-
-for i := 0 to CheckListBox1.Count-1 do
- CheckListBox1.Checked[i]:=true;
-
-end;
-
-procedure TForm1.Button2Click(Sender: TObject);
-begin
- for i := 0 to CheckListBox1.Count-1 do
- if CheckListBox1.Checked[i]=true then
- begin
- a:=TstringList.Create;
- a.LoadFromFile(extractfilepath(application.exename)
- +'/'+CheckListBox1.Items[i]);
- for j := 1 to a.Count-1 do
- if a[j]=edit1.text then a[j]:=edit2.text;
- a.SaveToFile(extractfilepath(application.exename)
- +'/'+CheckListBox1.Items[i]);
- end;
-end;
-
-end.
-
|