diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-07-22 15:14:00 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-07-22 15:14:00 +0000 |
commit | 6d3512f2ba5eb4fc81f0b78642890044e5640ce5 (patch) | |
tree | e997e30434f9a93e590b067b53d55bfd20ac8565 /tools/Langpack Suite | |
parent | bfcd4694ae34a6412a729bb5b3693032332c9bd3 (diff) |
update
git-svn-id: http://svn.miranda-ng.org/main/trunk@1102 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'tools/Langpack Suite')
-rw-r--r-- | tools/Langpack Suite/Form1.cs | 78 |
1 files changed, 29 insertions, 49 deletions
diff --git a/tools/Langpack Suite/Form1.cs b/tools/Langpack Suite/Form1.cs index 20bd4bd702..2a2aa17e69 100644 --- a/tools/Langpack Suite/Form1.cs +++ b/tools/Langpack Suite/Form1.cs @@ -226,17 +226,20 @@ namespace Langpack_Suite ReadFile = new StreamReader(vipath);
else
ReadFile = new StreamReader(vipath, Encoding.Default);
- while ((s = ReadFile.ReadLine().Trim()) != null)
+ while ((s = ReadFile.ReadLine()) != null)
{
if (s.StartsWith("Active Plugins"))
{
s = ReadFile.ReadLine().Trim();
while (s != "")
{
- if (s.StartsWith("¤") || s.StartsWith(" "))
+ if (s.StartsWith("¤") || s.StartsWith(" ") || s.Contains(".dll"))
{
int l = s.IndexOf(".");
- s = s.Substring(2, l - 2);
+ if (s.StartsWith("¤") || s.StartsWith(" "))
+ s = s.Substring(2, l - 2);
+ else
+ s = s.Substring(0, l);
if (InclPlug == "Plugins-included: ")
InclPlug = InclPlug + s;
else
@@ -256,7 +259,7 @@ namespace Langpack_Suite {
LangPack.WriteLine("");
ReadFile = new StreamReader(OwnFileEdit.Text);
- while ((s = ReadFile.ReadLine().Trim()) != null)
+ while ((s = ReadFile.ReadLine()) != null)
{
LangPack.WriteLine(s);
}
@@ -276,7 +279,7 @@ namespace Langpack_Suite if (File.Exists(FolderName + "\\=CORE=.txt"))
{
ReadFile = new StreamReader(FolderName + "\\=CORE=.txt");
- while ((s = ReadFile.ReadLine().Trim()) != null)
+ while ((s = ReadFile.ReadLine()) != null)
{
LangPack.WriteLine(s);
}
@@ -295,7 +298,7 @@ namespace Langpack_Suite if (File.Exists(FolderName + "\\=dbtool=.txt"))
{
ReadFile = new StreamReader(FolderName + "\\=dbtool=.txt");
- while ((s = ReadFile.ReadLine().Trim()) != null)
+ while ((s = ReadFile.ReadLine()) != null)
{
LangPack.WriteLine(s);
}
@@ -314,7 +317,7 @@ namespace Langpack_Suite if (File.Exists(FolderName + "\\=DUPES=.txt"))
{
ReadFile = new StreamReader(FolderName + "\\=DUPES=.txt");
- while ((s = ReadFile.ReadLine().Trim()) != null)
+ while ((s = ReadFile.ReadLine()) != null)
{
LangPack.WriteLine(s);
}
@@ -336,7 +339,7 @@ namespace Langpack_Suite ReadFile = new StreamReader(vipath);
else
ReadFile = new StreamReader(vipath, Encoding.Default);
- while ((s = ReadFile.ReadLine().Trim()) != null)
+ while ((s = ReadFile.ReadLine()) != null)
{
if (s.StartsWith("Active Plugins"))
{
@@ -344,11 +347,14 @@ namespace Langpack_Suite while (s != "")
{
StreamReader plug_in;
- if (s.StartsWith("¤") || s.StartsWith(" "))
+ if (s.StartsWith("¤") || s.StartsWith(" ") || s.Contains(".dll"))
{
string back_s = s;
int l = s.IndexOf(".");
- s = s.Substring(2, l - 2);
+ if (s.StartsWith("¤") || s.StartsWith(" "))
+ s = s.Substring(2, l - 2);
+ else
+ s = s.Substring(0, l);
string stmp = s.ToUpper();
if (stmp == "IMPORT_SA")
s = "Import";
@@ -358,7 +364,7 @@ namespace Langpack_Suite if (File.Exists(FolderName + "\\plugins\\" + s + ".txt"))
{
plug_in = new StreamReader(FolderName + "\\plugins\\" + s + ".txt");
- while ((st = plug_in.ReadLine().Trim()) != null)
+ while ((st = plug_in.ReadLine()) != null)
{
LangPack.WriteLine(st);
}
@@ -372,7 +378,7 @@ namespace Langpack_Suite }
plug_in = new StreamReader(vipath);
- while ((st = plug_in.ReadLine().Trim()) != null)
+ while ((st = plug_in.ReadLine()) != null)
{
if (st.StartsWith("Weather ini files:"))
{
@@ -381,12 +387,12 @@ namespace Langpack_Suite while (st != "")
{
int w = st.IndexOf(".");
- st = st.Substring(1, w - 1);
+ st = st.Substring(0, w);
LangPack.WriteLine("");
if (File.Exists(FolderName + "\\weather\\" + st + ".txt"))
{
StreamReader weather = new StreamReader(FolderName + "\\weather\\" + st + ".txt");
- while ((we = weather.ReadLine().Trim()) != null)
+ while ((we = weather.ReadLine()) != null)
{
LangPack.WriteLine(we);
}
@@ -409,7 +415,7 @@ namespace Langpack_Suite if (File.Exists(FolderName + "\\plugins\\" + s + ".txt"))
{
plug_in = new StreamReader(FolderName + "\\plugins\\" + s + ".txt");
- while ((st = plug_in.ReadLine().Trim()) != null)
+ while ((st = plug_in.ReadLine()) != null)
{
LangPack.WriteLine(st);
}
@@ -438,7 +444,7 @@ namespace Langpack_Suite if (File.Exists(FolderName + "\\=VERSION=.txt"))
{
ReadFile = new StreamReader(FolderName + "\\=VERSION=.txt");
- while ((s = ReadFile.ReadLine().Trim()) != null)
+ while ((s = ReadFile.ReadLine()) != null)
{
LangPack.WriteLine(s);
}
@@ -456,7 +462,7 @@ namespace Langpack_Suite {
LangPack.WriteLine("");
ReadFile = new StreamReader(OwnFileEdit.Text);
- while ((s = ReadFile.ReadLine().Trim()) != null)
+ while ((s = ReadFile.ReadLine()) != null)
{
LangPack.WriteLine(s);
}
@@ -476,7 +482,7 @@ namespace Langpack_Suite if (File.Exists(FolderName + "\\=CORE=.txt"))
{
ReadFile = new StreamReader(FolderName + "\\=CORE=.txt");
- while ((s = ReadFile.ReadLine().Trim()) != null)
+ while ((s = ReadFile.ReadLine()) != null)
{
LangPack.WriteLine(s);
}
@@ -495,7 +501,7 @@ namespace Langpack_Suite if (File.Exists(FolderName + "\\=dbtool=.txt"))
{
ReadFile = new StreamReader(FolderName + "\\=dbtool=.txt");
- while ((s = ReadFile.ReadLine().Trim()) != null)
+ while ((s = ReadFile.ReadLine()) != null)
{
LangPack.WriteLine(s);
}
@@ -514,7 +520,7 @@ namespace Langpack_Suite if (File.Exists(FolderName + "\\=DUPES=.txt"))
{
ReadFile = new StreamReader(FolderName + "\\=DUPES=.txt");
- while ((s = ReadFile.ReadLine().Trim()) != null)
+ while ((s = ReadFile.ReadLine()) != null)
{
LangPack.WriteLine(s);
}
@@ -533,37 +539,11 @@ namespace Langpack_Suite foreach (FileInfo fi in PluginsDir.GetFiles())
{
string stmp = fi.Name.ToUpper();
- if (stmp == "ICQ.TXT")
- {
- LangPack.WriteLine("");
- ReadFile = new StreamReader(fi.FullName);
- while ((s = ReadFile.ReadLine().Trim()) != null)
- {
- LangPack.WriteLine(s);
- }
- ReadFile.Close();
- if (File.Exists(FolderName + "\\Plugins\\ICQ_Plus.txt"))
- {
-
- LangPack.WriteLine("");
- ReadFile = new StreamReader(FolderName + "\\Plugins\\ICQ_Plus.txt");
- while ((s = ReadFile.ReadLine().Trim()) != null)
- {
- LangPack.WriteLine(s);
- }
- ReadFile.Close();
- }
- continue;
- }
- if (stmp == "ICQ_PLUS.TXT")
- {
- continue;
- }
if (stmp == "WEATHER.TXT")
{
LangPack.WriteLine("");
ReadFile = new StreamReader(fi.FullName);
- while ((s = ReadFile.ReadLine().Trim()) != null)
+ while ((s = ReadFile.ReadLine()) != null)
{
LangPack.WriteLine(s);
}
@@ -574,7 +554,7 @@ namespace Langpack_Suite {
LangPack.WriteLine("");
ReadFile = new StreamReader(wi.FullName);
- while ((s = ReadFile.ReadLine().Trim()) != null)
+ while ((s = ReadFile.ReadLine()) != null)
{
LangPack.WriteLine(s);
}
@@ -584,7 +564,7 @@ namespace Langpack_Suite }
LangPack.WriteLine("");
ReadFile = new StreamReader(fi.FullName);
- while ((s = ReadFile.ReadLine().Trim()) != null)
+ while ((s = ReadFile.ReadLine()) != null)
{
LangPack.WriteLine(s);
}
|