Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👷 [CI] Add job to check translations #4137

Draft
wants to merge 49 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
6088d9b
👷 [CI] Add job to check translations
Chatewgne May 28, 2024
5fdfec9
fix change version file
submarcos Jun 5, 2024
a5b3ad1
fix change version file
submarcos Jun 5, 2024
1e8bfc1
fix change version file
submarcos Jun 5, 2024
423a4b6
fix change version file
submarcos Jun 5, 2024
dcf2bc1
fix change version file
submarcos Jun 5, 2024
333fc44
fix change version file
submarcos Jun 5, 2024
4f7bd25
fix change version file
submarcos Jun 5, 2024
9d5d81d
fix change version file
submarcos Jun 5, 2024
4f0369b
fix change version file
submarcos Jun 5, 2024
48d83dc
fix change version file
submarcos Jun 5, 2024
feeac09
fix change version file
submarcos Jun 5, 2024
c726ba3
fix change version file
submarcos Jun 5, 2024
0842e3c
fix change version file
submarcos Jun 5, 2024
9d0fbc0
fix change version file
submarcos Jun 5, 2024
6c684cd
fix change version file
submarcos Jun 5, 2024
01a28c1
fix change version file
submarcos Jun 5, 2024
8274853
fix change version file
submarcos Jun 5, 2024
8e97b30
fix change version file
submarcos Jun 5, 2024
ecfee7b
fix change version file
submarcos Jun 5, 2024
4cb52b8
fix change version file
submarcos Jun 5, 2024
41fae64
fix change version file
submarcos Jun 5, 2024
e72b529
fix change version file
submarcos Jun 5, 2024
2404e52
fix change version file
submarcos Jun 5, 2024
4fb5215
fix change version file
submarcos Jun 5, 2024
8f6455c
fix change version file
submarcos Jun 5, 2024
8b29f5f
fix change version file
submarcos Jun 5, 2024
a2407bf
fix change version file
submarcos Jun 5, 2024
a34f795
fix change version file
submarcos Jun 5, 2024
a29f116
fix change version file
submarcos Jun 5, 2024
a584f7e
fix change version file
submarcos Jun 5, 2024
b808002
fix change version file
submarcos Jun 5, 2024
06b9575
Apply suggestions from code review
submarcos Oct 1, 2024
75a6de8
Apply suggestions from code review
submarcos Oct 1, 2024
6f25fca
use new mapentity
submarcos Oct 1, 2024
b223e53
fix lint
submarcos Oct 2, 2024
52bf00f
fix lint
submarcos Oct 2, 2024
034091f
fix lint
submarcos Oct 2, 2024
6d6ab91
fix lint
submarcos Oct 2, 2024
02a8131
fix lint
submarcos Oct 2, 2024
66cc803
fix lint
submarcos Oct 2, 2024
b8d4b61
fix lint
submarcos Oct 2, 2024
b47f1a7
fix lint
submarcos Oct 2, 2024
1340be6
fix lint
submarcos Oct 2, 2024
7d209dc
fix lint
submarcos Oct 2, 2024
15435ac
fix lint
submarcos Oct 2, 2024
d2908c7
fix lint
submarcos Oct 2, 2024
15a0b6e
fix lint
submarcos Oct 2, 2024
cb31f86
fix lint
submarcos Oct 2, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 39 additions & 4 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,24 +7,24 @@ 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

flake8:
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
Expand All @@ -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')
2 changes: 1 addition & 1 deletion geotrek/core/locale/fr/LC_MESSAGES/django.po
Original file line number Diff line number Diff line change
Expand Up @@ -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."
Expand Down
Loading