Translated using Weblate (German) #93
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto-Translate with Weblate | |
on: | |
push: | |
branches: [ main, test-build ] | |
jobs: | |
# runs on weblate commit | |
weblate-commit-build: | |
if: ${{ contains(github.event.head_commit.message, 'Translated using Weblate') }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: TODO - start full build (delayed) | |
run: echo "TODO - start delayed full build, maybe 15mins?" | |
# on regular commit -> .pot/.po pushed by main repo | |
full-build: | |
if: ${{ ! contains(github.event.head_commit.message, 'Translated using Weblate') }} | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
runs-on: ubuntu-latest | |
env: | |
MAIN_LANGS: en | |
OTHER_LANGS: de es fr ru nl it ja el bg da et fi lv lt pl pt ro sv sk sl cs hu zh_CN | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Weblate - pull component repository | |
run: bash trigger_weblate.sh ${{ secrets.WEBLATE_API_URL }} none ${{ secrets.WEBLATE_TOKEN }} pull | |
- name: Weblate - force wait hoping for weblate to settle | |
run: sleep 180 | |
- name: Weblate - trigger automated translations | |
shell: bash | |
run: | | |
for lang in $OTHER_LANGS | |
do | |
bash trigger_weblate.sh ${{ secrets.WEBLATE_API_URL }} $lang ${{ secrets.WEBLATE_TOKEN }} translate | |
done | |
- name: Weblate - push to upstream | |
run: bash trigger_weblate.sh ${{ secrets.WEBLATE_API_URL }} none ${{ secrets.WEBLATE_TOKEN }} push | |