Crowdin » Download translations #5
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: Crowdin » Download translations | |
on: | |
schedule: | |
- cron: "0 5 * * 1" | |
workflow_dispatch: | |
jobs: | |
update-translations: | |
if: github.repository_owner == 'opencast' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: prepare git | |
run: | | |
git config --global user.email 'crowdin-bot@editor.opencast.org' | |
git config --global user.name 'Crowdin Bot' | |
- name: prepare crowdin client | |
run: | | |
wget --quiet https://artifacts.crowdin.com/repo/deb/crowdin3.deb -O crowdin.deb | |
sudo dpkg -i crowdin.deb | |
- name: download translations | |
env: | |
CROWDIN_TOKEN: ${{ secrets.CROWDIN_TOKEN }} | |
run: | | |
crowdin download --config .crowdin.yaml -b main | |
- name: update language list | |
working-directory: src/i18n/locales | |
run: $GITHUB_WORKSPACE/.github/generate-lngs.sh > ../lngs-generated.ts | |
- name: add new translations | |
run: | | |
git add src/i18n/ | |
- name: upload translations | |
run: | | |
if git commit -m "Automatically update translation keys"; then | |
git push | |
fi |