summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Pösel <robyer@seznam.cz>2013-06-18 20:00:03 +0000
committerRobert Pösel <robyer@seznam.cz>2013-06-18 20:00:03 +0000
commit28401f723845b123d5e7303ac01c3d913f40e289 (patch)
tree6583830ed5df614cf11d8a7f6a140c42a7b5fc5b
parentd0b206fedb1c121ad6c0379aed02fbd77f81e77e (diff)
Added universal version of Langpack Refresher script.
git-svn-id: http://svn.miranda-ng.org/main/trunk@5027 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--langpacks/czech/Generate.bat44
-rw-r--r--tools/lpgen/refresher.bat67
2 files changed, 67 insertions, 44 deletions
diff --git a/langpacks/czech/Generate.bat b/langpacks/czech/Generate.bat
deleted file mode 100644
index d5a928528d..0000000000
--- a/langpacks/czech/Generate.bat
+++ /dev/null
@@ -1,44 +0,0 @@
-@echo off
-
-set phase=0
-
-:start
-
-cd "..\..\tools\lpgen\"
-
-mkdir "Plugins"
-mkdir "Untranslated"
-
-if "%phase%" == "0" (
- cscript /nologo translate.js /log:"yes" /out:"Plugins" /untranslated:"Untranslated" /outfile:"langpack_czech.txt" /path:"..\..\langpacks\czech\Plugins" /core:"..\..\langpacks\czech\=CORE=.txt" /langpack:"..\..\langpacks\czech\Deprecated\old langpack\langpack_czech2.txt"
-) else (
- cscript /nologo translate.js /log:"yes" /out:"Plugins" /untranslated:"Untranslated" /outfile:"langpack_czech.txt" /path:"..\..\langpacks\czech\Plugins" /core:"..\..\langpacks\czech\=CORE=.txt" /langpack:"..\..\langpacks\czech\Langpack_czech.txt"
-)
-
-rm -r "../../langpacks/czech/Plugins"
-rm -r "../../langpacks/czech/Untranslated"
-rm -r "../../langpacks/czech/=CORE=.txt"
-rm -r "../../langpacks/czech/Langpack_czech.txt"
-
-mkdir "..\..\langpacks\czech\Plugins"
-mkdir "..\..\langpacks\czech\Untranslated"
-copy "Plugins\" "..\..\langpacks\czech\Plugins\"
-copy "Untranslated\" "..\..\langpacks\czech\Untranslated\"
-copy "=CORE=.txt" "..\..\langpacks\czech\=CORE=.txt"
-
-rm -r "Plugins"
-rm -r "Untranslated"
-rm "=CORE=.txt"
-rm "Langpack_czech.txt"
-
-cd "..\..\langpacks\tool\"
-LangpackSuite.exe \q \pczech
-
-if "%phase%" == "1" (
- goto end
-) else (
- set phase=1
- goto start
-)
-
-:end
diff --git a/tools/lpgen/refresher.bat b/tools/lpgen/refresher.bat
new file mode 100644
index 0000000000..2eccca7f6c
--- /dev/null
+++ b/tools/lpgen/refresher.bat
@@ -0,0 +1,67 @@
+@echo off
+
+REM You can run this script either from "tools\lpgen\" folder or from "langpacks\<your_langpack>\"
+
+echo ========================
+echo Langpack refresher
+echo Author: Robyer
+echo ========================
+
+echo Set your variables in script and remove this line. & PAUSE & goto end
+
+REM === VARIABLES TO SET ===
+
+set "language=czech"
+set "useOldLangpack=yes"
+set "oldLangpackPath=Deprecated\old langpack\langpack_czech2.txt"
+
+REM =========================
+
+if "%useOldLangpack%" == "yes" (
+ set phase=0
+) else (
+ set phase=1
+)
+
+:start
+
+cd "..\..\tools\lpgen\"
+
+mkdir "Plugins"
+mkdir "Untranslated"
+
+if "%phase%" == "0" (
+ cscript /nologo translate.js /log:"yes" /out:"Plugins" /untranslated:"Untranslated" /outfile:"langpack_%language%.txt" /path:"..\..\langpacks\%language%\Plugins" /core:"..\..\langpacks\%language%\=CORE=.txt" /langpack:"..\..\langpacks\%language%\%oldLangpackPath%"
+) else (
+ cscript /nologo translate.js /log:"yes" /out:"Plugins" /untranslated:"Untranslated" /outfile:"langpack_%language%.txt" /path:"..\..\langpacks\%language%\Plugins" /core:"..\..\langpacks\%language%\=CORE=.txt" /langpack:"..\..\langpacks\%language%\Langpack_%language%.txt"
+)
+
+rm -r "../../langpacks/%language%/Plugins"
+rm -r "../../langpacks/%language%/Untranslated"
+rm -r "../../langpacks/%language%/=CORE=.txt"
+rm -r "../../langpacks/%language%/Langpack_%language%.txt"
+
+mkdir "..\..\langpacks\%language%\Plugins"
+mkdir "..\..\langpacks\%language%\Untranslated"
+copy "Plugins\" "..\..\langpacks\%language%\Plugins\"
+copy "Untranslated\" "..\..\langpacks\%language%\Untranslated\"
+copy "=CORE=.txt" "..\..\langpacks\%language%\=CORE=.txt"
+
+rm -r "Plugins"
+rm -r "Untranslated"
+rm "=CORE=.txt"
+rm "Langpack_%language%.txt"
+
+cd "..\..\langpacks\tool\"
+LangpackSuite.exe \q \p%language%
+
+if "%phase%" == "1" (
+ goto end
+) else (
+ set "phase=1"
+ goto start
+)
+
+:end
+
+REM ========================= \ No newline at end of file