Skip to content

[ci] Ensure i18n up to date #1

[ci] Ensure i18n up to date

[ci] Ensure i18n up to date #1

Workflow file for this run

name: Check Internationalization
# Ensure that the .po files are up to date with any changes to the guide text
on:
pull_request:
push:
branches:
- main
jobs:
update-i18n:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- name: Install Nox
run: python3 -m pip install nox
- name: Update .po files
run: nox -s update-translations
- name: Test for uncommitted changes
run: |
if [ -z "$(git status --porcelain)" ];
then
echo "No changes detected, translations are up to date!" >> $GITHUB_STEP_SUMMARY
exit 0
else
echo "Changes to .po files detected, please run `nox -s update-translations` to reflect changes to source text" >> $GITHUB_STEP_SUMMARY
echo "$(git status)"
echo "$(git diff)"
exit 1
fi