From 42d479a3716f53c9a80100867aed25ade4f28805 Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Mon, 18 Nov 2024 12:35:56 +0000 Subject: [PATCH 01/16] Fix tox command in CI --- .github/workflows/CI.yml | 2 +- docs/community/topics/i18n.rst | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 68ecdca2a..3f35053bb 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -75,7 +75,7 @@ jobs: # if not we use the default version # example substitution: tox run -e compile-assets,i18n-compile,py39-tests else - python -Im tox run -e compile,i18n-compile,py$(echo ${{ matrix.python-version }} | tr -d .)-tests + python -Im tox run -e compile-assets,i18n-compile,py$(echo ${{ matrix.python-version }} | tr -d .)-tests fi - name: "Upload coverage data to GH artifacts 📤" if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' && matrix.sphinx-version == 'dev' diff --git a/docs/community/topics/i18n.rst b/docs/community/topics/i18n.rst index 8c1a2afd6..b340a0b60 100644 --- a/docs/community/topics/i18n.rst +++ b/docs/community/topics/i18n.rst @@ -82,7 +82,7 @@ file, and visible to localizers. For example: {# L10n: Navigation button at the bottom of the page #} .. _updating-localization-files: From 594a040cf8297badabf4c6e8e27146e030fd4f4b Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Mon, 18 Nov 2024 12:36:39 +0000 Subject: [PATCH 02/16] Compile translations before JS assets --- tox.ini | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tox.ini b/tox.ini index 5e062a708..726deffbe 100644 --- a/tox.ini +++ b/tox.ini @@ -15,7 +15,7 @@ env_list = # helping contributors run common tasks without needing to call all the steps # For example to run the tests: tox run -m tests labels = - tests = compile-assets, i18n-compile, py312-tests + tests = i18n-compile, compile-assets, py312-tests a11y = compile-assets, i18n-compile, py312-docs, a11y-tests i18n = i18n-extract, i18n-compile live-server = compile-assets, i18n-compile, docs-live @@ -156,7 +156,8 @@ allowlist_externals = bash commands = # explicitly pass this as a bash command to set PST_VERSION bash -c "PST_VERSION=$(pip show pydata-sphinx-theme | grep Version | awk -F': ' '{print $2}') && \ - pybabel extract . -F babel.cfg -o src/pydata_sphinx_theme/locale/sphinx.pot --project=pydata-sphinx-theme --copyright-holder='PyData developers' --version=$PST_VERSION" + pybabel extract . -F babel.cfg -o src/pydata_sphinx_theme/locale/sphinx.pot --keywords='_ __ l_ lazy_gettext' \ + --project=pydata-sphinx-theme --copyright-holder='PyData developers' --version=$PST_VERSION" pybabel update -i src/pydata_sphinx_theme/locale/sphinx.pot -d src/pydata_sphinx_theme/locale -D sphinx {posargs} # add a new locale for translations based on the catalog template From 4cce361562c9dc5c0fe8c4bf18b1342f0d518bea Mon Sep 17 00:00:00 2001 From: Tania Allard Date: Mon, 18 Nov 2024 12:36:57 +0000 Subject: [PATCH 03/16] Update translation strings --- .../theme/pydata_sphinx_theme/components/page-toc.html | 2 +- .../theme/pydata_sphinx_theme/components/theme-version.html | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/page-toc.html b/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/page-toc.html index 8c19d3b8f..1a5b02582 100644 --- a/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/page-toc.html +++ b/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/page-toc.html @@ -5,7 +5,7 @@