From 75f7b31591d8faf4c1585e948f4022d138447357 Mon Sep 17 00:00:00 2001 From: mrexodia Date: Wed, 13 Jul 2016 07:36:16 +0200 Subject: [PATCH] script for automatically downloading and building translations --- .gitignore | 4 +++- crowdin-sync.bat | 16 ++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 crowdin-sync.bat diff --git a/.gitignore b/.gitignore index 9211b03..521fc90 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ *.qm *.jar -translations/ \ No newline at end of file +*.zip +*.exe +translations/ diff --git a/crowdin-sync.bat b/crowdin-sync.bat new file mode 100644 index 0000000..dfd1fd8 --- /dev/null +++ b/crowdin-sync.bat @@ -0,0 +1,16 @@ +@echo off +call ..\..\..\setenv.bat x64 +SET PATH=%PATH%;c:\Program Files (x86)\7-Zip +curl https://api.crowdin.com/api/project/x64dbg/export?key=%CROWDIN_API_KEY% +curl -o translations.zip https://api.crowdin.com/api/project/x64dbg/download/all.zip?key=%CROWDIN_API_KEY% +rmdir /S /Q translations +7z x -otranslations translations.zip +cd translations +for /D %%a in (*) do (set fname=%%a) & call :rename +move *.qm ..\ +cd .. +goto :eof +:rename +set trname=x64dbg_%fname:-=_%.ts +copy %fname%\x64dbg.ts %trname% +lrelease -nounfinished %trname% \ No newline at end of file