diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/langpackmgr/Unit1.dfm | 198 | ||||
-rw-r--r-- | tools/langpackmgr/Unit1.pas | 513 | ||||
-rw-r--r-- | tools/langpackmgr/langpackmgr.dpr | 4 | ||||
-rw-r--r-- | tools/langpackmgr/langpackmgr.dproj | 75 |
4 files changed, 369 insertions, 421 deletions
diff --git a/tools/langpackmgr/Unit1.dfm b/tools/langpackmgr/Unit1.dfm index 90dba5b17b..de0d0cb7c2 100644 --- a/tools/langpackmgr/Unit1.dfm +++ b/tools/langpackmgr/Unit1.dfm @@ -1,160 +1,92 @@ object Form1: TForm1
Left = 0
Top = 0
- BorderIcons = [biSystemMenu, biMinimize]
- BorderStyle = bsSingle
- Caption = 'Miranda Langpack Manager'
- ClientHeight = 286
- ClientWidth = 630
+ AutoSize = True
+ BorderIcons = [biSystemMenu]
+ Caption = 'Miranda NG Langpack Manager'
+ ClientHeight = 343
+ ClientWidth = 643
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'Tahoma'
+ Font.Height = 15
+ Font.Name = 'Verdana'
Font.Style = []
OldCreateOrder = False
+ Position = poMainFormCenter
OnCreate = FormCreate
PixelsPerInch = 96
- TextHeight = 13
- object Label1: TLabel
- Left = 192
- Top = 16
- Width = 37
- Height = 13
- Caption = 'Strings:'
- end
- object Label2: TLabel
- Left = 192
- Top = 35
- Width = 60
- Height = 13
- Caption = 'Untranslate:'
- end
- object Label3: TLabel
- Left = 192
- Top = 54
- Width = 46
- Height = 13
- Caption = 'Changes:'
- end
- object Memo1: TMemo
- Left = 168
- Top = 88
- Width = 449
- Height = 80
- Font.Charset = RUSSIAN_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'Verdana'
- Font.Style = []
- ParentFont = False
- ScrollBars = ssHorizontal
+ TextHeight = 14
+ object ListBox1: TListBox
+ Left = 0
+ Top = 0
+ Width = 137
+ Height = 343
+ ItemHeight = 14
TabOrder = 0
+ OnClick = ListBox1Click
+ OnDblClick = ListBox12Click
end
- object RadioGroup1: TRadioGroup
- Left = 360
- Top = 9
- Width = 257
- Height = 73
- Caption = 'Available translations'
- Columns = 2
- Font.Charset = RUSSIAN_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'Verdana'
- Font.Style = []
- ParentFont = False
+ object Memo1: TMemo
+ Left = 143
+ Top = 0
+ Width = 500
+ Height = 343
+ ScrollBars = ssBoth
TabOrder = 1
- OnClick = RadioGroup1Click
end
- object ComboBox1: TComboBox
- Left = 8
- Top = 8
- Width = 154
- Height = 21
- Style = csDropDownList
+ object Memo2: TMemo
+ Left = 143
+ Top = 153
+ Width = 500
+ Height = 150
+ ScrollBars = ssBoth
TabOrder = 2
- OnChange = ComboBox1Change
+ Visible = False
end
- object Memo2: TMemo
- Left = 168
- Top = 176
- Width = 449
- Height = 80
- Font.Charset = RUSSIAN_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'Verdana'
- Font.Style = []
- ParentFont = False
- ScrollBars = ssHorizontal
+ object Button1: TButton
+ Left = 142
+ Top = 318
+ Width = 75
+ Height = 25
+ Caption = 'Copy'
TabOrder = 3
- end
- object StringGrid1: TStringGrid
- Left = 8
- Top = 35
- Width = 154
- Height = 247
- ColCount = 1
- DefaultColWidth = 150
- DefaultRowHeight = 14
- FixedCols = 0
- RowCount = 1
- FixedRows = 0
- Font.Charset = RUSSIAN_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'Verdana'
- Font.Style = []
- ParentFont = False
- ScrollBars = ssVertical
- TabOrder = 4
- OnClick = Click
- OnDrawCell = Draw
+ Visible = False
+ OnClick = Button1Click
end
object Button2: TButton
- Left = 239
- Top = 262
- Width = 58
- Height = 20
- Caption = 'Google'
- Font.Charset = RUSSIAN_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'Verdana'
- Font.Style = []
- ParentFont = False
- TabOrder = 5
+ Left = 223
+ Top = 318
+ Width = 75
+ Height = 25
+ Caption = 'Translate'
+ TabOrder = 4
+ Visible = False
OnClick = Button2Click
end
object Button3: TButton
- Left = 559
- Top = 262
- Width = 58
- Height = 20
+ Left = 566
+ Top = 318
+ Width = 75
+ Height = 25
Caption = 'Save'
- Font.Charset = RUSSIAN_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'Verdana'
- Font.Style = []
- ParentFont = False
- TabOrder = 6
+ TabOrder = 5
+ Visible = False
OnClick = Button3Click
end
- object Button1: TButton
- Left = 168
- Top = 262
- Width = 58
- Height = 20
- Caption = 'Copy'
- Font.Charset = RUSSIAN_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'Verdana'
- Font.Style = []
- ParentFont = False
- TabOrder = 7
- OnClick = Button1Click
+ object ComboBox1: TComboBox
+ Left = 0
+ Top = 318
+ Width = 136
+ Height = 22
+ Style = csOwnerDrawFixed
+ Enabled = False
+ ItemIndex = 1
+ TabOrder = 6
+ Text = 'Untranslated items'
+ Visible = False
+ Items.Strings = (
+ 'All items'
+ 'Untranslated items')
end
end
diff --git a/tools/langpackmgr/Unit1.pas b/tools/langpackmgr/Unit1.pas index 5267e27673..b7b249eea2 100644 --- a/tools/langpackmgr/Unit1.pas +++ b/tools/langpackmgr/Unit1.pas @@ -3,35 +3,28 @@ unit Unit1; interface
uses
- Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants,
- System.Classes, Vcl.Graphics, Vcl.Controls, Vcl.Forms, Vcl.Dialogs,
- Vcl.StdCtrls, Vcl.ExtCtrls, Vcl.Grids, ShellApi;
+ Winapi.Windows, Winapi.Messages, System.SysUtils, System.Variants, System.Classes, Vcl.Graphics,
+ Vcl.Controls, Vcl.Forms, Vcl.Dialogs, Vcl.StdCtrls, Vcl.Buttons, ShellApi;
type
TForm1 = class(TForm)
+ ListBox1: TListBox;
+ Memo1: TMemo;
+ Memo2: TMemo;
Button1: TButton;
Button2: TButton;
Button3: TButton;
- Label1: TLabel;
- Label2: TLabel;
- Label3: TLabel;
- Memo1: TMemo;
- Memo2: TMemo;
- RadioGroup1: TRadioGroup;
ComboBox1: TComboBox;
- StringGrid1: TStringGrid;
-
+ procedure ListBox12Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
- procedure Click(Sender: TObject);
- procedure Button1Click(Sender: TObject);
+ procedure ListBox1Click(Sender: TObject);
+ procedure langlist;
+ procedure fileslist;
+ procedure stringview;
+ procedure savestring;
procedure Button2Click(Sender: TObject);
procedure Button3Click(Sender: TObject);
- procedure viewline;
- procedure RadioGroup1Click(Sender: TObject);
- procedure ComboBox1Change(Sender: TObject);
- procedure Draw(Sender: TObject; ACol, ARow: Integer; Rect: TRect;
- State: TGridDrawState);
-
+ procedure Button1Click(Sender: TObject);
private
{ Private declarations }
@@ -41,76 +34,48 @@ type var
Form1: TForm1;
- openfile:textfile;
- lang,stmp: string;
- str: array [0..40,0..6000] of string;
- ffile:array [0..6000] of string;
- core: array [0..30] of string;
- l:array [0..6000] of integer;
- ns:array [0..6000] of boolean;
- ii,i,n:integer;
-
-
+ locale:string;
+ z,j,i,qq,l:integer;
+ sr:tsearchrec;
+ res:integer;
+ s:array[0..1,1..6000] of string;
+ u:array[1..6000] of integer;
+ first:string;
+ filename:string;
implementation
{$R *.dfm}
-procedure TForm1.FormCreate(Sender: TObject);
-var
- SR:TSearchRec;
- Res:Integer;
+procedure TForm1.Button1Click(Sender: TObject);
begin
- combobox1.Items.Clear;
- combobox1.Items.Add('=CORE=');
- Res:=FindFirst(ExtractFilePath(Application.ExeName)
- +'\english\plugins\*.txt', faAnyFile, SR);
- while Res = 0 do
- begin
- Form1.comboBox1.Items.Add('p|'+copy(extractfilename(SR.Name),
- 1,length(extractfilename(SR.Name))-4));
- Res:=FindNext(SR);
- end;
- FindClose(SR);
-
- Res:=FindFirst(ExtractFilePath(Application.ExeName)
- +'\english\weather\*.txt', faAnyFile, SR);
- while Res = 0 do
- begin
- Form1.comboBox1.Items.Add('w|'+copy(extractfilename(SR.Name),
- 1,length(extractfilename(SR.Name))-4));
- Res:=FindNext(SR);
- end;
- FindClose(SR);
- end;
-
-
+memo2.lines:=memo1.lines;
+end;
procedure TForm1.Button2Click(Sender: TObject);
-
var str:string; i:integer;
begin
str:='http://translate.google.com/?hl=&ie=yhgg#auto/';
- if form1.Caption='belarusian' then str:=str+'be/';
- if form1.Caption='bulgarian' then str:=str+'bg/';
- if form1.Caption='chinese' then str:=str+'zh-CN/';
- if form1.Caption='czech' then str:=str+'cs/';
- if form1.Caption='duth' then str:=str+'da/';
- if form1.Caption='estonian' then str:=str+'et/';
- if form1.Caption='french' then str:=str+'fr/';
- if form1.Caption='german' then str:=str+'de/';
- if form1.Caption='herbrew' then str:=str+'iw/';
- if form1.Caption='hungarian' then str:=str+'hu/';
- if form1.Caption='italian' then str:=str+'it/';
- if form1.Caption='japanese' then str:=str+'ja/';
- if form1.Caption='korean' then str:=str+'ko/';
- if form1.Caption='norwegian' then str:=str+'no/';
- if form1.Caption='polish' then str:=str+'pl/';
- if form1.Caption='portuguese_br' then str:=str+'pt/';
- if form1.Caption='russian' then str:=str+'ru/';
- if form1.Caption='slovak' then str:=str+'sk/';
- if form1.Caption='spanish' then str:=str+'es/';
- if form1.Caption='turkish' then str:=str+'tr/';
- if form1.Caption='ukrainian' then str:=str+'uk/';
+ if locale='belarusian' then str:=str+'be/';
+ if locale='bulgarian' then str:=str+'bg/';
+ if locale='chinese' then str:=str+'zh-CN/';
+ if locale='czech' then str:=str+'cs/';
+ if locale='duth' then str:=str+'da/';
+ if locale='estonian' then str:=str+'et/';
+ if locale='french' then str:=str+'fr/';
+ if locale='german' then str:=str+'de/';
+ if locale='herbrew' then str:=str+'iw/';
+ if locale='hungarian' then str:=str+'hu/';
+ if locale='italian' then str:=str+'it/';
+ if locale='japanese' then str:=str+'ja/';
+ if locale='korean' then str:=str+'ko/';
+ if locale='norwegian' then str:=str+'no/';
+ if locale='polish' then str:=str+'pl/';
+ if locale='portuguese_br' then str:=str+'pt/';
+ if locale='russian' then str:=str+'ru/';
+ if locale='slovak' then str:=str+'sk/';
+ if locale='spanish' then str:=str+'es/';
+ if locale='turkish' then str:=str+'tr/';
+ if locale='ukrainian' then str:=str+'uk/';
for i:=0 to memo1.Lines.Count-1 do
begin
str:=str+memo1.Lines[i];
@@ -121,61 +86,87 @@ var str:string; i:integer; end;
procedure TForm1.Button3Click(Sender: TObject);
- var fi:integer;
-begin
+var sList:TStringList;
+ begin
+ savestring;
+ sList:=TstringList.Create;
+ sList.add(first);
+ for i := 1 to j do
+ begin
+ if copy(s[0,i],1,1)=';' then
+ sList.add(s[0,i]);
+ if s[1,i]<>'' then
+ begin
+ sList.add(s[0,i]);
+ sList.add(s[1,i]);
+ end;
+ end;
+ sList.SavetoFile(extractfilePath(application.exename)
+ +'/'+locale+'/'+filename+'.txt',TEncoding.UTF8);
+ sList.free;
+end;
- rewrite(openfile);
- writeln(openfile, str[0,0]);
- for fi:=1 to n do
+procedure tform1.fileslist;
+begin
+ ListBox1.Items.Add('=CORE=');
+ Res:=FindFirst(ExtractFilePath(Application.ExeName)
+ +'\english\plugins\*.txt', faAnyFile, SR);
+ while Res = 0 do
+ begin
+ listBox1.Items.Add('plugins\'+copy(extractfilename(SR.Name),1,
+ length(extractfilename(SR.Name))-4));
+ Res:=FindNext(SR);
+ end;
+ FindClose(SR);
+ Res:=FindFirst(ExtractFilePath(Application.ExeName)
+ +'\english\weather\*.txt', faAnyFile, SR);
+ while Res = 0 do
begin
- if copy(str[0,fi],1,1)=';' then
- writeln(openfile, str[0,fi]);
- if (copy(str[0,fi],1,1)='[') and (str[1,fi]<>'') then
- begin
- writeln(openfile, str[0,fi]);
- writeln(openfile, str[1,fi]);
- end;
+ listBox1.Items.Add('weather\'+copy(extractfilename(SR.Name),1,
+ length(extractfilename(SR.Name))-4));
+ Res:=FindNext(SR);
end;
- CloseFile(openfile);
+ FindClose(SR);
end;
-procedure TForm1.Button1Click(Sender: TObject);
-begin
- memo2.Lines:=memo1.Lines;
-end;
+procedure tform1.langlist;
+ 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
+ ListBox1.Items.Add(SR.name);
+ Res:=FindNext(SR);
+ end;
+ FindClose(SR);
+ end;
-procedure TForm1.Click(Sender: TObject);
-var sa:integer; da:string;
+procedure tform1.savestring;
+var sa:integer;
begin
- da:=str[1,l[ii]];
- str[1,l[ii]]:='';
+ s[1,u[l]]:='';
for sa:=0 to memo2.Lines.Count-1 do
-begin
- str[1,l[ii]]:=str[1,l[ii]]+memo2.Lines[sa];
- if sa<>memo2.Lines.Count-1 then str[1,l[ii]]:=str[1,l[ii]]+'\n';
-end;
- if str[1,l[ii]]<>da then ns[ii]:=true;
-memo1.Lines.clear;
-memo2.Lines.clear;
-viewline;
-ii:=stringgrid1.Row;
-stringgrid1.rowcount:=stringgrid1.rowcount+1;
-stringgrid1.rowcount:=stringgrid1.rowcount-1;
+ begin
+ s[1,u[l]]:=s[1,u[l]]+memo2.Lines[sa];
+ if sa<>memo2.Lines.Count-1 then s[1,u[l]]:=s[1,u[l]]+'\n';
+ end;
end;
-procedure tform1.viewline;
-var im,m:integer;
-untranslate,changes: integer;
+procedure tform1.stringview;
+var
+im,m:integer;
sse:string;
-begin
- m:=1;
- if RadioGroup1.itemindex=0
- then
- sse:=copy(str[0,l[stringgrid1.row]],2, length(str[0,l[stringgrid1.row]])-2)
- else
- sse:=str[2,l[stringgrid1.row]];
- for im := 1 to length(sse)-1 do
+ begin
+ sse:=copy(s[0,u[listbox1.itemindex]],2,
+ length(s[0,u[listbox1.itemindex]])-2);
+ m:=1;
+ for im := 1 to length(sse)-1 do
begin
if copy(sse,im,2)='\n' then
begin
@@ -183,172 +174,156 @@ begin m:=im+2;
end;
end;
+ memo2.Lines.Clear;
+ l:=listbox1.itemindex;
if m=1 then memo1.Lines.Add(sse)
else memo1.Lines.Add(copy(sse,m,length(sse)-m+2));
- if str[1,l[stringgrid1.row]]<>'' then
+ if s[1,u[listbox1.itemindex]]<>'' then
begin
m:=1;
- for im := 1 to length(str[1,l[stringgrid1.row]])-1 do
+ for im := 1 to length(s[1,u[listbox1.itemindex]])-1 do
begin
- if copy(str[1,l[stringgrid1.row]],im,2)='\n' then
+ if copy(s[1,u[listbox1.itemindex]],im,2)='\n' then
begin
- memo2.Lines.Add(copy(str[1,l[stringgrid1.row]],m,im-m));
+ memo2.Lines.Add(copy(s[1,u[listbox1.itemindex]],m,im-m));
m:=im+2;
end;
end;
- if m=1 then memo2.Lines.Add(str[1,l[stringgrid1.row]])
- else memo2.Lines.Add(copy(str[1,l[stringgrid1.row]],m,
- length(str[1,l[stringgrid1.row]])-m+2));
+ if m=1 then memo2.Lines.Add(s[1,u[listbox1.itemindex]])
+ else memo2.Lines.Add(copy(s[1,u[listbox1.itemindex]],m,
+ length(s[1,u[listbox1.itemindex]])-m+2));
end;
+ end;
- changes:=0;
- for im:= 0 to stringgrid1.rowcount-1 do
- if ns[im]=true then changes:=changes+1;
- label2.Caption:='Changes:'+inttostr(changes);
- untranslate:=0;
- for im:= 0 to stringgrid1.rowcount-1 do
- if str[1,l[im]]='' then untranslate:=untranslate+1;
- label3.Caption:='Untranslate:'+inttostr(untranslate);
-
-end;
-
-
-procedure TForm1.ComboBox1Change(Sender: TObject);
+procedure TForm1.FormCreate(Sender: TObject);
+ begin
+ langlist;
+ qq:=0;
+ end;
-begin
- for i := 0 to 6000 do
- begin
- for n:=0 to 40 do str[n,i]:='';
- l[i]:=0;
- ns[i]:=false;
- memo1.Lines.Clear;
- memo2.Lines.Clear;
- end;
- if ComboBox1.Text='=CORE=' then
- assignfile(openfile,ExtractFilePath(Application.ExeName)+
- '\english\=CORE=.txt',CP_UTF8);
- if copy(ComboBox1.Text,1,2)='w|' then
- assignfile(openfile,ExtractFilePath(Application.ExeName)+
- '\english\weather\'+copy(ComboBox1.Text,3,length(ComboBox1.Text)-2)+'.txt',CP_UTF8);
- if copy(ComboBox1.Text,1,2)='p|' then
- assignfile(openfile,ExtractFilePath(Application.ExeName)+
- '\english\plugins\'+copy(ComboBox1.Text,3,length(ComboBox1.Text)-2)+'.txt',CP_UTF8);
- reset(openfile);
- readln(openfile,stmp);
- str[0,0]:=stmp;
- stringgrid1.Rowcount:=0;
- n:=0;
-while not eof(openfile) do
-begin
- n:=n+1;
- readln(openfile,stmp);
- str[0,n]:=stmp;
- if copy(stmp,1,1)='[' then
+procedure TForm1.ListBox1Click(Sender: TObject);
begin
- l[stringgrid1.Rowcount-1]:=n;
- stringgrid1.Cells[0,stringgrid1.Rowcount-1]:=stmp;
- stringgrid1.Rowcount:=stringgrid1.Rowcount+1;
+ if qq=0 then
+ begin
+ if listbox1.itemindex<>-1 then
+ begin
+ memo1.Lines.Clear;
+ memo1.Lines.LoadFromFile(extractfilePath(application.exename)
+ +'/'+listbox1.items[listbox1.itemindex]+'/=HEAD=.txt');
+ end;
+ end;
+ if (qq=2) and (listbox1.itemindex>0)then
+ begin
+ savestring;
+ {}
+ memo1.Lines.clear;
+ memo2.Lines.clear;
+ stringview;
+ end;
end;
-end;
-//////////////////////////////////////////////////////////
-if RadioGroup1.Items.Count=2 then
-begin
- if ComboBox1.Text='=CORE=' then
- assignfile(openfile,ExtractFilePath(Application.ExeName)+
- '\'+RadioGroup1.Items[1]+'\=CORE=.txt',CP_UTF8);
- if copy(ComboBox1.Text,1,2)='w|' then
- assignfile(openfile,ExtractFilePath(Application.ExeName)+'\'
- +RadioGroup1.Items[1]+
- '\weather\'+copy(ComboBox1.Text,3,length(ComboBox1.Text)-2)+'.txt',CP_UTF8);
- if copy(ComboBox1.Text,1,2)='p|' then
- assignfile(openfile,ExtractFilePath(Application.ExeName)+'\'
- +RadioGroup1.Items[1]+
- '\plugins\'+copy(ComboBox1.Text,3,length(ComboBox1.Text)-2)+'.txt',CP_UTF8);
- reset(openfile);
- readln(openfile);
- n:=0;
- while not eof(openfile) do
+procedure TForm1.ListBox12Click(Sender: TObject);
+var llist:TStringList;
+f:textfile;
begin
- readln(openfile,ffile[n]);
- n:=n+1;
-end;
-for i := 0 to stringgrid1.Rowcount do
-for ii := 0 to n-1 do
-if ffile[ii]=stringgrid1.cells[0,i] then
-str[2,l[i]]:=ffile[ii+1];
-end;
-///////////////////////////////////////
-//////////////////////////////////////////////////////////
- if ComboBox1.Text='=CORE=' then
- assignfile(openfile,ExtractFilePath(Application.ExeName)+
- '\'+form1.Caption+'\=CORE=.txt',CP_UTF8);
- if copy(ComboBox1.Text,1,2)='w|' then
- assignfile(openfile,ExtractFilePath(Application.ExeName)+'\'+form1.Caption+
- '\weather\'+copy(ComboBox1.Text,3,length(ComboBox1.Text)-2)+'.txt',CP_UTF8);
- if copy(ComboBox1.Text,1,2)='p|' then
- assignfile(openfile,ExtractFilePath(Application.ExeName)+'\'+form1.Caption+
- '\plugins\'+copy(ComboBox1.Text,3,length(ComboBox1.Text)-2)+'.txt',CP_UTF8);
- reset(openfile);
- readln(openfile);
- n:=0;
- while not eof(openfile) do
-begin
- readln(openfile,ffile[n]);
- n:=n+1;
-end;
-for i := 0 to stringgrid1.Rowcount do
-for ii := 0 to n-1 do
-if ffile[ii]=stringgrid1.cells[0,i] then
-str[1,l[i]]:=ffile[ii+1];
-////////////////////////////////////////////////////////////////
-
+case qq of
+
+ 0:begin
+ ListBox1.height:=300;
+ Combobox1.Visible:=true;
+ Memo1.Lines.Clear;
+ Memo1.Height:=150;
+ Memo2.Visible:=true;
+ Button1.Visible:=true;
+ Button2.Visible:=true;
+ Button3.Visible:=true;
+ locale:=listbox1.items[listbox1.itemindex];
+ listbox1.items.clear;
+ form1.Caption:='Miranda NG Langpack Manager: '+locale;
+ listbox1.items.add('..');
+ fileslist;
+ qq:=1;
+ end;
-stringgrid1.Rowcount:=stringgrid1.Rowcount-1;
-label1.Caption:='Strings:'+inttostr(stringgrid1.Rowcount);
+ 1:begin
+ if listbox1.items[listbox1.itemindex]='..' then
+ begin
+ ListBox1.height:=343;
+ Combobox1.Visible:=false;
+ ListBox1.Items.clear;
+ Memo1.Lines.Clear;
+ Memo1.Height:=343;
+ Memo2.Visible:=false;
+ Button1.Visible:=false;
+ Button2.Visible:=false;
+ Button3.Visible:=false;
+ langlist;
+ listbox1.itemindex:=0;
+ form1.Caption:='Miranda NG Langpack Manager';
+ qq:=0;
+ end
+ else
+ begin
+ for i := 1 to 6000 do
+ begin s[0,i]:='';s[1,i]:='';end;
+ j:=0;
+ lList:=TstringList.Create;
+ lList.LoadFromFile(extractfilePath(application.exename)+'/english/'
+ +listbox1.items[listbox1.itemindex]+'.txt',TEncoding.UTF8);
+ first:=lList[0];
+ for i := 1 to lList.Count-1 do
+ begin
+ j:=j+1;
+ s[0,j]:=lList[i];
+ end;
+ //
+ if not FileExists(extractfilePath(application.exename)
+ +'/'+locale+'/'+listbox1.items[listbox1.itemindex]+'.txt')
+ then
+ begin
+ assignfile(f,extractfilePath(application.exename)
+ +'/'+locale+'/'+listbox1.items[listbox1.itemindex]+'.txt');
+ rewrite(f);
+ closefile(f);
+ end;
+//
+ lList.LoadFromFile(extractfilePath(application.exename)+'/'+locale+'/'
+ +listbox1.items[listbox1.itemindex]+'.txt',TEncoding.UTF8);
+ for z:= 1 to j do
+ for i := 1 to lList.count-2 do
+ if (copy(s[0,z],1,1)='[')and(s[0,z]=lList[i]) then
+ s[1,z]:=lList[i+1];
+ lList.free;
+ form1.Caption:='Miranda NG Langpack Manager - '
+ +locale+':'+listbox1.items[listbox1.itemindex];
+ filename:=listbox1.items[listbox1.itemindex];
+ listbox1.items.Clear;
+ listbox1.items.add('..');
+ z:=0;
+ for i := 1 to j do
+ if (copy(s[0,i],1,1)='[')and(s[1,i]='') then
+ begin
+ z:=z+1;
+ u[z]:=i;
+ listbox1.items.add(copy(s[0,i],2,length(s[0,i])-2));
+ end;
-ii:=0;
-viewline;
-end;
+ qq:=2;
+ end;
+ end;
-procedure TForm1.Draw(Sender: TObject; ACol, ARow: Integer; Rect: TRect;
- State: TGridDrawState);
-Var
- StringGrid: TStringGrid;
- Can: TCanvas;
-begin
- StringGrid := Sender as TStringGrid;
- Can := StringGrid.Canvas; Can.Font := StringGrid.Font;
- if (ARow >= StringGrid.FixedRows) and (ACol >= StringGrid.FixedCols)
- then Can.Brush.Color := StringGrid.Color
- else Can.Brush.Color := StringGrid.FixedColor;
- if str[1,l[ARow]]='' then Can.Brush.Color:=clRed;
- if ns[arow]=true then Can.Brush.Color:=clGreen;
- Can.FillRect(Rect);
- Can.TextOut(Rect.Left+2,Rect.Top+2, StringGrid.Cells[ACol, ARow]);
+ 2:begin
+ if listbox1.items[listbox1.itemindex]='..' then
+ begin
+ listbox1.Items.Clear;
+ listbox1.Items.Add('..');
+ fileslist;
+ memo1.Lines.Clear;
+ memo2.Lines.Clear;
+ form1.Caption:='Miranda NG Langpack Manager - '+locale;
+ qq:=1;
+ end;
+ end;
end;
-
-procedure TForm1.RadioGroup1Click(Sender: TObject);
-var m,im:integer;
-sse:string;
-begin
-memo1.Lines.Clear;
- m:=1;
- if RadioGroup1.itemindex=0
- then
- sse:=copy(str[0,l[stringgrid1.row]],2, length(str[0,l[stringgrid1.row]])-2)
- else
- sse:=str[2,l[stringgrid1.row]];
- for im := 1 to length(sse)-1 do
- begin
- if copy(sse,im,2)='\n' then
- begin
- memo1.Lines.Add(copy(sse,m,im-m));
- m:=im+2;
- end;
- end;
- if m=1 then memo1.Lines.Add(sse)
- else memo1.Lines.Add(copy(sse,m,length(sse)-m+2));
end;
-
end.
diff --git a/tools/langpackmgr/langpackmgr.dpr b/tools/langpackmgr/langpackmgr.dpr index e112488cdd..028bee13c4 100644 --- a/tools/langpackmgr/langpackmgr.dpr +++ b/tools/langpackmgr/langpackmgr.dpr @@ -2,11 +2,9 @@ program LangPackMgr; uses
Vcl.Forms,
- Windows,
Unit1 in 'Unit1.pas' {Form1};
-{$SETPEFlAGS IMAGE_FILE_RELOCS_STRIPPED or IMAGE_FILE_DEBUG_STRIPPED or
- IMAGE_FILE_LINE_NUMS_STRIPPED or IMAGE_FILE_LOCAL_SYMS_STRIPPED or
+{ IMAGE_FILE_LINE_NUMS_STRIPPED or IMAGE_FILE_LOCAL_SYMS_STRIPPED or
IMAGE_FILE_REMOVABLE_RUN_FROM_SWAP or IMAGE_FILE_NET_RUN_FROM_SWAP}
{$WEAKLINKRTTI ON}
{$RTTI EXPLICIT METHODS([]) PROPERTIES([]) FIELDS([])}
diff --git a/tools/langpackmgr/langpackmgr.dproj b/tools/langpackmgr/langpackmgr.dproj index db9e5ea4d5..321e9ce4ed 100644 --- a/tools/langpackmgr/langpackmgr.dproj +++ b/tools/langpackmgr/langpackmgr.dproj @@ -1,13 +1,13 @@ <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
- <ProjectGuid>{0EBDA2CA-166A-4A20-9D10-AC4E99A83991}</ProjectGuid>
+ <ProjectGuid>{2DD0A017-C6BD-47BC-89F3-19A1F4372290}</ProjectGuid>
<ProjectVersion>14.6</ProjectVersion>
<FrameworkType>VCL</FrameworkType>
<MainSource>LangPackMgr.dpr</MainSource>
<Base>True</Base>
<Config Condition="'$(Config)'==''">Release</Config>
<Platform Condition="'$(Platform)'==''">Win32</Platform>
- <TargetedPlatforms>1</TargetedPlatforms>
+ <TargetedPlatforms>3</TargetedPlatforms>
<AppType>Application</AppType>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
@@ -18,6 +18,11 @@ <CfgParent>Base</CfgParent>
<Base>true</Base>
</PropertyGroup>
+ <PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
+ <Base_Win64>true</Base_Win64>
+ <CfgParent>Base</CfgParent>
+ <Base>true</Base>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_1)'!=''">
<Cfg_1>true</Cfg_1>
<CfgParent>Base</CfgParent>
@@ -29,6 +34,12 @@ <Cfg_1>true</Cfg_1>
<Base>true</Base>
</PropertyGroup>
+ <PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win64)'!=''">
+ <Cfg_1_Win64>true</Cfg_1_Win64>
+ <CfgParent>Cfg_1</CfgParent>
+ <Cfg_1>true</Cfg_1>
+ <Base>true</Base>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_2)'!=''">
<Cfg_2>true</Cfg_2>
<CfgParent>Base</CfgParent>
@@ -40,17 +51,20 @@ <Cfg_2>true</Cfg_2>
<Base>true</Base>
</PropertyGroup>
+ <PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64)'!=''">
+ <Cfg_2_Win64>true</Cfg_2_Win64>
+ <CfgParent>Cfg_2</CfgParent>
+ <Cfg_2>true</Cfg_2>
+ <Base>true</Base>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Base)'!=''">
- <VerInfo_MajorVer>2</VerInfo_MajorVer>
- <VerInfo_Locale>2057</VerInfo_Locale>
- <VerInfo_PreRelease>true</VerInfo_PreRelease>
+ <VerInfo_Locale>1049</VerInfo_Locale>
+ <VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=2.0.1.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=2.0.0.0;Comments=</VerInfo_Keys>
<Manifest_File>None</Manifest_File>
- <VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=2.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=2.0.0.0;Comments=</VerInfo_Keys>
- <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;Vcl;Vcl.Imaging;Vcl.Touch;Vcl.Samples;Vcl.Shell;$(DCC_Namespace)</DCC_Namespace>
<Icon_MainIcon>$(BDS)\bin\delphi_PROJECTICON.ico</Icon_MainIcon>
<DCC_DcuOutput>.\$(Platform)\$(Config)</DCC_DcuOutput>
- <DCC_ExeOutput>.\$(Platform)\$(Config)</DCC_ExeOutput>
+ <DCC_ExeOutput>.\..\..\langpacks\</DCC_ExeOutput>
<DCC_E>false</DCC_E>
<DCC_N>false</DCC_N>
<DCC_S>false</DCC_S>
@@ -58,12 +72,20 @@ <DCC_K>false</DCC_K>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
- <DCC_UsePackage>bindcompfmx;DBXSqliteDriver;vcldbx;fmx;rtl;dbrtl;DbxClientDriver;IndySystem;TeeDB;bindcomp;inetdb;vclib;inetdbbde;DBXInterBaseDriver;DataSnapClient;DataSnapCommon;DBXOdbcDriver;DataSnapServer;Tee;DataSnapProviderClient;xmlrtl;svnui;ibxpress;DbxCommonDriver;DBXSybaseASEDriver;vclimg;IndyProtocols;dbxcds;DBXMySQLDriver;DatasnapConnectorsFreePascal;MetropolisUILiveTile;vclactnband;bindengine;vcldb;soaprtl;bindcompdbx;vcldsnap;bindcompvcl;FMXTee;TeeUI;vclie;vcltouch;DBXDb2Driver;websnap;DBXOracleDriver;CustomIPTransport;vclribbon;VclSmp;dsnap;IndyIPServer;DBXInformixDriver;Intraweb;IndyCore;vcl;DataSnapConnectors;IndyIPCommon;CloudService;DBXMSSQLDriver;dsnapcon;DBXFirebirdDriver;FmxTeeUI;inet;vclx;inetdbxpress;webdsnap;svn;DBXSybaseASADriver;bdertl;dbexpress;adortl;DataSnapIndy10ServerTransport;IndyIPClient;$(DCC_UsePackage)</DCC_UsePackage>
+ <DCC_UsePackage>bindcompfmx;DBXSqliteDriver;vcldbx;rtl;dbrtl;DbxClientDriver;IndySystem;bindcomp;inetdb;inetdbbde;DBXInterBaseDriver;DataSnapClient;DataSnapCommon;DBXOdbcDriver;DataSnapServer;DataSnapProviderClient;xmlrtl;svnui;DBXSybaseASEDriver;DbxCommonDriver;vclimg;IndyProtocols;dbxcds;DBXMySQLDriver;DatasnapConnectorsFreePascal;MetropolisUILiveTile;bindcompdbx;vclactnband;bindengine;vcldb;soaprtl;vcldsnap;bindcompvcl;vclie;vcltouch;DBXDb2Driver;DBXOracleDriver;CustomIPTransport;VclSmp;dsnap;IndyIPServer;DBXInformixDriver;IndyCore;vcl;DataSnapConnectors;IndyIPCommon;CloudService;DBXMSSQLDriver;dsnapcon;DBXFirebirdDriver;inet;vclx;inetdbxpress;webdsnap;svn;DBXSybaseASADriver;bdertl;dbexpress;adortl;DataSnapIndy10ServerTransport;IndyIPClient;$(DCC_UsePackage)</DCC_UsePackage>
<Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
<DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
+ <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
<VerInfo_Locale>1033</VerInfo_Locale>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Base_Win64)'!=''">
+ <DCC_UsePackage>bindcompfmx;DBXSqliteDriver;rtl;dbrtl;DbxClientDriver;IndySystem;bindcomp;inetdb;DBXInterBaseDriver;DataSnapClient;DataSnapCommon;DBXOdbcDriver;DataSnapServer;DataSnapProviderClient;xmlrtl;DBXSybaseASEDriver;DbxCommonDriver;vclimg;IndyProtocols;dbxcds;DBXMySQLDriver;DatasnapConnectorsFreePascal;MetropolisUILiveTile;bindcompdbx;vclactnband;bindengine;vcldb;soaprtl;vcldsnap;bindcompvcl;vclie;vcltouch;DBXDb2Driver;DBXOracleDriver;CustomIPTransport;VclSmp;dsnap;IndyIPServer;DBXInformixDriver;IndyCore;vcl;DataSnapConnectors;IndyIPCommon;CloudService;DBXMSSQLDriver;dsnapcon;DBXFirebirdDriver;inet;vclx;inetdbxpress;webdsnap;DBXSybaseASADriver;dbexpress;adortl;DataSnapIndy10ServerTransport;IndyIPClient;$(DCC_UsePackage)</DCC_UsePackage>
+ <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
+ <DCC_Namespace>Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
+ <VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
+ <VerInfo_Locale>1033</VerInfo_Locale>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1)'!=''">
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
@@ -74,8 +96,18 @@ <DCC_RemoteDebug>true</DCC_RemoteDebug>
</PropertyGroup>
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
+ <VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
+ <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
+ <VerInfo_Locale>1033</VerInfo_Locale>
+ <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<DCC_RemoteDebug>false</DCC_RemoteDebug>
</PropertyGroup>
+ <PropertyGroup Condition="'$(Cfg_1_Win64)'!=''">
+ <VerInfo_Locale>1033</VerInfo_Locale>
+ <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
+ <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
+ <VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
+ </PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2)'!=''">
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
@@ -84,15 +116,18 @@ </PropertyGroup>
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
<VerInfo_MajorVer>2</VerInfo_MajorVer>
- <VerInfo_PreRelease>true</VerInfo_PreRelease>
+ <VerInfo_AutoIncVersion>true</VerInfo_AutoIncVersion>
+ <VerInfo_Locale>1059</VerInfo_Locale>
+ <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
+ <VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=2.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=2.0.0.0;Comments=</VerInfo_Keys>
- <DCC_ExeOutput>.\..\..\langpacks\</DCC_ExeOutput>
- <DCC_DcuOutput>.\..\..\langpacks\</DCC_DcuOutput>
+ <Icon_MainIcon>LPmanager_Icon.ico</Icon_MainIcon>
+ </PropertyGroup>
+ <PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
+ <VerInfo_Locale>1059</VerInfo_Locale>
+ <Manifest_File>$(BDS)\bin\default_app.manifest</Manifest_File>
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
- <Icon_MainIcon>langpackmgr.ico</Icon_MainIcon>
- <VerInfo_Locale>1033</VerInfo_Locale>
- <DCC_AssertionsAtRuntime>false</DCC_AssertionsAtRuntime>
- <DCC_ImportedDataReferences>false</DCC_ImportedDataReferences>
+ <VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
</PropertyGroup>
<ItemGroup>
<DelphiCompile Include="$(MainSource)">
@@ -147,12 +182,18 @@ <VersionInfoKeys Name="Comments"/>
<VersionInfoKeys Name="CFBundleName"/>
<VersionInfoKeys Name="CFBundleDisplayName"/>
+ <VersionInfoKeys Name="UIDeviceFamily"/>
<VersionInfoKeys Name="CFBundleIdentifier"/>
<VersionInfoKeys Name="CFBundleVersion"/>
<VersionInfoKeys Name="CFBundlePackageType"/>
<VersionInfoKeys Name="CFBundleSignature"/>
<VersionInfoKeys Name="CFBundleAllowMixedLocalizations"/>
+ <VersionInfoKeys Name="UISupportedInterfaceOrientations"/>
<VersionInfoKeys Name="CFBundleExecutable"/>
+ <VersionInfoKeys Name="CFBundleResourceSpecification"/>
+ <VersionInfoKeys Name="LSRequiresIPhoneOS"/>
+ <VersionInfoKeys Name="CFBundleInfoDictionaryVersion"/>
+ <VersionInfoKeys Name="CFBundleDevelopmentRegion"/>
</VersionInfoKeys>
<Source>
<Source Name="MainSource">LangPackMgr.dpr</Source>
@@ -165,7 +206,9 @@ <Deployment/>
<Platforms>
<Platform value="Win32">True</Platform>
+ <Platform value="Win64">True</Platform>
</Platforms>
+ <ModelSupport>False</ModelSupport>
</BorlandProject>
<ProjectFileVersion>12</ProjectFileVersion>
</ProjectExtensions>
|