From bfcd4694ae34a6412a729bb5b3693032332c9bd3 Mon Sep 17 00:00:00 2001 From: Kirill Volinsky Date: Sun, 22 Jul 2012 14:40:19 +0000 Subject: Langpack Suite updated: vi from mir-vi supported new files names supported removed old langpack support git-svn-id: http://svn.miranda-ng.org/main/trunk@1101 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- tools/Langpack Suite/Form1.Designer.cs | 65 +-- tools/Langpack Suite/Form1.cs | 188 ++------ tools/Langpack Suite/Form1.resx | 2 +- tools/Langpack Suite/LangpackSuite.csproj | 3 + tools/Langpack Suite/LangpackSuite.sln | 20 + tools/Langpack Suite/myRes.Designer.cs | 624 +++++++++++++++++++++++++++ tools/Langpack Suite/myRes.resx | 9 - tools/Langpack Suite/myRes.ru-RU.Designer.cs | 0 tools/Langpack Suite/myRes.ru-RU.resx | 9 - tools/Langpack Suite/ref/HtmlAgilityPack.dll | Bin 0 -> 149504 bytes tools/Langpack Suite/res/V.ico | Bin 0 -> 2550 bytes 11 files changed, 692 insertions(+), 228 deletions(-) create mode 100644 tools/Langpack Suite/LangpackSuite.sln create mode 100644 tools/Langpack Suite/myRes.Designer.cs create mode 100644 tools/Langpack Suite/myRes.ru-RU.Designer.cs create mode 100644 tools/Langpack Suite/ref/HtmlAgilityPack.dll create mode 100644 tools/Langpack Suite/res/V.ico diff --git a/tools/Langpack Suite/Form1.Designer.cs b/tools/Langpack Suite/Form1.Designer.cs index 0bde227757..1634f81501 100644 --- a/tools/Langpack Suite/Form1.Designer.cs +++ b/tools/Langpack Suite/Form1.Designer.cs @@ -34,9 +34,6 @@ this.LangpackNameEdit = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); this.InfMessageLangBox = new System.Windows.Forms.TextBox(); - this.CommentMUIDCheckBox = new System.Windows.Forms.CheckBox(); - this.groupBox4 = new System.Windows.Forms.GroupBox(); - this.ANSICheckBox = new System.Windows.Forms.CheckBox(); this.tabControl1 = new System.Windows.Forms.TabControl(); this.tabPage1 = new System.Windows.Forms.TabPage(); this.groupBox3 = new System.Windows.Forms.GroupBox(); @@ -69,7 +66,6 @@ this.LanguageComboBox = new System.Windows.Forms.ComboBox(); this.VarButton = new System.Windows.Forms.Button(); this.groupBox2.SuspendLayout(); - this.groupBox4.SuspendLayout(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); this.groupBox3.SuspendLayout(); @@ -82,7 +78,7 @@ // // CreateLangpackBtn // - this.CreateLangpackBtn.Location = new System.Drawing.Point(99, 258); + this.CreateLangpackBtn.Location = new System.Drawing.Point(99, 187); this.CreateLangpackBtn.Name = "CreateLangpackBtn"; this.CreateLangpackBtn.Size = new System.Drawing.Size(141, 31); this.CreateLangpackBtn.TabIndex = 1; @@ -121,7 +117,7 @@ // InfMessageLangBox // this.InfMessageLangBox.BackColor = System.Drawing.SystemColors.Control; - this.InfMessageLangBox.Location = new System.Drawing.Point(7, 295); + this.InfMessageLangBox.Location = new System.Drawing.Point(7, 224); this.InfMessageLangBox.Multiline = true; this.InfMessageLangBox.Name = "InfMessageLangBox"; this.InfMessageLangBox.ReadOnly = true; @@ -129,37 +125,6 @@ this.InfMessageLangBox.Size = new System.Drawing.Size(317, 70); this.InfMessageLangBox.TabIndex = 3; // - // CommentMUIDCheckBox - // - this.CommentMUIDCheckBox.AutoSize = true; - this.CommentMUIDCheckBox.Location = new System.Drawing.Point(9, 20); - this.CommentMUIDCheckBox.Name = "CommentMUIDCheckBox"; - this.CommentMUIDCheckBox.Size = new System.Drawing.Size(186, 17); - this.CommentMUIDCheckBox.TabIndex = 6; - this.CommentMUIDCheckBox.Text = "Comment MUID for Core less 0.10"; - this.CommentMUIDCheckBox.UseVisualStyleBackColor = true; - // - // groupBox4 - // - this.groupBox4.Controls.Add(this.ANSICheckBox); - this.groupBox4.Controls.Add(this.CommentMUIDCheckBox); - this.groupBox4.Location = new System.Drawing.Point(6, 184); - this.groupBox4.Name = "groupBox4"; - this.groupBox4.Size = new System.Drawing.Size(317, 70); - this.groupBox4.TabIndex = 7; - this.groupBox4.TabStop = false; - this.groupBox4.Text = "Old Core Support"; - // - // ANSICheckBox - // - this.ANSICheckBox.AutoSize = true; - this.ANSICheckBox.Location = new System.Drawing.Point(9, 43); - this.ANSICheckBox.Name = "ANSICheckBox"; - this.ANSICheckBox.Size = new System.Drawing.Size(180, 17); - this.ANSICheckBox.TabIndex = 7; - this.ANSICheckBox.Text = "ANSI Format for Core less 0.9.30"; - this.ANSICheckBox.UseVisualStyleBackColor = true; - // // tabControl1 // this.tabControl1.Controls.Add(this.tabPage1); @@ -168,7 +133,7 @@ this.tabControl1.Location = new System.Drawing.Point(-3, 0); this.tabControl1.Name = "tabControl1"; this.tabControl1.SelectedIndex = 0; - this.tabControl1.Size = new System.Drawing.Size(337, 393); + this.tabControl1.Size = new System.Drawing.Size(337, 321); this.tabControl1.TabIndex = 8; // // tabPage1 @@ -177,13 +142,12 @@ this.tabPage1.Controls.Add(this.InfMessageLangBox); this.tabPage1.Controls.Add(this.groupBox2); this.tabPage1.Controls.Add(this.CreateLangpackBtn); - this.tabPage1.Controls.Add(this.groupBox4); this.tabPage1.Controls.Add(this.groupBox3); this.tabPage1.Controls.Add(this.groupBox6); this.tabPage1.Location = new System.Drawing.Point(4, 22); this.tabPage1.Name = "tabPage1"; this.tabPage1.Padding = new System.Windows.Forms.Padding(3); - this.tabPage1.Size = new System.Drawing.Size(329, 367); + this.tabPage1.Size = new System.Drawing.Size(329, 295); this.tabPage1.TabIndex = 0; this.tabPage1.Text = "Generator"; // @@ -279,7 +243,7 @@ this.tabPage2.Location = new System.Drawing.Point(4, 22); this.tabPage2.Name = "tabPage2"; this.tabPage2.Padding = new System.Windows.Forms.Padding(3); - this.tabPage2.Size = new System.Drawing.Size(329, 367); + this.tabPage2.Size = new System.Drawing.Size(329, 295); this.tabPage2.TabIndex = 1; this.tabPage2.Text = "LinkListGen"; // @@ -308,7 +272,7 @@ this.InfMessageLinkBox.Name = "InfMessageLinkBox"; this.InfMessageLinkBox.ReadOnly = true; this.InfMessageLinkBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.InfMessageLinkBox.Size = new System.Drawing.Size(317, 132); + this.InfMessageLinkBox.Size = new System.Drawing.Size(317, 62); this.InfMessageLinkBox.TabIndex = 4; // // LinkListGenBtn @@ -342,7 +306,7 @@ this.tabPage3.Location = new System.Drawing.Point(4, 22); this.tabPage3.Name = "tabPage3"; this.tabPage3.Padding = new System.Windows.Forms.Padding(3); - this.tabPage3.Size = new System.Drawing.Size(329, 367); + this.tabPage3.Size = new System.Drawing.Size(329, 295); this.tabPage3.TabIndex = 2; this.tabPage3.Text = "Dupes Search"; // @@ -354,7 +318,7 @@ this.InfMessageFindBox.Name = "InfMessageFindBox"; this.InfMessageFindBox.ReadOnly = true; this.InfMessageFindBox.ScrollBars = System.Windows.Forms.ScrollBars.Vertical; - this.InfMessageFindBox.Size = new System.Drawing.Size(317, 132); + this.InfMessageFindBox.Size = new System.Drawing.Size(317, 62); this.InfMessageFindBox.TabIndex = 6; // // CommentFindBtn @@ -467,7 +431,7 @@ // // label5 // - this.label5.Location = new System.Drawing.Point(83, 400); + this.label5.Location = new System.Drawing.Point(83, 327); this.label5.Name = "label5"; this.label5.Size = new System.Drawing.Size(119, 18); this.label5.TabIndex = 9; @@ -481,7 +445,7 @@ this.LanguageComboBox.Items.AddRange(new object[] { "English", "Русский"}); - this.LanguageComboBox.Location = new System.Drawing.Point(204, 397); + this.LanguageComboBox.Location = new System.Drawing.Point(204, 324); this.LanguageComboBox.Name = "LanguageComboBox"; this.LanguageComboBox.Size = new System.Drawing.Size(121, 21); this.LanguageComboBox.TabIndex = 10; @@ -490,7 +454,7 @@ // VarButton // this.VarButton.Image = ((System.Drawing.Image)(resources.GetObject("VarButton.Image"))); - this.VarButton.Location = new System.Drawing.Point(7, 395); + this.VarButton.Location = new System.Drawing.Point(7, 322); this.VarButton.Name = "VarButton"; this.VarButton.Size = new System.Drawing.Size(22, 22); this.VarButton.TabIndex = 11; @@ -501,7 +465,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(329, 422); + this.ClientSize = new System.Drawing.Size(329, 348); this.Controls.Add(this.VarButton); this.Controls.Add(this.LanguageComboBox); this.Controls.Add(this.label5); @@ -513,8 +477,6 @@ this.Text = "Miranda IM Langpack Suite"; this.groupBox2.ResumeLayout(false); this.groupBox2.PerformLayout(); - this.groupBox4.ResumeLayout(false); - this.groupBox4.PerformLayout(); this.tabControl1.ResumeLayout(false); this.tabPage1.ResumeLayout(false); this.tabPage1.PerformLayout(); @@ -541,9 +503,6 @@ private System.Windows.Forms.TextBox LangpackNameEdit; private System.Windows.Forms.Label label1; private System.Windows.Forms.TextBox InfMessageLangBox; - private System.Windows.Forms.CheckBox CommentMUIDCheckBox; - private System.Windows.Forms.GroupBox groupBox4; - private System.Windows.Forms.CheckBox ANSICheckBox; private System.Windows.Forms.TabControl tabControl1; private System.Windows.Forms.TabPage tabPage1; private System.Windows.Forms.TabPage tabPage2; diff --git a/tools/Langpack Suite/Form1.cs b/tools/Langpack Suite/Form1.cs index 58f1003079..20bd4bd702 100644 --- a/tools/Langpack Suite/Form1.cs +++ b/tools/Langpack Suite/Form1.cs @@ -55,14 +55,6 @@ namespace Langpack_Suite OwnFileCheckBox.Checked = true; OwnFilesCheckBoxChange(); } - if (key.Equals("\\c")) - { - CommentMUIDCheckBox.Checked = true; - } - if (key.Equals("\\a")) - { - ANSICheckBox.Checked = true; - } if (key.Equals("\\u")) { string fname = arguments[i].Substring(2); @@ -115,12 +107,6 @@ namespace Langpack_Suite OwnFileCheckBox.Text = CurrentText; CurrentText = rm.GetString("SelectOwnFileBtn", culture); SelectOwnFileBtn.Text = CurrentText; - CurrentText = rm.GetString("groupBox4", culture); - groupBox4.Text = CurrentText; - CurrentText = rm.GetString("CommentMUIDCheckBox", culture); - CommentMUIDCheckBox.Text = CurrentText; - CurrentText = rm.GetString("ANSICheckBox", culture); - ANSICheckBox.Text = CurrentText; CurrentText = rm.GetString("CreateLangpackBtn", culture); CreateLangpackBtn.Text = CurrentText; CurrentText = rm.GetString("LanguageLbl", culture); @@ -209,7 +195,12 @@ namespace Langpack_Suite byte[] allfile = new byte[data.Length + 3]; allfile[0] = 239; allfile[1] = 187; allfile[2] = 191; data.CopyTo(allfile, 3); + HtmlAgilityPack.HtmlDocument doc = new HtmlAgilityPack.HtmlDocument(); + string str = Encoding.UTF8.GetString(allfile); + doc.LoadHtml(str); + str = doc.DocumentNode.SelectSingleNode("//body").InnerText.Trim(); FileStream _FileStream = new System.IO.FileStream("VersionInfo.txt", System.IO.FileMode.Create, System.IO.FileAccess.Write); + allfile = Encoding.UTF8.GetBytes(str); _FileStream.Write(allfile, 0, allfile.Length); _FileStream.Close(); } @@ -235,11 +226,11 @@ namespace Langpack_Suite ReadFile = new StreamReader(vipath); else ReadFile = new StreamReader(vipath, Encoding.Default); - while ((s = ReadFile.ReadLine()) != null) + while ((s = ReadFile.ReadLine().Trim()) != null) { if (s.StartsWith("Active Plugins")) { - s = ReadFile.ReadLine(); + s = ReadFile.ReadLine().Trim(); while (s != "") { if (s.StartsWith("¤") || s.StartsWith(" ")) @@ -251,7 +242,7 @@ namespace Langpack_Suite else InclPlug = InclPlug + ", " + s; } - s = ReadFile.ReadLine(); + s = ReadFile.ReadLine().Trim(); } break; } @@ -265,7 +256,7 @@ namespace Langpack_Suite { LangPack.WriteLine(""); ReadFile = new StreamReader(OwnFileEdit.Text); - while ((s = ReadFile.ReadLine()) != null) + while ((s = ReadFile.ReadLine().Trim()) != null) { LangPack.WriteLine(s); } @@ -285,7 +276,7 @@ namespace Langpack_Suite if (File.Exists(FolderName + "\\=CORE=.txt")) { ReadFile = new StreamReader(FolderName + "\\=CORE=.txt"); - while ((s = ReadFile.ReadLine()) != null) + while ((s = ReadFile.ReadLine().Trim()) != null) { LangPack.WriteLine(s); } @@ -304,7 +295,7 @@ namespace Langpack_Suite if (File.Exists(FolderName + "\\=dbtool=.txt")) { ReadFile = new StreamReader(FolderName + "\\=dbtool=.txt"); - while ((s = ReadFile.ReadLine()) != null) + while ((s = ReadFile.ReadLine().Trim()) != null) { LangPack.WriteLine(s); } @@ -323,7 +314,7 @@ namespace Langpack_Suite if (File.Exists(FolderName + "\\=DUPES=.txt")) { ReadFile = new StreamReader(FolderName + "\\=DUPES=.txt"); - while ((s = ReadFile.ReadLine()) != null) + while ((s = ReadFile.ReadLine().Trim()) != null) { LangPack.WriteLine(s); } @@ -345,11 +336,11 @@ namespace Langpack_Suite ReadFile = new StreamReader(vipath); else ReadFile = new StreamReader(vipath, Encoding.Default); - while ((s = ReadFile.ReadLine()) != null) + while ((s = ReadFile.ReadLine().Trim()) != null) { if (s.StartsWith("Active Plugins")) { - s = ReadFile.ReadLine(); + s = ReadFile.ReadLine().Trim(); while (s != "") { StreamReader plug_in; @@ -359,60 +350,15 @@ namespace Langpack_Suite int l = s.IndexOf("."); s = s.Substring(2, l - 2); string stmp = s.ToUpper(); - if (stmp == "VERSIONINFO") - s = "Svc_VI"; - if (stmp == "DBEDITORPP") - s = "Svc_DBEPP"; if (stmp == "IMPORT_SA") s = "Import"; - if ((stmp[stmp.Length - 1].Equals('W')) && (stmp != "CLIST_MW") && (stmp != "DBX_DBRW") && (stmp != "IEVIEW")) - s = s.Remove(s.Length - 1); - if (stmp == "ICQ") - { - LangPack.WriteLine(""); - if (File.Exists(FolderName + "\\plugins\\" + s + ".txt")) - { - plug_in = new StreamReader(FolderName + "\\plugins\\" + s + ".txt"); - while ((st = plug_in.ReadLine()) != null) - { - LangPack.WriteLine(st); - } - plug_in.Close(); - } - else - { - LocaleText = rm.GetString("FileText", culture); - string LocaleText2 = rm.GetString("File2NotFound", culture); - InfMessageLangBox.Text = InfMessageLangBox.Text + LocaleText + s + LocaleText2 + "\r\n"; - } - if (back_s.Contains("Plus Mod Protocol")) - { - LangPack.WriteLine(""); - if (File.Exists(FolderName + "\\plugins\\ICQ_Plus.txt")) - { - plug_in = new StreamReader(FolderName + "\\plugins\\ICQ_Plus.txt"); - while ((st = plug_in.ReadLine()) != null) - { - LangPack.WriteLine(st); - } - plug_in.Close(); - } - else - { - LocaleText = rm.GetString("FileText", culture); - string LocaleText2 = rm.GetString("File2NotFound", culture); - InfMessageLangBox.Text = InfMessageLangBox.Text + LocaleText + "ICQ_Plus" + LocaleText2 + "\r\n"; - } - } - continue; - } if (stmp == "WEATHER") { LangPack.WriteLine(""); if (File.Exists(FolderName + "\\plugins\\" + s + ".txt")) { plug_in = new StreamReader(FolderName + "\\plugins\\" + s + ".txt"); - while ((st = plug_in.ReadLine()) != null) + while ((st = plug_in.ReadLine().Trim()) != null) { LangPack.WriteLine(st); } @@ -426,12 +372,12 @@ namespace Langpack_Suite } plug_in = new StreamReader(vipath); - while ((st = plug_in.ReadLine()) != null) + while ((st = plug_in.ReadLine().Trim()) != null) { if (st.StartsWith("Weather ini files:")) { - st = plug_in.ReadLine(); - st = plug_in.ReadLine(); + st = plug_in.ReadLine().Trim(); + st = plug_in.ReadLine().Trim(); while (st != "") { int w = st.IndexOf("."); @@ -440,7 +386,7 @@ namespace Langpack_Suite if (File.Exists(FolderName + "\\weather\\" + st + ".txt")) { StreamReader weather = new StreamReader(FolderName + "\\weather\\" + st + ".txt"); - while ((we = weather.ReadLine()) != null) + while ((we = weather.ReadLine().Trim()) != null) { LangPack.WriteLine(we); } @@ -452,7 +398,7 @@ namespace Langpack_Suite string LocaleText2 = rm.GetString("File2NotFound", culture); InfMessageLangBox.Text = InfMessageLangBox.Text + LocaleText + st + LocaleText2 + "\r\n"; } - st = plug_in.ReadLine(); + st = plug_in.ReadLine().Trim(); } } } @@ -463,7 +409,7 @@ namespace Langpack_Suite if (File.Exists(FolderName + "\\plugins\\" + s + ".txt")) { plug_in = new StreamReader(FolderName + "\\plugins\\" + s + ".txt"); - while ((st = plug_in.ReadLine()) != null) + while ((st = plug_in.ReadLine().Trim()) != null) { LangPack.WriteLine(st); } @@ -476,7 +422,7 @@ namespace Langpack_Suite InfMessageLangBox.Text = InfMessageLangBox.Text + LocaleText + s + LocaleText2 + "\r\n"; } } - s = ReadFile.ReadLine(); + s = ReadFile.ReadLine().Trim(); } break; } @@ -492,7 +438,7 @@ namespace Langpack_Suite if (File.Exists(FolderName + "\\=VERSION=.txt")) { ReadFile = new StreamReader(FolderName + "\\=VERSION=.txt"); - while ((s = ReadFile.ReadLine()) != null) + while ((s = ReadFile.ReadLine().Trim()) != null) { LangPack.WriteLine(s); } @@ -510,7 +456,7 @@ namespace Langpack_Suite { LangPack.WriteLine(""); ReadFile = new StreamReader(OwnFileEdit.Text); - while ((s = ReadFile.ReadLine()) != null) + while ((s = ReadFile.ReadLine().Trim()) != null) { LangPack.WriteLine(s); } @@ -530,7 +476,7 @@ namespace Langpack_Suite if (File.Exists(FolderName + "\\=CORE=.txt")) { ReadFile = new StreamReader(FolderName + "\\=CORE=.txt"); - while ((s = ReadFile.ReadLine()) != null) + while ((s = ReadFile.ReadLine().Trim()) != null) { LangPack.WriteLine(s); } @@ -549,7 +495,7 @@ namespace Langpack_Suite if (File.Exists(FolderName + "\\=dbtool=.txt")) { ReadFile = new StreamReader(FolderName + "\\=dbtool=.txt"); - while ((s = ReadFile.ReadLine()) != null) + while ((s = ReadFile.ReadLine().Trim()) != null) { LangPack.WriteLine(s); } @@ -568,7 +514,7 @@ namespace Langpack_Suite if (File.Exists(FolderName + "\\=DUPES=.txt")) { ReadFile = new StreamReader(FolderName + "\\=DUPES=.txt"); - while ((s = ReadFile.ReadLine()) != null) + while ((s = ReadFile.ReadLine().Trim()) != null) { LangPack.WriteLine(s); } @@ -591,7 +537,7 @@ namespace Langpack_Suite { LangPack.WriteLine(""); ReadFile = new StreamReader(fi.FullName); - while ((s = ReadFile.ReadLine()) != null) + while ((s = ReadFile.ReadLine().Trim()) != null) { LangPack.WriteLine(s); } @@ -601,7 +547,7 @@ namespace Langpack_Suite LangPack.WriteLine(""); ReadFile = new StreamReader(FolderName + "\\Plugins\\ICQ_Plus.txt"); - while ((s = ReadFile.ReadLine()) != null) + while ((s = ReadFile.ReadLine().Trim()) != null) { LangPack.WriteLine(s); } @@ -617,7 +563,7 @@ namespace Langpack_Suite { LangPack.WriteLine(""); ReadFile = new StreamReader(fi.FullName); - while ((s = ReadFile.ReadLine()) != null) + while ((s = ReadFile.ReadLine().Trim()) != null) { LangPack.WriteLine(s); } @@ -628,7 +574,7 @@ namespace Langpack_Suite { LangPack.WriteLine(""); ReadFile = new StreamReader(wi.FullName); - while ((s = ReadFile.ReadLine()) != null) + while ((s = ReadFile.ReadLine().Trim()) != null) { LangPack.WriteLine(s); } @@ -638,7 +584,7 @@ namespace Langpack_Suite } LangPack.WriteLine(""); ReadFile = new StreamReader(fi.FullName); - while ((s = ReadFile.ReadLine()) != null) + while ((s = ReadFile.ReadLine().Trim()) != null) { LangPack.WriteLine(s); } @@ -647,76 +593,6 @@ namespace Langpack_Suite LangPack.Close(); } - if (CommentMUIDCheckBox.Checked) - { - List str = new List(); - ReadFile = new StreamReader(output); - while ((s = ReadFile.ReadLine()) != null) - { - if (s.StartsWith("#muuid")) - { - s = s.Insert(0, ";"); - str.Add(s); - } - else - { - str.Add(s); - } - } - ReadFile.Close(); - - LangPack = new StreamWriter(output, false, Encoding.UTF8); - for (int i = 0; i < str.Count; i++) - { - try - { - LangPack.Write(str[i] + "\r\n"); - } - catch (IOException) - { - if (!quiet) - { - LocaleText = rm.GetString("NotWrite", culture); - string LocaleText2 = rm.GetString("Error", culture); - MessageBox.Show(LocaleText, LocaleText2, MessageBoxButtons.OK, MessageBoxIcon.Error); - } - return; - } - } - LangPack.Close(); - } - - if (ANSICheckBox.Checked) - { - List str = new List(); - ReadFile = new StreamReader(output); - while ((s = ReadFile.ReadLine()) != null) - { - str.Add(s); - } - ReadFile.Close(); - - LangPack = new StreamWriter(output, false, Encoding.Default); - for (int i = 0; i < str.Count; i++) - { - try - { - LangPack.Write(str[i] + "\r\n"); - } - catch (IOException) - { - if (!quiet) - { - LocaleText = rm.GetString("NotWrite", culture); - string LocaleText2 = rm.GetString("Error", culture); - MessageBox.Show(LocaleText, LocaleText2, MessageBoxButtons.OK, MessageBoxIcon.Error); - } - return; - } - } - LangPack.Close(); - } - if (!quiet) { LocaleText = rm.GetString("Done", culture); diff --git a/tools/Langpack Suite/Form1.resx b/tools/Langpack Suite/Form1.resx index 29c28e2f52..ec8daa0115 100644 --- a/tools/Langpack Suite/Form1.resx +++ b/tools/Langpack Suite/Form1.resx @@ -128,7 +128,7 @@ from the version info file, if available). iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAJcEhZcwAADsEAAA7BAbiRa+0AAAGfSURBVDhPpVPNSoJREPUp6iV6iWjbIkqkQEytFhFFGSpl + YQUAAAAJcEhZcwAADr8AAA6/ATgFUyQAAAGfSURBVDhPpVPNSoJREPUp6iV6iWjbIkqkQEytFhFFGSpl iYniwjJCk0BaSKYEVrRqUdAmbJFZumkRFlQShQUFIVFw6ox8H1/+ETQw3GHmzrlzZubqdE0kvp1FZKOq tJvdq/MzQe/OoMt+hk5HXpQ2fYy1BLIvnaDDeCBJvb5rDARLorTpY4x3GoIw0NazJwnWcBkzqU9R52ZF lD7G2nt26kFYGtF5YTz2jLsXIFMEXIlHUdr0jYaL0HsLcvcXHfJjiXxlKwuRpzdgKnQAT+pWbApjRt9P diff --git a/tools/Langpack Suite/LangpackSuite.csproj b/tools/Langpack Suite/LangpackSuite.csproj index b2b14bf47f..a95e18b416 100644 --- a/tools/Langpack Suite/LangpackSuite.csproj +++ b/tools/Langpack Suite/LangpackSuite.csproj @@ -52,6 +52,9 @@ res/miranda_logo.ico + + ref\HtmlAgilityPack.dll + diff --git a/tools/Langpack Suite/LangpackSuite.sln b/tools/Langpack Suite/LangpackSuite.sln new file mode 100644 index 0000000000..188599727e --- /dev/null +++ b/tools/Langpack Suite/LangpackSuite.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LangpackSuite", "LangpackSuite.csproj", "{6F20B52F-64EA-4A78-9149-6C36CE2AF043}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|x86 = Debug|x86 + Release|x86 = Release|x86 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {6F20B52F-64EA-4A78-9149-6C36CE2AF043}.Debug|x86.ActiveCfg = Debug|x86 + {6F20B52F-64EA-4A78-9149-6C36CE2AF043}.Debug|x86.Build.0 = Debug|x86 + {6F20B52F-64EA-4A78-9149-6C36CE2AF043}.Release|x86.ActiveCfg = Release|x86 + {6F20B52F-64EA-4A78-9149-6C36CE2AF043}.Release|x86.Build.0 = Release|x86 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/tools/Langpack Suite/myRes.Designer.cs b/tools/Langpack Suite/myRes.Designer.cs new file mode 100644 index 0000000000..7b7be4ea63 --- /dev/null +++ b/tools/Langpack Suite/myRes.Designer.cs @@ -0,0 +1,624 @@ +//------------------------------------------------------------------------------ +// +// Этот код создан программой. +// Исполняемая версия:4.0.30319.269 +// +// Изменения в этом файле могут привести к неправильной работе и будут потеряны в случае +// повторной генерации кода. +// +//------------------------------------------------------------------------------ + +namespace LangpackSuite { + using System; + + + /// + /// Класс ресурса со строгой типизацией для поиска локализованных строк и т.д. + /// + // Этот класс создан автоматически классом StronglyTypedResourceBuilder + // с помощью такого средства, как ResGen или Visual Studio. + // Чтобы добавить или удалить член, измените файл .ResX и снова запустите ResGen + // с параметром /str или перестройте свой проект VS. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class myRes { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal myRes() { + } + + /// + /// Возвращает кэшированный экземпляр ResourceManager, использованный этим классом. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager { + get { + if (object.ReferenceEquals(resourceMan, null)) { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("LangpackSuite.myRes", typeof(myRes).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Перезаписывает свойство CurrentUICulture текущего потока для всех + /// обращений к ресурсу с помощью этого класса ресурса со строгой типизацией. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture { + get { + return resourceCulture; + } + set { + resourceCulture = value; + } + } + + /// + /// Ищет локализованную строку, похожую на Langpack assigned.... + /// + internal static string AssignLang { + get { + return ResourceManager.GetString("AssignLang", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Assign. + /// + internal static string AssignLangBtn { + get { + return ResourceManager.GetString("AssignLangBtn", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Automatic. + /// + internal static string AutoModeBtn { + get { + return ResourceManager.GetString("AutoModeBtn", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Commented lines founded.... + /// + internal static string ComFound { + get { + return ResourceManager.GetString("ComFound", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Find Commented. + /// + internal static string CommentFindBtn { + get { + return ResourceManager.GetString("CommentFindBtn", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Commented lines not found!. + /// + internal static string ComNotFound { + get { + return ResourceManager.GetString("ComNotFound", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на File =CORE=.txt not found.... + /// + internal static string CoreNotFound { + get { + return ResourceManager.GetString("CoreNotFound", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Create Langpack. + /// + internal static string CreateLangpackBtn { + get { + return ResourceManager.GetString("CreateLangpackBtn", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на File =dbtool=.txt not found.... + /// + internal static string DbtoolNotFound { + get { + return ResourceManager.GetString("DbtoolNotFound", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Done!. + /// + internal static string Done { + get { + return ResourceManager.GetString("Done", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Find Dupes. + /// + internal static string DupesFindBtn { + get { + return ResourceManager.GetString("DupesFindBtn", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на File =DUPES=.txt not found.... + /// + internal static string DupesNotFound { + get { + return ResourceManager.GetString("DupesNotFound", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Dupes founded.... + /// + internal static string DupFound { + get { + return ResourceManager.GetString("DupFound", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Dupes not found!. + /// + internal static string DupNotFound { + get { + return ResourceManager.GetString("DupNotFound", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Working stoped.. + /// + internal static string DupStop { + get { + return ResourceManager.GetString("DupStop", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Error. + /// + internal static string Error { + get { + return ResourceManager.GetString("Error", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на .txt not found.... + /// + internal static string File2NotFound { + get { + return ResourceManager.GetString("File2NotFound", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на not found.... + /// + internal static string FileNotFound { + get { + return ResourceManager.GetString("FileNotFound", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на File . + /// + internal static string FileText { + get { + return ResourceManager.GetString("FileText", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Finding Langpack.... + /// + internal static string FindLang { + get { + return ResourceManager.GetString("FindLang", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Generation stopped.. + /// + internal static string GenStop { + get { + return ResourceManager.GetString("GenStop", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Generating langpack.... + /// + internal static string GenText { + get { + return ResourceManager.GetString("GenText", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Get VersionInfo from Internet or type full local path. + /// + internal static string GetVICheckBox { + get { + return ResourceManager.GetString("GetVICheckBox", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Assign Langpack File. + /// + internal static string groupBox1 { + get { + return ResourceManager.GetString("groupBox1", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Output File. + /// + internal static string groupBox2 { + get { + return ResourceManager.GetString("groupBox2", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Working mode. + /// + internal static string groupBox5 { + get { + return ResourceManager.GetString("groupBox5", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на File =HEAD=.txt not found.... + /// + internal static string HeadNotFound { + get { + return ResourceManager.GetString("HeadNotFound", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Information. + /// + internal static string Inf { + get { + return ResourceManager.GetString("Inf", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Langpack File Name:. + /// + internal static string label1 { + get { + return ResourceManager.GetString("label1", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Name:. + /// + internal static string label2 { + get { + return ResourceManager.GetString("label2", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на LinkList.txt file contains links to the translation files of different + ///plugins and can be used in any download manager. Downloaded + ///files can be used to generate a complete localization or consisting + ///only from localization of plugins used by you (information is taken + ///from the version info file, if available).. + /// + internal static string label3 { + get { + return ResourceManager.GetString("label3", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на URL of SVN:. + /// + internal static string label4 { + get { + return ResourceManager.GetString("label4", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на e.g. http://www.miranda-vi.org/report/mataes. + /// + internal static string label6 { + get { + return ResourceManager.GetString("label6", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Langpack not Founded.... + /// + internal static string LangNotFound { + get { + return ResourceManager.GetString("LangNotFound", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на not assigned. + /// + internal static string LangPathLbl { + get { + return ResourceManager.GetString("LangPathLbl", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Language:. + /// + internal static string LanguageLbl { + get { + return ResourceManager.GetString("LanguageLbl", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Generating LinkList.... + /// + internal static string LinkListGen { + get { + return ResourceManager.GetString("LinkListGen", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Create File. + /// + internal static string LinkListGenBtn { + get { + return ResourceManager.GetString("LinkListGenBtn", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Manual. + /// + internal static string ManualModeBtn { + get { + return ResourceManager.GetString("ManualModeBtn", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Can not open file.. + /// + internal static string NotOpen { + get { + return ResourceManager.GetString("NotOpen", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Not Translated lines founded.... + /// + internal static string NotTransFound { + get { + return ResourceManager.GetString("NotTransFound", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Find Not Translated. + /// + internal static string NotTranslFindBtn { + get { + return ResourceManager.GetString("NotTranslFindBtn", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Not translated lines not found!. + /// + internal static string NotTransNotFound { + get { + return ResourceManager.GetString("NotTransNotFound", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Can not write file.. + /// + internal static string NotWrite { + get { + return ResourceManager.GetString("NotWrite", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Add your own file to Langpack. + /// + internal static string OwnFileCheckBox { + get { + return ResourceManager.GetString("OwnFileCheckBox", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Writing files from Plugins folder.... + /// + internal static string PlugLink { + get { + return ResourceManager.GetString("PlugLink", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Subfolder Plugins not found.... + /// + internal static string PlugLinkNotFound { + get { + return ResourceManager.GetString("PlugLinkNotFound", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Writing files from Root folder.... + /// + internal static string RootLink { + get { + return ResourceManager.GetString("RootLink", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Select. + /// + internal static string SelectOwnFileBtn { + get { + return ResourceManager.GetString("SelectOwnFileBtn", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Generator. + /// + internal static string tabPage1 { + get { + return ResourceManager.GetString("tabPage1", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на LinkListGen. + /// + internal static string tabPage2 { + get { + return ResourceManager.GetString("tabPage2", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Dupes Search. + /// + internal static string tabPage3 { + get { + return ResourceManager.GetString("tabPage3", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Command line arguments list. + /// + internal static string tipper { + get { + return ResourceManager.GetString("tipper", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Arguments. + /// + internal static string VarHead { + get { + return ResourceManager.GetString("VarHead", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на \q - silent generate + ///\n - Langpack file name + ///\o - Path for adding own File + ///\c - comment muid's + ///\a - ANSI format + ///\u - link to VI from miranda-vi.org or full local path + ///\l - Output Langpack path + /// + ///Example, LangpackSuite.exe \q \nLang_Test \o"My Strings.txt" \uD:\Miranda\VersionInfo.txt. + /// + internal static string VarText { + get { + return ResourceManager.GetString("VarText", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на File =VERSION=.txt not found.... + /// + internal static string VersionNotFound { + get { + return ResourceManager.GetString("VersionNotFound", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на File VersionInfo.txt founded, making shot langpack.... + /// + internal static string VIGen { + get { + return ResourceManager.GetString("VIGen", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Writing files from Weather folder.... + /// + internal static string WeatherLink { + get { + return ResourceManager.GetString("WeatherLink", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Subfolder Weather not found.... + /// + internal static string WeatherLinkNotFound { + get { + return ResourceManager.GetString("WeatherLinkNotFound", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на VersionInfo.txt not found, making full langpack.... + /// + internal static string WOVIGen { + get { + return ResourceManager.GetString("WOVIGen", resourceCulture); + } + } + + /// + /// Ищет локализованную строку, похожую на Selected wrong directory.... + /// + internal static string WrongSelect { + get { + return ResourceManager.GetString("WrongSelect", resourceCulture); + } + } + } +} diff --git a/tools/Langpack Suite/myRes.resx b/tools/Langpack Suite/myRes.resx index 1a7159acfd..dd1d97ce40 100644 --- a/tools/Langpack Suite/myRes.resx +++ b/tools/Langpack Suite/myRes.resx @@ -117,9 +117,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - ANSI Format for Core less 0.9.30 - Langpack assigned... @@ -135,9 +132,6 @@ Find Commented - - Comment MUID for Core less 0.10 - Commented lines not found! @@ -195,9 +189,6 @@ Output File - - Old Core Support - Working mode diff --git a/tools/Langpack Suite/myRes.ru-RU.Designer.cs b/tools/Langpack Suite/myRes.ru-RU.Designer.cs new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tools/Langpack Suite/myRes.ru-RU.resx b/tools/Langpack Suite/myRes.ru-RU.resx index d31cc29f13..834bcb8a04 100644 --- a/tools/Langpack Suite/myRes.ru-RU.resx +++ b/tools/Langpack Suite/myRes.ru-RU.resx @@ -117,9 +117,6 @@ System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - Сохранять в ANSI формате для ядер меньше 0.9.30 - Ленгпак выбран... @@ -135,9 +132,6 @@ Поиск закомментированного - - Комментировать MUID для версий ядер меньше 0.10 - Закомментированные строки не найдены! @@ -195,9 +189,6 @@ Файл результата - - Поддержка старых версий ядра - Режим работы diff --git a/tools/Langpack Suite/ref/HtmlAgilityPack.dll b/tools/Langpack Suite/ref/HtmlAgilityPack.dll new file mode 100644 index 0000000000..26e321db53 Binary files /dev/null and b/tools/Langpack Suite/ref/HtmlAgilityPack.dll differ diff --git a/tools/Langpack Suite/res/V.ico b/tools/Langpack Suite/res/V.ico new file mode 100644 index 0000000000..7f016eee31 Binary files /dev/null and b/tools/Langpack Suite/res/V.ico differ -- cgit v1.2.3