script for automatically downloading and building translations

This commit is contained in:
mrexodia 2016-07-13 07:36:16 +02:00
parent b6bcf2179c
commit 75f7b31591
No known key found for this signature in database
GPG Key ID: D72F9A4FAA0073B4
2 changed files with 19 additions and 1 deletions

2
.gitignore vendored
View File

@ -1,3 +1,5 @@
*.qm
*.jar
*.zip
*.exe
translations/

16
crowdin-sync.bat Normal file
View File

@ -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%