From c93ec058116d2c607146d8c2c535d6a706144ec9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20P=C3=B6sel?= Date: Wed, 10 Jul 2013 18:50:35 +0000 Subject: Windows line-endings for refresher scripts. git-svn-id: http://svn.miranda-ng.org/main/trunk@5311 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- tools/lpgen/refresher.bat | 236 +++++++++++++++++++++++----------------------- 1 file changed, 118 insertions(+), 118 deletions(-) (limited to 'tools/lpgen') diff --git a/tools/lpgen/refresher.bat b/tools/lpgen/refresher.bat index 007f063cf4..82b89b7cef 100644 --- a/tools/lpgen/refresher.bat +++ b/tools/lpgen/refresher.bat @@ -1,118 +1,118 @@ -@echo off -cls - -echo ======================== -echo Langpack refresher -echo Author: Robyer -echo ======================== -echo. - -set err=0 -if "%~1" == "" ( - echo ERROR: You must specify language parameter! - set err=1 -) else ( - set "language=%~1" - - if not exist "..\..\langpacks\%language%" ( - echo ERROR: This language doesn't exists! - set err=1 - goto usage - ) -) - -if not "%~3" == "" ( - echo ERROR: You must specify 1 or 2 parameters only. - echo NOTE: If you have path with spaces inside, suround it with "". - set err=1 - goto usage -) - -if not "%~2" == "" ( - set "oldLangpackPath=%~2" - - if not exist "..\..\langpacks\%language%\%oldLangpackPath%" ( - echo ERROR: Old langpack file doesn't exists! - set err=1 - goto usage - ) -) - -:usage -if "%err%"=="1" ( - echo. - echo ======================== - echo Usage: refresh.bat language ["old langpack path"] - echo Note: path to old langpack must be relative to "langpacks\\" folder - echo. - echo Example 1: refresh.bat czech - echo Example 2: refresh.bat czech "Deprecated\old langpack\langpack_czech2.txt" - echo. - echo If you want own script in langpack dir, look at "langpacks\czech\refresh.bat" - echo ======================== - echo. - - pause - goto end -) - -REM ========================= - -if not "%oldLangpackPath%" == "" ( - set phase=0 -) else ( - set phase=1 -) - -echo Refreshing started... - -:start - -cd "..\..\tools\lpgen\" - -mkdir "Plugins" -mkdir "Untranslated" -mkdir "Weather" - -if "%phase%" == "0" ( - echo Loading strings from old langpack... - cscript /nologo translate.js /out:".\" /untranslated:"Untranslated" /outfile:"Langpack_%language%.txt" /path:"..\..\langpacks\%language%\" /langpack:"..\..\langpacks\%language%\%oldLangpackPath%" -) else ( - REM load strings from recently created langpack (also to distribute strings between files) and create final langpack - cscript /nologo translate.js /out:".\" /untranslated:"Untranslated" /outfile:"Langpack_%language%.txt" /sourcelang:"%language%" -) - -rm -r "../../langpacks/%language%/Weather" -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%\Weather" -mkdir "..\..\langpacks\%language%\Plugins" -mkdir "..\..\langpacks\%language%\Untranslated" -copy "Weather\" "..\..\langpacks\%language%\Weather\" -copy "Plugins\" "..\..\langpacks\%language%\Plugins\" -copy "Untranslated\" "..\..\langpacks\%language%\Untranslated\" -copy "=CORE=.txt" "..\..\langpacks\%language%\=CORE=.txt" -copy "Langpack_%language%.txt" "..\..\langpacks\%language%\Langpack_%language%.txt" - -rm -r "Weather" -rm -r "Plugins" -rm -r "Untranslated" -rm "=CORE=.txt" -rm "Langpack_%language%.txt" - -REM cd "..\..\langpacks\tool\" -REM LangpackSuite.exe \q \p%language% - -if not "%phase%" == "1" ( - echo Loading strings from new langpack... - set "phase=1" - goto start -) - -:end -echo Refreshing finished! - -REM ========================= +@echo off +cls + +echo ======================== +echo Langpack refresher +echo Author: Robyer +echo ======================== +echo. + +set err=0 +if "%~1" == "" ( + echo ERROR: You must specify language parameter! + set err=1 +) else ( + set "language=%~1" + + if not exist "..\..\langpacks\%language%" ( + echo ERROR: This language doesn't exists! + set err=1 + goto usage + ) +) + +if not "%~3" == "" ( + echo ERROR: You must specify 1 or 2 parameters only. + echo NOTE: If you have path with spaces inside, suround it with "". + set err=1 + goto usage +) + +if not "%~2" == "" ( + set "oldLangpackPath=%~2" + + if not exist "..\..\langpacks\%language%\%oldLangpackPath%" ( + echo ERROR: Old langpack file doesn't exists! + set err=1 + goto usage + ) +) + +:usage +if "%err%"=="1" ( + echo. + echo ======================== + echo Usage: refresh.bat language ["old langpack path"] + echo Note: path to old langpack must be relative to "langpacks\\" folder + echo. + echo Example 1: refresh.bat czech + echo Example 2: refresh.bat czech "Deprecated\old langpack\langpack_czech2.txt" + echo. + echo If you want own script in langpack dir, look at "langpacks\czech\refresh.bat" + echo ======================== + echo. + + pause + goto end +) + +REM ========================= + +if not "%oldLangpackPath%" == "" ( + set phase=0 +) else ( + set phase=1 +) + +echo Refreshing started... + +:start + +cd "..\..\tools\lpgen\" + +mkdir "Plugins" +mkdir "Untranslated" +mkdir "Weather" + +if "%phase%" == "0" ( + echo Loading strings from old langpack... + cscript /nologo translate.js /out:".\" /untranslated:"Untranslated" /outfile:"Langpack_%language%.txt" /path:"..\..\langpacks\%language%\" /langpack:"..\..\langpacks\%language%\%oldLangpackPath%" +) else ( + REM load strings from recently created langpack (also to distribute strings between files) and create final langpack + cscript /nologo translate.js /out:".\" /untranslated:"Untranslated" /outfile:"Langpack_%language%.txt" /sourcelang:"%language%" +) + +rm -r "../../langpacks/%language%/Weather" +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%\Weather" +mkdir "..\..\langpacks\%language%\Plugins" +mkdir "..\..\langpacks\%language%\Untranslated" +copy "Weather\" "..\..\langpacks\%language%\Weather\" +copy "Plugins\" "..\..\langpacks\%language%\Plugins\" +copy "Untranslated\" "..\..\langpacks\%language%\Untranslated\" +copy "=CORE=.txt" "..\..\langpacks\%language%\=CORE=.txt" +copy "Langpack_%language%.txt" "..\..\langpacks\%language%\Langpack_%language%.txt" + +rm -r "Weather" +rm -r "Plugins" +rm -r "Untranslated" +rm "=CORE=.txt" +rm "Langpack_%language%.txt" + +REM cd "..\..\langpacks\tool\" +REM LangpackSuite.exe \q \p%language% + +if not "%phase%" == "1" ( + echo Loading strings from new langpack... + set "phase=1" + goto start +) + +:end +echo Refreshing finished! + +REM ========================= -- cgit v1.2.3