Skip to content

Commit

Permalink
Merge 059068e into 8af572e
Browse files Browse the repository at this point in the history
  • Loading branch information
submarcos authored Jan 13, 2025
2 parents 8af572e + 059068e commit 16aa819
Show file tree
Hide file tree
Showing 69 changed files with 13,239 additions and 22,860 deletions.
26 changes: 25 additions & 1 deletion .github/workflows/doc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ env:

jobs:
doc:
name: Documentation
name: Doc structure
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -30,3 +30,27 @@ jobs:
run: |
cd docs/
make html SPHINXOPTS="-W"
- name: Check translations build
run: |
cd docs/
make gettext
rm ./_build/locale/changelog.pot
sphinx-intl update -l fr
sphinx-intl build
sphinx-build -b html -D language='fr' -d _build/doctrees . _build/html/fr
- name: Check missing translations
uses: tj-actions/verify-changed-files@v17
id: verify-changed-files
with:
files: |
**/*.po
- name: Check no translation file has changed
if: steps.verify-changed-files.outputs.files_changed == 'true'
run: |
echo "Translation file(s) changed: ${{ steps.verify-changed-files.outputs.changed_files }}"
git diff
core.setFailed('Please update doc translation y running `make gettext` and `sphinx-intl update -l fr`, then fix or update translation, and commit the changes.')
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ serve:
deps:
$(docker_compose) run --rm web bash -c "pip-compile -q --strip-extras && pip-compile -q --strip-extras dev-requirements.in && pip-compile -q --strip-extras docs/requirements.in"

doc_translations:
$(docker_compose) run --rm sphinx bash -c "make gettext && rm ./_build/locale/changelog.pot && sphinx-intl update -l fr"

flake8:
$(docker_compose) run --rm web flake8 geotrek

Expand Down
118 changes: 59 additions & 59 deletions docs/changelog.rst

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
import datetime
import os

root = os.path.abspath(os.path.dirname(os.path.dirname(__file__)))

extensions = [
'sphinx.ext.todo',
Expand Down Expand Up @@ -115,3 +112,6 @@
'Makina Corpus', 'Geotrek-admin', 'One line description of project.',
'Miscellaneous'),
]

locale_dirs = ['locale'] # path is example but recommended.
gettext_compact = False # optional.
2 changes: 1 addition & 1 deletion docs/contribute/contributing.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ Check TODO in the source tree:
Pull requests
-------------

Before creating a pull request, ensure you follow thoses rules :
Before creating a pull request, ensure you follow those rules :

* Follow the guidelines of this page
* Self-review your code
Expand Down
2 changes: 1 addition & 1 deletion docs/contribute/translating.rst
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Translation features
Weblate shows all translation by language and by module.
Errors and left to translate can be displayed easily.

Weblate can identify problematic translations as chains between projects, punctuation inconsistancy.
Weblate can identify problematic translations as chains between projects, punctuation inconsistency.

.. figure:: ../images/translating/weblate-check.png
:alt: image
Expand Down
Loading

0 comments on commit 16aa819

Please sign in to comment.