summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-01-28 11:34:31 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-01-28 11:34:31 +0000
commitf627fd96a5a04b4ca2fed76a16986c8fbb0a513b (patch)
tree9bf3b22f356f50c74dff1809f52b638e136c92da /tools
parentf91d4f5026f86b67c4ad13a71a9d54835d024482 (diff)
merged command line params \n and \l
fixed running from not current directory git-svn-id: http://svn.miranda-ng.org/main/trunk@3317 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'tools')
-rw-r--r--tools/Langpack Suite/Form1.cs33
-rw-r--r--tools/Langpack Suite/myRes.be-BY.resx3
-rw-r--r--tools/Langpack Suite/myRes.cs-CZ.resx3
-rw-r--r--tools/Langpack Suite/myRes.de-DE.resx6
-rw-r--r--tools/Langpack Suite/myRes.resx5
-rw-r--r--tools/Langpack Suite/myRes.ru-RU.resx3
-rw-r--r--tools/Langpack Suite/myRes.uk-UA.resx3
7 files changed, 28 insertions, 28 deletions
diff --git a/tools/Langpack Suite/Form1.cs b/tools/Langpack Suite/Form1.cs
index 8c39d08a27..ee4737056e 100644
--- a/tools/Langpack Suite/Form1.cs
+++ b/tools/Langpack Suite/Form1.cs
@@ -20,12 +20,13 @@ namespace Langpack_Suite
public FolderBrowserDialog LangpackFolder;
public String[] arguments;
public bool vitype, quiet = false, outfile = false;
- public string output = "";
+ public string output = "", exepath = "";
Searcher search;
ToolTip tipper;
public MainForm()
{
arguments = Environment.GetCommandLineArgs();
+ exepath = arguments[0];
InitializeComponent();
search = new Searcher(this);
tipper = new ToolTip();
@@ -33,8 +34,8 @@ namespace Langpack_Suite
tipper.InitialDelay = 1000;
tipper.ReshowDelay = 500;
tipper.ShowAlways = true;
-
- DirectoryInfo root = Directory.GetParent(Directory.GetCurrentDirectory());
+
+ DirectoryInfo root = Directory.GetParent(Directory.GetParent(exepath).ToString());
string[] dirs = Directory.GetDirectories(root.ToString());
foreach (string dir in dirs)
{
@@ -56,6 +57,11 @@ namespace Langpack_Suite
if (key.Equals("\\n"))
{
LangpackNameEdit.Text = arguments[i].Substring(2);
+ if (LangpackNameEdit.Text.Contains(":\\") || LangpackNameEdit.Text.Contains(".\\"))
+ {
+ output = arguments[i].Substring(2);
+ outfile = true;
+ }
}
if (key.Equals("\\o"))
{
@@ -63,7 +69,7 @@ namespace Langpack_Suite
if (fname.Contains("\\"))
OwnFileEdit.Text = fname;
else
- OwnFileEdit.Text = Directory.GetParent(Directory.GetCurrentDirectory()).ToString() + "\\" + LangpacksComboBox.Text + "\\" + fname;
+ OwnFileEdit.Text = Directory.GetParent(Directory.GetParent(exepath).ToString()).ToString() + "\\" + LangpacksComboBox.Text + "\\" + fname;
OwnFileCheckBox.Checked = true;
OwnFilesCheckBoxChange();
}
@@ -74,11 +80,6 @@ namespace Langpack_Suite
GetVICheckBox.Checked = true;
GetVICheckBoxChange();
}
- if (key.Equals("\\l"))
- {
- output = arguments[i].Substring(2);
- outfile = true;
- }
if (key.Equals("\\p"))
{
string fname = arguments[i].Substring(2);
@@ -197,9 +198,13 @@ namespace Langpack_Suite
InfMessageLangBox.Text = LocaleText + "\r\n";
- FolderName = Directory.GetParent(Directory.GetCurrentDirectory()).ToString() + "\\" + LangpacksComboBox.Text;
+ FolderName = Directory.GetParent(Directory.GetParent(exepath).ToString()).ToString() + "\\" + LangpacksComboBox.Text;
if (!outfile)
- output = FolderName + "\\" + LangpackNameEdit.Text + ".txt";
+ if (LangpackNameEdit.Text.Contains(":\\") || LangpackNameEdit.Text.Contains(".\\"))
+ output = LangpackNameEdit.Text;
+ else
+ output = FolderName + "\\" + LangpackNameEdit.Text + ".txt";
+
if (File.Exists(output))
File.Delete(output);
@@ -664,7 +669,7 @@ namespace Langpack_Suite
SelectOwnFilesOpenFileDialog.Filter = "txt files (*.txt)|*.txt|All files (*.*)|*.*";
SelectOwnFilesOpenFileDialog.FilterIndex = 1;
SelectOwnFilesOpenFileDialog.RestoreDirectory = true;
- SelectOwnFilesOpenFileDialog.InitialDirectory = Directory.GetParent(Directory.GetCurrentDirectory()).ToString() + "\\" + LangpacksComboBox.Text;
+ SelectOwnFilesOpenFileDialog.InitialDirectory = Directory.GetParent(Directory.GetParent(exepath).ToString()).ToString() + "\\" + LangpacksComboBox.Text;
if (SelectOwnFilesOpenFileDialog.ShowDialog() == DialogResult.OK)
{
try
@@ -698,7 +703,7 @@ namespace Langpack_Suite
string LocaleText = rm.GetString("LinkListGen", culture);
InfMessageLinkBox.Text = LocaleText + "\r\n";
- FolderName = Directory.GetParent(Directory.GetCurrentDirectory()).ToString() + "\\" + LangpacksComboBox.Text;
+ FolderName = Directory.GetParent(Directory.GetParent(exepath).ToString()).ToString() + "\\" + LangpacksComboBox.Text;
if (File.Exists(FolderName + "\\LinkList.txt"))
File.Delete(FolderName + "\\LinkList.txt");
@@ -769,7 +774,7 @@ namespace Langpack_Suite
string FolderName = "";
InfMessageFindBox.Text = "";
- FolderName = Directory.GetParent(Directory.GetCurrentDirectory()).ToString() + "\\" + LangpacksComboBox.Text;
+ FolderName = Directory.GetParent(Directory.GetParent(exepath).ToString()).ToString() + "\\" + LangpacksComboBox.Text;
DirectoryInfo RootDir = new DirectoryInfo(FolderName);
ResourceManager rm = new ResourceManager("LangpackSuite.myRes", typeof(MainForm).Assembly);
string LocaleText = rm.GetString("FindLang", culture);
diff --git a/tools/Langpack Suite/myRes.be-BY.resx b/tools/Langpack Suite/myRes.be-BY.resx
index 1e74e9b3b3..46317a441d 100644
--- a/tools/Langpack Suite/myRes.be-BY.resx
+++ b/tools/Langpack Suite/myRes.be-BY.resx
@@ -302,10 +302,9 @@
</data>
<data name="VarText" xml:space="preserve">
<value>\q - ціхая генерацыя
-\n - імя файла пакета
+\n - імя файла пакета або шлях выходнага файла пакета
\o - шлях да файла для ўключэння ў пакет
\u - спасылка на VI з miranda-vi.org ці поўны лакальны шлях
-\l - шлях выходнага файла пакета
\p - даступны моўнай пакет
Прыклад, LangpackSuite.exe \q \nLang_Test \o"My Strings.txt" \uD:\Miranda\VersionInfo.txt \prussian</value>
diff --git a/tools/Langpack Suite/myRes.cs-CZ.resx b/tools/Langpack Suite/myRes.cs-CZ.resx
index 860f546aef..72a6f259c3 100644
--- a/tools/Langpack Suite/myRes.cs-CZ.resx
+++ b/tools/Langpack Suite/myRes.cs-CZ.resx
@@ -296,10 +296,9 @@
</data>
<data name="VarText" xml:space="preserve">
<value>\q - Tiché generování
-\n - Název souboru s překladem
+\n - Název souboru s překladem nebo cesta pro výstup překladu
\o - Cesta pro přidání vlastního souboru
\u - Odkaz na VI z miranda-vi.org nebo úplná cesta k souboru
-\l - Cesta pro výstup překladu
\p - Název složky s dostupným překladem
Např.: LangpackSuite.exe \q \nLang_Test \o"Moje řetězce.txt" \uD:\Miranda\VersionInfo.txt \pczech</value>
diff --git a/tools/Langpack Suite/myRes.de-DE.resx b/tools/Langpack Suite/myRes.de-DE.resx
index 1238aa72f2..31d7c6bd64 100644
--- a/tools/Langpack Suite/myRes.de-DE.resx
+++ b/tools/Langpack Suite/myRes.de-DE.resx
@@ -301,11 +301,11 @@ ausgelesen, falls verfügbar).</value>
</data>
<data name="VarText" xml:space="preserve">
<value>\q - stille Erzeugung
-\n - Dateiname der Sprachdatei
+\n - Dateiname der Sprachdatei oder Sprachdatei Ausgabepfad
\o - Pfad zu Hinzufügen eigener Datei
\u - Link zu VI von miranda-vi.org oder voller lokaler Pfad
-\l - Sprachdatei Ausgabepfad
+\p - Verfügbare Langpack Ordnernamen
-Beispiel LangpackSuite.exe \q \nLang_Test \o"My Strings.txt" \uD:\Miranda\VersionInfo.txt</value>
+Beispiel LangpackSuite.exe \q \pgerman \nLang_Test \o"My Strings.txt" \uD:\Miranda\VersionInfo.txt</value>
</data>
</root> \ No newline at end of file
diff --git a/tools/Langpack Suite/myRes.resx b/tools/Langpack Suite/myRes.resx
index 34c3cdf2b5..d8b833c6b1 100644
--- a/tools/Langpack Suite/myRes.resx
+++ b/tools/Langpack Suite/myRes.resx
@@ -300,11 +300,10 @@ from the version info file, if available).</value>
</data>
<data name="VarText" xml:space="preserve">
<value>\q - silent generate
-\n - Langpack file name
+\n - Langpack file name or output Langpack path
\o - Path for adding own File
\u - link to VI from miranda-vi.org or full local path
-\l - Output Langpack path
-\p - Avaliable Langpack folder name
+\p - Available Langpack folder name
Example, LangpackSuite.exe \q \nLang_Test \o"My Strings.txt" \uD:\Miranda\VersionInfo.txt \prussian</value>
</data>
diff --git a/tools/Langpack Suite/myRes.ru-RU.resx b/tools/Langpack Suite/myRes.ru-RU.resx
index 8ffedf0676..4339db95eb 100644
--- a/tools/Langpack Suite/myRes.ru-RU.resx
+++ b/tools/Langpack Suite/myRes.ru-RU.resx
@@ -302,10 +302,9 @@
</data>
<data name="VarText" xml:space="preserve">
<value>\q - тихая генерация
-\n - имя файла ленгпака
+\n - имя файла ленгпака или путь выходного файла ленгпака
\o - путь к файлу для включения в ленгпак
\u - ссылка на ВИ с miranda-vi.org или полный локальный путь
-\l - путь выходного файла ленгпака
\p - доступный языковой пакет
Пример, LangpackSuite.exe \q \nLang_Test \o"My Strings.txt" \uD:\Miranda\VersionInfo.txt \prussian</value>
diff --git a/tools/Langpack Suite/myRes.uk-UA.resx b/tools/Langpack Suite/myRes.uk-UA.resx
index 233cc3cf52..dc2af68efb 100644
--- a/tools/Langpack Suite/myRes.uk-UA.resx
+++ b/tools/Langpack Suite/myRes.uk-UA.resx
@@ -302,10 +302,9 @@
</data>
<data name="VarText" xml:space="preserve">
<value>\q - тиха генерація
-\n - ім'я файла ленгпака
+\n - ім'я файла ленгпака або шлях вихідного файлу ленгпаку
\o - шлях до файлу для включення у ленгпак
\u - Посилання на ВІ с miranda-vi.org або повний локальний шлях
-\l - шлях вихідного файлу ленгпаку
\p - доступний мовний пакет
Приклад, LangpackSuite.exe \q \nLang_Test \o"My Strings.txt" \uD:\Miranda\VersionInfo.txt \prussian</value>