Skip to content

Commit 458415f

Browse files
trallardpre-commit-ci[bot]gabalafou
authored
BUG - Fix i18n files and compilation for distribution (#2042)
While investigating #2040 I noticed that our current release missed the updated `.mo` files. This was a bug I introduced in #1959 when reworking the localisation workflows. TLD;R—Since we use `stb` to build the theme, I did not realise that compiling the i18n files had to be done within the `stb package` (I removed it from the webpack file as this was causing the infinite reload while working on our docs). Since this was an easy miss, I added our build and inspect job to the `pre-release` workflow that runs on a chron job to check our build process periodically. Once we merge this, we can make a small release to patch the current issue. --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: gabalafou <[email protected]>
1 parent 23fa1b5 commit 458415f

File tree

17 files changed

+80
-45
lines changed

17 files changed

+80
-45
lines changed

.github/workflows/CI.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
# if not we use the default version
7676
# example substitution: tox run -e compile-assets,i18n-compile,py39-tests
7777
else
78-
python -Im tox run -e compile,i18n-compile,py$(echo ${{ matrix.python-version }} | tr -d .)-tests
78+
python -Im tox run -e compile-assets,i18n-compile,py$(echo ${{ matrix.python-version }} | tr -d .)-tests
7979
fi
8080
- name: "Upload coverage data to GH artifacts 📤"
8181
if: matrix.python-version == '3.12' && matrix.os == 'ubuntu-latest' && matrix.sphinx-version == 'dev'

.github/workflows/prerelease.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ jobs:
4040
python -Im tox run -e compile-assets,i18n-compile,py$(echo ${{ matrix.python-version }} | tr -d .)-tests-no-cov
4141
echo "PYTEST_ERRORS=$?" >> $GITHUB_ENV
4242
43+
- name: "Build and inspect package 📦"
44+
uses: hynek/build-and-inspect-python-package@v2
45+
if: matrix.python-version == '3.9'
46+
id: baipp
47+
48+
- run: echo Packages can be found at ${{ steps.baipp.outputs.dist }}
49+
if: matrix.python-version == '3.9'
50+
4351
# If either the docs build or the tests resulted in an error, create an issue to note it
4452
- name: "Create an issue if failure"
4553
uses: JasonEtco/create-an-issue@v2

docs/community/topics/i18n.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ file, and visible to localizers. For example:
8282
8383
{# L10n: Navigation button at the bottom of the page #}
8484
<button type="button">
85-
{{- _("Next page") -}}
85+
{{- _('Next page') -}}
8686
</button>
8787
8888
.. _updating-localization-files:

src/pydata_sphinx_theme/locale/ca/LC_MESSAGES/sphinx.po

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# Translators:
77
# Cristhian Rivera, 2024
88
# Oriol Abril-Pla <[email protected]>, 2024
9-
#
109
msgid ""
1110
msgstr ""
1211

@@ -145,11 +144,10 @@ msgstr "Fosc"
145144
msgid "System Settings"
146145
msgstr "Configuració del sistema"
147146

148-
#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/theme-version.html:3
147+
#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/theme-version.html:4
149148
#, python-format
150149
msgid ""
151-
"Built with the <a href=\"https://pydata-sphinx-"
152-
"theme.readthedocs.io/en/stable/index.html\">PyData Sphinx Theme</a> "
150+
"Built with the <a href=\"%(PST_url)s\">PyData Sphinx Theme</a> "
153151
"%(theme_version)s."
154152
msgstr ""
155153
"Construïda amb el <a href=\"https://pydata-sphinx-"

src/pydata_sphinx_theme/locale/cs/LC_MESSAGES/sphinx.po

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,10 @@ msgstr "Tmavý"
141141
msgid "System Settings"
142142
msgstr ""
143143

144-
#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/theme-version.html:3
144+
#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/theme-version.html:4
145145
#, python-format
146146
msgid ""
147-
"Built with the <a href=\"https://pydata-sphinx-"
148-
"theme.readthedocs.io/en/stable/index.html\">PyData Sphinx Theme</a> "
147+
"Built with the <a href=\"%(PST_url)s\">PyData Sphinx Theme</a> "
149148
"%(theme_version)s."
150149
msgstr ""
151150
"Vytvořeno pomocí <a href=\"https://pydata-sphinx-"

src/pydata_sphinx_theme/locale/en/LC_MESSAGES/sphinx.po

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,11 +139,10 @@ msgstr ""
139139
msgid "System Settings"
140140
msgstr ""
141141

142-
#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/theme-version.html:3
142+
#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/theme-version.html:4
143143
#, python-format
144144
msgid ""
145-
"Built with the <a href=\"https://pydata-sphinx-"
146-
"theme.readthedocs.io/en/stable/index.html\">PyData Sphinx Theme</a> "
145+
"Built with the <a href=\"%(PST_url)s\">PyData Sphinx Theme</a> "
147146
"%(theme_version)s."
148147
msgstr ""
149148

@@ -182,3 +181,9 @@ msgstr ""
182181

183182
#~ msgid "light/dark"
184183
#~ msgstr ""
184+
185+
#~ msgid ""
186+
#~ "Built with the <a href=\"https://pydata-"
187+
#~ "sphinx-theme.readthedocs.io/en/stable/index.html\">PyData "
188+
#~ "Sphinx Theme</a> %(theme_version)s."
189+
#~ msgstr ""

src/pydata_sphinx_theme/locale/es/LC_MESSAGES/sphinx.po

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88
# Cristhian Rivera, 2024
99
# Felipe Moreno, 2024
1010
# Tania Allard, 2024
11-
#
1211
msgid ""
1312
msgstr ""
1413

@@ -42,8 +41,7 @@ msgstr "Error"
4241

4342
#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/search.html:9
4443
msgid "Please activate JavaScript to enable the search functionality."
45-
msgstr ""
46-
"Por favor, active JavaScript para habilitar la funcionalidad de búsqueda."
44+
msgstr "Por favor, active JavaScript para habilitar la funcionalidad de búsqueda."
4745

4846
#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/breadcrumbs.html:6
4947
msgid "Breadcrumb"
@@ -148,11 +146,10 @@ msgstr "Oscuro"
148146
msgid "System Settings"
149147
msgstr "Sistema"
150148

151-
#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/theme-version.html:3
149+
#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/theme-version.html:4
152150
#, python-format
153151
msgid ""
154-
"Built with the <a href=\"https://pydata-sphinx-"
155-
"theme.readthedocs.io/en/stable/index.html\">PyData Sphinx Theme</a> "
152+
"Built with the <a href=\"%(PST_url)s\">PyData Sphinx Theme</a> "
156153
"%(theme_version)s."
157154
msgstr ""
158155
"Construido con el <a href=\"https://pydata-sphinx-"

src/pydata_sphinx_theme/locale/fr/LC_MESSAGES/sphinx.po

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
# Translators:
77
# Rambaud Pierrick <[email protected]>, 2024
88
# Denis Bitouzé <[email protected]>, 2024
9-
#
109
msgid ""
1110
msgstr ""
1211

@@ -145,11 +144,10 @@ msgstr "Sombre"
145144
msgid "System Settings"
146145
msgstr "Paramètres système"
147146

148-
#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/theme-version.html:3
147+
#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/theme-version.html:4
149148
#, python-format
150149
msgid ""
151-
"Built with the <a href=\"https://pydata-sphinx-"
152-
"theme.readthedocs.io/en/stable/index.html\">PyData Sphinx Theme</a> "
150+
"Built with the <a href=\"%(PST_url)s\">PyData Sphinx Theme</a> "
153151
"%(theme_version)s."
154152
msgstr ""
155153
"Construit avec le <a href=\"https://pydata-sphinx-"

src/pydata_sphinx_theme/locale/it/LC_MESSAGES/sphinx.po

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,10 @@ msgstr "Scuro"
141141
msgid "System Settings"
142142
msgstr ""
143143

144-
#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/theme-version.html:3
144+
#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/theme-version.html:4
145145
#, python-format
146146
msgid ""
147-
"Built with the <a href=\"https://pydata-sphinx-"
148-
"theme.readthedocs.io/en/stable/index.html\">PyData Sphinx Theme</a> "
147+
"Built with the <a href=\"%(PST_url)s\">PyData Sphinx Theme</a> "
149148
"%(theme_version)s."
150149
msgstr ""
151150
"Prodotto con il tema <a href=\"https://pydata-sphinx-"

src/pydata_sphinx_theme/locale/ja/LC_MESSAGES/sphinx.po

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,11 +143,10 @@ msgstr "ダーク"
143143
msgid "System Settings"
144144
msgstr ""
145145

146-
#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/theme-version.html:3
146+
#: src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/theme-version.html:4
147147
#, python-format
148148
msgid ""
149-
"Built with the <a href=\"https://pydata-sphinx-"
150-
"theme.readthedocs.io/en/stable/index.html\">PyData Sphinx Theme</a> "
149+
"Built with the <a href=\"%(PST_url)s\">PyData Sphinx Theme</a> "
151150
"%(theme_version)s."
152151
msgstr ""
153152
"<a href=\"https://pydata-sphinx-"

0 commit comments

Comments
 (0)