[ci] Ensure i18n up to date #4
Workflow file for this run
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: 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-release-languages | |
- 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 |