Skip to content

Commit

Permalink
Update commands in README and CI workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
rffontenelle committed Dec 12, 2023
1 parent 87142e1 commit 1c4b0e5
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
cd peps && git fetch origin && git checkout main && git reset --hard origin
- name: Set up Python
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: '3.10'
cache: 'pip'
Expand All @@ -46,11 +46,11 @@ jobs:
- name: Generate POT files
run: |
cd peps/peps && sphinx-build -E -b gettext -D gettext_compact=0 -d ../build/.doctrees . ../../locales/pot
sphinx-build -E -b gettext -D gettext_compact=0 -d peps/build/.doctrees . locales/pot
- name: Add/Update message catalog files
run: |
cd peps/peps && sphinx-intl update -d ../../locales -p ../../locales/pot
sphinx-intl update -d locales
- name: powrap
run: |
Expand All @@ -61,6 +61,6 @@ jobs:
github.event_name == 'workflow_dispatch' }}
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Translation update"
commit_message: "Update translations"
file_pattern: .gitmodules locales/**/*.po
add_options: '-A'
20 changes: 16 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,19 @@ Update peps git submodule:
git -C peps checkout main
git -C peps reset --hard origin

Update translation files:
Prepare and enter the virtual environment:

.. codeblock:: sh

git -C peps apply ../enable-i18n.diff
python peps/build.py --getext
(cd peps && sphinx-intl update -d ../locales -p build/gettext)
make -C peps venv
source peps/.venv/bin/activate

Update translation files:

.. codeblock:: sh

sphinx-build -E -bgettext -Dgettext_compact=False -d peps/build/.doctrees peps/peps locales/pot
sphinx-intl update --locale-dir locales

Commit updated po files

Expand All @@ -37,6 +43,12 @@ Commit updated po files
PO files are now ready for translation. Use a offline translation editor software, like
`Poedit`_, `Gtranslator`_, or any other of your preference.

Build documentation:

.. codeblock:: sh

sphinx-build -bhtml -jauto -Dlanguage=pt_BR -Dlocale_dirs=locales/ -Dgettext_compact=False -Dgettext_auto_build=True -W --keep-going -w sphinx-warnings.txt peps/peps peps/build/html

.. _PEP website: https://peps.python.org
.. _GitHub repository: https://github.com/python/peps
.. _Poedit: https://poedit.net
Expand Down

0 comments on commit 1c4b0e5

Please sign in to comment.