From 15b0fa58cc06f1cb25da6f2ddc9f17113eedb71c Mon Sep 17 00:00:00 2001 From: Dart Raiden Date: Fri, 27 Dec 2013 07:35:46 +0000 Subject: 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 --- langpacks/LangPackMgr.exe | Bin 459264 -> 462848 bytes langpacks/belarusian/=CORE=.txt | 2 +- langpacks/belarusian/Plugins/UInfoEx.txt | 84 +++++++++++++++++ langpacks/replacer.bat | 1 + langpacks/replacer.exe | Bin 456192 -> 0 bytes tools/langpackmgr/Unit1.pas | 150 ++++++++++++++++++++++++++----- tools/langpackmgr/langpackmgr.lps | 70 +++++++-------- tools/langpackmgr/unit1.lfm | 46 ++++++++++ tools/replacer/replacer.ico | Bin 15086 -> 0 bytes tools/replacer/replacer.lpi | 91 ------------------- tools/replacer/replacer.lpr | 21 ----- tools/replacer/replacer.lps | 39 -------- tools/replacer/unit1.lfm | 52 ----------- tools/replacer/unit1.pas | 143 ----------------------------- 14 files changed, 294 insertions(+), 405 deletions(-) create mode 100644 langpacks/replacer.bat delete mode 100644 langpacks/replacer.exe delete mode 100644 tools/replacer/replacer.ico delete mode 100644 tools/replacer/replacer.lpi delete mode 100644 tools/replacer/replacer.lpr delete mode 100644 tools/replacer/replacer.lps delete mode 100644 tools/replacer/unit1.lfm delete mode 100644 tools/replacer/unit1.pas diff --git a/langpacks/LangPackMgr.exe b/langpacks/LangPackMgr.exe index be4eb22140..af0160846c 100644 Binary files a/langpacks/LangPackMgr.exe and b/langpacks/LangPackMgr.exe differ diff --git a/langpacks/belarusian/=CORE=.txt b/langpacks/belarusian/=CORE=.txt index 1eb447e834..1f7e80f5e4 100644 --- a/langpacks/belarusian/=CORE=.txt +++ b/langpacks/belarusian/=CORE=.txt @@ -2185,7 +2185,7 @@ Miranda NG не можа адкрыць гэты профіль [The profile already exists] Профіль ужо існуе [Couldn't move '%s' to the Recycle Bin. Please select another profile name.] -Не магу перамясціць '%s' у Сметницу, абярыце іншае імя для профіля. +Не магу перамясціць '%s' у Сметніцу, абярыце іншае імя для профіля. [Problem moving profile] Праблема з перасоўваннем профіля [Unable to create the profile '%s', the error was %x] diff --git a/langpacks/belarusian/Plugins/UInfoEx.txt b/langpacks/belarusian/Plugins/UInfoEx.txt index b3b1ea27f1..441ad32034 100644 --- a/langpacks/belarusian/Plugins/UInfoEx.txt +++ b/langpacks/belarusian/Plugins/UInfoEx.txt @@ -364,9 +364,23 @@ E-Mail [Keeps your custom birthday up to date.] Рэзервуе наладжаныя дні нараджэння. ;file \plugins\UserInfoEx\src\classPsTree.cpp +[Due to a parameter error, one of the treeitems can't be added!] +З-за памылкі ў параметры, адзін з элементаў дрэва не можа быць дададзены! +[Rename Item] +Пераназваць +[Hide Item] +Схаваць +[Show Items:] +Паказаць: [Reset to defaults] Скінуць ;file \plugins\UserInfoEx\src\classPsTreeItem.cpp +[Creating unique name for a page failed with %d and error code %d] +Памылка пры стварэнні імя для старонкі з %d, код памылкі %d +[Creating the label for a page failed with %d and error code %d] +Памылка пры стварэнні назвы для старонкі з %d, код памылкі %d +[The dialog template type is no longer supported] +Шаблон дыялога больш не падтрымліваецца ;file \plugins\UserInfoEx\src\ctrl_annivedit.cpp [Add a new anniversary] Дадаць новае свята @@ -375,8 +389,12 @@ E-Mail [Unspecified] Не паказана ;file \plugins\UserInfoEx\src\ctrl_contact.cpp +[Edit E-Mail] +Кіраваць E-Mail [Edit Phone Number] Змяніць тэлефонны нумар +[The phone number should start with a + and consist of\nnumbers, spaces, brackets and hyphens only.] +Нумар тэлефона павінны пачынацца з + і утрымоўваць\nлічбы, прабелы, дужкі і працяжнікі. [Choose the item to display.] Абраць запіс. [Edit the currently displayed item.] @@ -387,6 +405,8 @@ E-Mail Выдаліць дадзены запіс. [CRITICAL: Unable to edit current entry!\nThis should not happen!] Фатальна: Немагчыма рэдагаваць гэты запіс!\nГэтага не павінна было адбыцца! +[Do you really want to delete the current selected item?\n\t%s\n\t%s] +Выдаліць абраны запіс?\n\t%s\n\t%s [Other] Іншае ;file \plugins\UserInfoEx\src\ctrl_tzcombo.cpp @@ -422,6 +442,8 @@ E-Mail Так [No] Не +[Abort] +Скасаваць [Ignore] Ігнараваць [Error] @@ -431,6 +453,18 @@ E-Mail Пратакол '%s' не далучаны [Upload Details] Запампаваць дэталі +[You are not currently connected to the ICQ network.\nYou must be online in order to update your information on the server.\n\nYour changes will be saved to database only.] +Зараз вы не далучаны да ICQ.\nКаб абнавіць інфармацыю на серверы, вы павінны далучыцца.\n\nЗмяненні захаваюцца толькі лакальна. +[Uploading] +Загрузка +[Creating the imagelist failed!] +Памылка пры стварэнні imagelist! +[Could not find contact's protocol. Maybe it is not active!] +Немагчыма знайсці пратакол кантакта. Магчыма, ен адключаны! +[No pages have been added. Canceling dialog creation!] +Старонкі не былі дададзены. Скасаванне стварэння дыялога! +[Details dialog failed to be created. Returning error is %d.] +Памылка стварэння дыялога Uinfoex. Памылка %d. [General] Агульнае [Contact (private)] @@ -453,6 +487,12 @@ E-Mail Імпарт з файла [Owner] Уладальнік +[Upload ICQ Details] +Загрузіць дэталі ICQ +[Upload failed] +Загрузка не ўдалася +[Your details were not uploaded successfully.\nThey were written to database only.] +Вашыя дэталі не загружаныя.\nЯны захаваныя лакальна. ;file \plugins\UserInfoEx\src\init.cpp ;file \plugins\UserInfoEx\src\mir_icolib.cpp [IM Naming] @@ -495,6 +535,8 @@ E-Mail Мабільны [Custom Phone] Абраны тэлефон +[e-mail] +E-Mail [Down arrow] Стрэлка ўніз [Add] @@ -551,6 +593,8 @@ E-Mail Свята праз 9 дзён [Anniversary later] Свята пазней +[Warning: Your current IconPack's version differs from the one UserInfoEx is designed for.\nSome icons may not be displayed correctly] +Увага: Версія Вашага цяперашняга набора абразкоў адрозніваецца ад версіі UserInfoEx.\nНекаторыя абразкі могуць адлюстроўвацца няправільна [Main] Галоўны ;file \plugins\UserInfoEx\src\mir_icolib.h @@ -598,6 +642,8 @@ E-Mail Другасны e-mail [Tertiary e-mail] Трэці e-mail +[Company] +Кампанія ;file \plugins\UserInfoEx\src\psp_options.cpp [Question] Пытанне @@ -613,6 +659,8 @@ E-Mail Толькі дні нараджэння [everything] Усе напамінкі +[mBirthday] +Дні нараджэння [UserInfo (default)] Асабістыя дадзеныя (па змаўчанні) [This is the reminder message] @@ -634,6 +682,14 @@ E-Mail Інтарэсы [] <не> +[Add Affliation] +Дадаць +[Edit Category] +Змяніць катэгорыю +[Edit Value] +Кіраваць значэнне +[Delete an entry] +Выдаліць запіс [Do you really want to delete this entry?] Вы сапраўды жадаеце выдаліць гэта? ;file \plugins\UserInfoEx\src\svc_constants.cpp @@ -999,10 +1055,14 @@ Web Дызайн ;file \plugins\UserInfoEx\src\svc_email.cpp [Send e-mail] Адправіць e-mail +[Memory allocation error!] +Памылка выдзялення памяці! ;file \plugins\UserInfoEx\src\svc_gender.cpp [Gender (uinfoex)] Пол (uinfoex) ;file \plugins\UserInfoEx\src\svc_homepage.cpp +[User has no valid homepage] +У карыстача няма хатняй старонкі [View Homepage] Сайт [&Homepage] @@ -1012,6 +1072,8 @@ Web Дызайн ;file \plugins\UserInfoEx\src\svc_phone.cpp ;file \plugins\UserInfoEx\src\svc_refreshci.cpp ;file \plugins\UserInfoEx\src\svc_reminder.cpp +[an anniversary] +свята [He] Яму [She] @@ -1040,6 +1102,10 @@ Web Дызайн Напамінак пра свята ;file \plugins\UserInfoEx\src\ex_import\classExImContactBase.cpp ;file \plugins\UserInfoEx\src\ex_import\classExImContactXML.cpp +[Settings: %S] +Налады: %S +[Events: %S] +Падзеі: %S ;file \plugins\UserInfoEx\src\ex_import\dlg_ExImModules.cpp [All Contacts] Усе кантакты @@ -1053,16 +1119,34 @@ Miranda NG ;file \plugins\UserInfoEx\src\ex_import\svc_ExImINI.cpp [Import complete] Імпарт завершаны +[Some basic statistics] +Статыстыка +[Added %d of %d contacts stored in the ini-file.] +Дададзена %d з %d кантактаў з ini-файла. +[The ini-file "%s"\nfor reading contact information could not be opened.] +INI файл "%s"\nнельга адчыніць для чытання. ;file \plugins\UserInfoEx\src\ex_import\svc_ExImport.cpp [all Contacts] Усе кантакты [Select a destination file...] Абярыце імя файла для экспарту +[Import User Details from VCard] +Імпарт дэталей карыстальніка з vCard ;file \plugins\UserInfoEx\src\ex_import\svc_ExImXML.cpp +[Can't create xml file!\n%S] +Немагчыма стварыць XML файл!\n%S +[Importing %s caused error %d] +Імпарт %s вызваў памылку %d +[Loading contact %s from xml failed with error %d] +Памылка %d пры загрузцы кантакта %s з xml +[Importing Owner caused error %d] +Імпарт уладальніка вызваў памылку %d [Parser is unable to load XMLCard "%s"\nError: %d\nDescription: %s] Немагчыма загрузіць XML картку "%s"\nПамылка:%d\nАпісанне:%s [The selected file is no valid XMLCard] Абраны файл не з'яўляецца XML карткай +[The version of the XMLCard is not supported by UserInfoEx] +Гэтая версія XML карткіне падтрымліваецца плагінам UserInfoEx [Complete] Гатова [Owner contact successfully imported.] diff --git a/langpacks/replacer.bat b/langpacks/replacer.bat new file mode 100644 index 0000000000..bd4638869c --- /dev/null +++ b/langpacks/replacer.bat @@ -0,0 +1 @@ +langpackmgr -r diff --git a/langpacks/replacer.exe b/langpacks/replacer.exe deleted file mode 100644 index ae6b21c638..0000000000 Binary files a/langpacks/replacer.exe and /dev/null differ 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 @@ - + @@ -26,9 +26,9 @@ - - - + + + @@ -50,12 +50,10 @@ - - @@ -64,123 +62,123 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + 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 deleted file mode 100644 index e5fe684d9c..0000000000 Binary files a/tools/replacer/replacer.ico and /dev/null differ 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 @@ - - - - - - - - - - <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. - -- cgit v1.2.3