Translations Update #405
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: Translations Update | |
concurrency: | |
group: i18n-${{ github.ref }} | |
cancel-in-progress: true | |
on: | |
workflow_dispatch: | |
schedule: | |
# Monday, Thursday, Saturday at 2:00 a.m. | |
- cron: '0 2 * * 1,4,6' | |
jobs: | |
update: | |
if: github.repository == 'widelands/widelands' | |
name: Fetch translations and update catalogs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
- name: Installing python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.x | |
- name: Installing dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install gettext translate-toolkit appstream desktop-file-utils | |
pip install pyformat | |
mkdir $HOME/txcli | |
pushd $HOME/txcli | |
curl -o- https://raw.githubusercontent.com/transifex/cli/master/install.sh | bash | |
popd | |
- name: Synchronizing translations | |
run: | | |
export PATH="$HOME/txcli:$PATH" | |
echo "${{ secrets.TXAUTH }}" > ~/.transifexrc | |
git config --global user.name "The Widelands Translations Bot" | |
git config --global user.email "[email protected]" | |
./utils/merge_and_push_translations.sh "https://bunnybot:${{ secrets.WIDELANDS_FORMAT_TOKEN }}@github.com/widelands/widelands.git" |