Skip to content

Commit fddc065

Browse files
committed
Use GitHub Actions for crowdin sync
1 parent f196f36 commit fddc065

8 files changed

+59
-6
lines changed

.github/workflows/translate.yml

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Translate
2+
on: [push]
3+
4+
jobs:
5+
update:
6+
runs-on: windows-latest
7+
permissions:
8+
contents: write
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
13+
- uses: actions/setup-java@v4
14+
with:
15+
distribution: 'temurin'
16+
java-version: '21'
17+
18+
- name: Generate template
19+
run: |
20+
git clone https://github.com/x64dbg/translations --branch translations
21+
git clone --depth 1 https://github.com/x64dbg/x64dbg
22+
cd x64dbg
23+
mkdir bin\translations
24+
git ls-files *.java *.jui *.ui *.c *.c++ *.cc *.cpp *.cxx *.ch *.h *.h++ *.hh *.hpp *.hxx *.js *.qs *.qml *.qrc > bin\translations\files.lst
25+
..\lupdate.exe @bin\translations\files.lst -locations absolute -ts x64dbg.ts
26+
Copy-Item ".\x64dbg.ts" -Destination "..\translations\x64dbg.ts" -Force
27+
Copy-Item ".\x64dbg.ts" -Destination "..\x64dbg.ts" -Force
28+
29+
- name: Crowdin sync
30+
env:
31+
CROWDIN_API_KEY: ${{ secrets.CROWDIN_API_KEY }}
32+
run: |
33+
.\crowdin-sync.bat
34+
35+
- name: Push translations
36+
shell: bash
37+
run:
38+
cd translations
39+
./update.sh
40+
41+
- name: Upload Qt translations
42+
uses: actions/upload-artifact@v4
43+
with:
44+
name: translations-qm
45+
path: translations/*.qm
46+
47+
- name: Upload crowdin translations
48+
uses: actions/upload-artifact@v4
49+
with:
50+
name: translations-ts
51+
path: translations/*.ts
52+
53+
54+
55+

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
*.ts
22
*.qm
3-
*.jar
43
*.zip
54
*.log
65
translations/
6+
x64dbg/

Qt5Core.dll

5.7 MB
Binary file not shown.

Qt5Xml.dll

198 KB
Binary file not shown.

crowdin-cli.jar

6.41 MB
Binary file not shown.

crowdin-sync.bat

+3-5
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
11
@echo off
22

33
echo Uploading English sources to Crowdin...
4-
java -jar crowdin-cli.jar upload sources --no-colors --no-progress > upload.log 2>&1
4+
java -jar crowdin-cli.jar upload sources --no-colors --no-progress
55
if not %ERRORLEVEL%==0 (
6-
type upload.log
76
exit /b 1
87
)
98

109
echo Downloading translations from Crowdin...
1110
rmdir /S /Q translations >nul 2>&1
12-
java -jar crowdin-cli.jar download --no-colors --no-progress > download.log 2>&1
11+
java -jar crowdin-cli.jar download --no-colors --no-progress
1312
if not %ERRORLEVEL%==0 (
14-
type download.log
1513
exit /b 1
1614
)
1715

1816
echo Checking translations...
19-
TranslationChecker.exe translations --fix
17+
TranslationChecker.exe translations
2018
set CHECKER_ERRORLEVEL=%ERRORLEVEL%
2119

2220
echo Generating Qt translations...

lrelease.exe

377 KB
Binary file not shown.

lupdate.exe

730 KB
Binary file not shown.

0 commit comments

Comments
 (0)