Translations/crowdin-sync.bat

23 lines
807 B
Batchfile
Raw Normal View History

2016-07-13 14:19:13 +08:00
@echo off
2017-08-26 21:03:52 +08:00
if "%QT64PATH%"=="" set QT64PATH=c:\Qt\qt-5.6.2-x64-msvc2013\5.6\msvc2013_64\bin
2024-03-08 21:57:11 +08:00
SET PATH=%PATH%;%QT64PATH%;c:\Program Files\7-Zip
del /S /Q *.qm >nul 2>&1
curl -s -k https://api.crowdin.com/api/project/x64dbg/export?key=%CROWDIN_API_KEY%
curl -s -k -o translations.zip https://api.crowdin.com/api/project/x64dbg/download/all.zip?key=%CROWDIN_API_KEY%
rmdir /S /Q translations >nul 2>&1
7z x -otranslations translations.zip >nul 2>&1
TranslationChecker.exe translations --folder --fix
set CHECKER_ERRORLEVEL=%ERRORLEVEL%
2016-07-13 14:19:13 +08:00
cd translations
for /D %%a in (*) do (set fname=%%a) & call :rename
move *.qm ..\ >nul 2>&1
2016-07-13 14:19:13 +08:00
cd ..
exit /b %CHECKER_ERRORLEVEL%
2016-07-13 14:19:13 +08:00
goto :eof
2016-07-13 14:19:13 +08:00
:rename
set trname=x64dbg_%fname:-=_%.ts
copy %fname%\x64dbg.ts %trname% >nul 2>&1
2017-08-26 21:03:52 +08:00
lrelease -nounfinished %trname%