Skip to content

Sync translations with Crowdin #162

Sync translations with Crowdin

Sync translations with Crowdin #162

name: Sync translations with Crowdin
on:
push:
branches:
- 'master'
paths:
- 'sources/**'
- '!sources/backend/**'
schedule:
- cron: '00 00 * * 1'
workflow_dispatch:
jobs:
sync_translatable_strings:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update translatable strings
run: docker run --rm -v $(pwd):/workspace ghcr.io/linuxmuster/linuxmuster-linbo-gui-build linbo-gui-lupdate
- name: Delete all but blank.ts
run: |
rm ./resources/translations/linbo-gui/*-*.ts
- name: Sync translations with crowdin
uses: crowdin/github-action@1.0.16
with:
token: ${{ secrets.CROWDIN_API_TOKEN }}
# upload translation template
upload_sources: true
# download new translations
download_translations: true
skip_untranslated_strings: true
export_only_approved: true
push_translations: false
- name: Create en-GB.ts
run: |
cp ./resources/translations/linbo-gui/blank.ts ./resources/translations/linbo-gui/en-GB.ts
- name: Create Pull Request
uses: peter-evans/create-pull-request@v4
with:
commit-message: "New Translations from Crowdin (by GitHub Action)"
title: "New Translations from Crowdin (by GitHub Action)"
body: "New Translations from Crowdin (by GitHub Action)"
author: "GitHub Action <action@github.com>"
branch: "i18n"