Skip to content

Use GitHub Actions for crowdin sync #10

Use GitHub Actions for crowdin sync

Use GitHub Actions for crowdin sync #10

Workflow file for this run

name: Translate
on: [push]
jobs:
update:
runs-on: windows-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '21'
- name: Generate template
run: |
git clone https://github.com/x64dbg/translations --branch translations
git clone --depth 1 https://github.com/x64dbg/x64dbg
cd x64dbg
mkdir bin\translations
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
..\lupdate.exe @bin\translations\files.lst -locations absolute -ts x64dbg.ts
Copy-Item ".\x64dbg.ts" -Destination "..\translations\x64dbg.ts" -Force
Copy-Item ".\x64dbg.ts" -Destination "..\x64dbg.ts" -Force
- name: Crowdin sync
env:
CROWDIN_API_KEY: ${{ secrets.CROWDIN_API_KEY }}
run: |
.\crowdin-sync.bat
- name: Push translations
shell: bash
run:
cd translations
./update.sh
- name: Upload Qt translations
uses: actions/upload-artifact@v4
with:
name: translations-qm
path: translations/*.qm
- name: Upload crowdin translations
uses: actions/upload-artifact@v4
with:
name: translations-ts
path: translations/*.ts