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

Strings not all translated with PyData Sphinx Theme 0.16.0 #2040

Open
dbitouze opened this issue Nov 14, 2024 · 2 comments
Open

Strings not all translated with PyData Sphinx Theme 0.16.0 #2040

dbitouze opened this issue Nov 14, 2024 · 2 comments
Labels
kind: bug Something isn't working needs: investigation Someone in the team needs to investigate and try and reproduce this issue tag: i18N Items related to internationalization

Comments

@dbitouze
Copy link
Contributor

dbitouze commented Nov 14, 2024

Sorry for the late report but, with Sphinx 8.1.3 and PST 0.16.0, strings are not all translated. At least:

  • “On this page”
  • “Built with the PyData Sphinx Theme 0.16.0.”

are still in English.

This can be checked with the following conf.py file:

# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'Test PST'
copyright = '2024, Me'
author = 'Me'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = []

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

language = 'fr'

# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "pydata_sphinx_theme"
html_static_path = ['_static']

and/or the joined archive.

@trallard trallard added the tag: i18N Items related to internationalization label Nov 15, 2024
@trallard
Copy link
Collaborator

Thanks @dbitouze I can reproduce this with your example and in https://gitlab.gutenberg-asso.fr/gutenberg/faq-gut

It seemed to have been fixed prior to the 0.16.0 release but this seems to have reverted.
I checked even with the current code in main and while the locale files seem ok the strings are not properly localised in the built site.

I will do some digging and see if I can spot the culprit.

@trallard trallard added kind: bug Something isn't working needs: investigation Someone in the team needs to investigate and try and reproduce this issue labels Nov 15, 2024
@trallard
Copy link
Collaborator

@dbitouze, thanks a million for flagging this issue; it helped me debug and fix a pesky bug in our build workflow 🙏🏽

trallard added a commit that referenced this issue Nov 25, 2024
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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: bug Something isn't working needs: investigation Someone in the team needs to investigate and try and reproduce this issue tag: i18N Items related to internationalization
Projects
None yet
Development

No branches or pull requests

2 participants