Skip to content

🌍 Translations - Sync #266

🌍 Translations - Sync

🌍 Translations - Sync #266

name: 🌍 Translations - Sync
on:
schedule:
- cron: "5 1 * * *"
workflow_dispatch:
jobs:
sync_translations:
runs-on: ubuntu-latest
steps:
# use a specific user rather than standard bot to be able to bypass protection rule
# https://github.com/orgs/community/discussions/13836
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_GEONINJA_TOKEN }}
- name: Install Requirements
run: |
sudo apt-get update
sudo apt-get install qtbase5-dev qttools5-dev-tools
# v1.6.5: 2023-02-16
curl -OL https://github.com/transifex/cli/releases/download/v1.6.5/tx-linux-amd64.tar.gz
tar -xvzf tx-linux-amd64.tar.gz
- name: 🌍 Pull Translations
shell: bash
run: |
TX_TOKEN=${{ secrets.TX_TOKEN }} ./tx pull -a --force
- name: Commit
run: |
git config --global user.name "Geo Ninja"
git config --global user.email "${{ secrets.GH_GEONINJA_EMAIL }}"
git add i18n
for PLUGIN in about gpkg print ephem
do
git add share/python/plugins/kadas_${PLUGIN}/i18n
done
git commit -m "Synchronize translations" || echo "no changes to translations"
git push