diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 758254c7f1..c526c531fd 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -7,16 +7,16 @@ on: - '.github/workflows/lint.yml' # if lint workflow change - 'dev-requirements.txt' # if dev-requirements.txt change - 'setup.cfg' # if lint tools configuration change - env: - DEBIAN_FRONTEND: noninteractive + VAR_DIR: /home/runner/work/Geotrek-admin/Geotrek-admin/var + ENV: dev jobs: migrations: name: Checking SRID in migrations files runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - run: | test $(ls geotrek/*/migrations/*.py | xargs grep -l srid | xargs grep -L SRID | wc -l) -eq 0 @@ -24,7 +24,7 @@ jobs: name: Checking Flake8 rules runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - uses: ./.github/actions/python-cache-requirements with: requirements: dev-requirements.txt @@ -36,3 +36,38 @@ jobs: - name: Flake8 run: | flake8 geotrek + + translations: + name: Checking translations files are up-to-date + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: ./.github/actions/python-cache-requirements + with: + requirements: requirements.txt + - name: Install dependencies + run: | + sudo apt-get install -y gettext + pip3 install -r dev-requirements.txt + mkdir -p var/static var/conf/extra_static var/media/upload var/cache/sessions var/cache/api_v2 var/cache/fat var/log var/conf/extra_templates var/conf/extra_locale var/tmp + + - name: Check translations + run: | + ./manage.py makemessages -a --no-location --no-obsolete -v 3 + ./manage.py compilemessages + ls -als + + - uses: tj-actions/verify-changed-files@v20 + id: verify-changed-files + with: + files: | + **/*.po + + - name: Verify translation files changed + if: steps.verify-changed-files.outputs.files_changed == 'true' + env: + CHANGED_FILES: ${{ steps.verify-changed-files.outputs.changed_files }} + run: | + echo "Changed files: $CHANGED_FILES" + git diff + core.setFailed('Please fix your translation files with ./manage.py makemessages -a --no-location --no-obsolete') diff --git a/geotrek/core/locale/fr/LC_MESSAGES/django.po b/geotrek/core/locale/fr/LC_MESSAGES/django.po index 5dc65d6c19..4d756f151b 100644 --- a/geotrek/core/locale/fr/LC_MESSAGES/django.po +++ b/geotrek/core/locale/fr/LC_MESSAGES/django.po @@ -19,7 +19,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=n > 1;\n" "X-Generator: Weblate 4.1.1\n" -msgid "Core" +msgid "Coree" msgstr "Cœur" msgid "Topology is empty."