Merge pull request #451 from Kosmorro/dependabot/pip/master/babel-2.18.0 #1676
This file contains hidden or 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: Internationalization check | |
| on: | |
| push: | |
| branches: [master, features] | |
| pull_request: | |
| branches: [master, features] | |
| jobs: | |
| internationalization: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: '3.x' | |
| - name: Install dependencies | |
| run: | | |
| pip install --upgrade pip poetry | |
| poetry install | |
| - name: Check i18n | |
| run: | | |
| poetry run pybabel extract --output=/tmp/kosmorro-messages.pot kosmorro | |
| echo | |
| diff=$(diff kosmorro/locales/messages.pot /tmp/kosmorro-messages.pot | grep '^>') | |
| n=$(echo "$diff" | grep -Ev '> "(POT-Creation-Date)|(Generated-By): ' | wc -l) | |
| if [ "$n" -ne "0" ]; then | |
| echo "❌ The messages file is not up-to-date!" | |
| echo " Please run the following command to fix this:" | |
| echo | |
| echo " make messages" | |
| exit 1 | |
| fi | |
| echo "✔ Messages file up-to-date." |