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 50 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from 34 commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
28cab1b
👷 [CI] Add job to check translations
Chatewgne May 28, 2024
893da15
fix change version file
submarcos Jun 5, 2024
ae5b19c
fix change version file
submarcos Jun 5, 2024
5af6beb
fix change version file
submarcos Jun 5, 2024
11556d8
fix change version file
submarcos Jun 5, 2024
2ff68c4
fix change version file
submarcos Jun 5, 2024
9744f93
fix change version file
submarcos Jun 5, 2024
96165a6
fix change version file
submarcos Jun 5, 2024
f200283
fix change version file
submarcos Jun 5, 2024
4e19406
fix change version file
submarcos Jun 5, 2024
db03acc
fix change version file
submarcos Jun 5, 2024
eca40aa
fix change version file
submarcos Jun 5, 2024
47d495d
fix change version file
submarcos Jun 5, 2024
d312576
fix change version file
submarcos Jun 5, 2024
2b0fda0
fix change version file
submarcos Jun 5, 2024
35b5c03
fix change version file
submarcos Jun 5, 2024
34cc5de
fix change version file
submarcos Jun 5, 2024
be768b5
fix change version file
submarcos Jun 5, 2024
4d90bb1
fix change version file
submarcos Jun 5, 2024
22d5be1
fix change version file
submarcos Jun 5, 2024
ad5afa7
fix change version file
submarcos Jun 5, 2024
1a668c8
fix change version file
submarcos Jun 5, 2024
d68a4f6
fix change version file
submarcos Jun 5, 2024
de4143d
fix change version file
submarcos Jun 5, 2024
6152a7d
fix change version file
submarcos Jun 5, 2024
b8cfb0e
fix change version file
submarcos Jun 5, 2024
2e26c3e
fix change version file
submarcos Jun 5, 2024
6811153
fix change version file
submarcos Jun 5, 2024
ef6ce2a
fix change version file
submarcos Jun 5, 2024
5ea7196
fix change version file
submarcos Jun 5, 2024
159776d
fix change version file
submarcos Jun 5, 2024
f7b085e
fix change version file
submarcos Jun 5, 2024
1851d1f
Merge branch 'master' into cicd_translations
submarcos Oct 1, 2024
2befe15
Apply suggestions from code review
submarcos Oct 1, 2024
16cd1c4
Apply suggestions from code review
submarcos Oct 1, 2024
7b62561
use new mapentity
submarcos Oct 1, 2024
90702d0
fix lint
submarcos Oct 2, 2024
a128c1d
fix lint
submarcos Oct 2, 2024
89e8601
fix lint
submarcos Oct 2, 2024
51eecc6
fix lint
submarcos Oct 2, 2024
27b511c
fix lint
submarcos Oct 2, 2024
192eb17
fix lint
submarcos Oct 2, 2024
3a2a8d9
fix lint
submarcos Oct 2, 2024
630665a
fix lint
submarcos Oct 2, 2024
3a55852
fix lint
submarcos Oct 2, 2024
23faf88
fix lint
submarcos Oct 2, 2024
ee2d0eb
fix lint
submarcos Oct 2, 2024
496cf22
fix lint
submarcos Oct 2, 2024
c09ae9c
fix lint
submarcos Oct 2, 2024
984d12e
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
75 changes: 74 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -36,3 +36,76 @@ jobs:
- name: Flake8
run: |
flake8 geotrek

translations:
name: Checking .po files are up-to-date
runs-on: ubuntu-latest
env:
ENV: dev
DEBIAN_FRONTEND: noninteractive
POSTGRES_DB: ci_test
POSTGRES_PASSWORD: ci_test
POSTGRES_USER: ci_test
POSTGRES_HOST: 127.0.0.1
SERVER_NAME: geotrek.local
SECRET_KEY: test-test-test
CONVERSION_HOST: localhost
CAPTURE_HOST: localhost
REDIS_HOST: 127.0.0.1
VAR_DIR: /home/runner/work/Geotrek-admin/Geotrek-admin/var
LANG: C.UTF-8
LANGUAGES: en fr
LANGUAGE_CODE: en
strategy:
matrix:
os: ['focal-3.8']
python-version: ['3.8']

steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
cache: 'pip'
python-version: '3.8.18'
cache-dependency-path: |
requirements.txt
dev-requirements.txt
docs/requirements.txt

- uses: actions/cache@v3
with:
path: |
./venv
key: pip-${{ matrix.python-version }}-${{ matrix.os }}-${{ hashFiles('./requirements.txt', './dev-requirements.txt', './docs/requirements.txt') }}
restore-keys: |
pip-${{ matrix.python-version }}-${{ matrix.os }}-${{ hashFiles('./requirements.txt', './dev-requirements.txt', './docs/requirements.txt') }}
pip-${{ matrix.python-version }}-${{ matrix.os }}

- name: Install deps
run: |
sudo apt-get -qq update
sudo apt-get -yqq install gettext libcairo2 libpq-dev
python3.8 -m venv venv
./venv/bin/pip install -r requirements.txt
submarcos marked this conversation as resolved.
Show resolved Hide resolved

- name: Generate translation files
run: |
mkdir -p ./var/log ./var/cache/sessions geotrek/locale ./var/conf/extra_locale
submarcos marked this conversation as resolved.
Show resolved Hide resolved
mkdir -p $VAR_DIR/conf/extra_static $VAR_DIR/tmp
ENV=dev ./venv/bin/django-admin makemessages -a --no-location --no-obsolete
submarcos marked this conversation as resolved.
Show resolved Hide resolved

- 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 -p
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