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

Sphinx theme shown in English for translated Sphinx docs #47

Open
rffontenelle opened this issue Jun 7, 2024 · 3 comments
Open

Sphinx theme shown in English for translated Sphinx docs #47

rffontenelle opened this issue Jun 7, 2024 · 3 comments

Comments

@rffontenelle
Copy link
Collaborator

rffontenelle commented Jun 7, 2024

Texts from Sphinx themes are not available for translation and are shown in English in every translated Sphinx doc. This impacts the texts Documentation » from upper navigation bar, and On this page and Site navigation (from sidebar).

Their source file is in doc/_themes/sphinx13/layout.html. Note that Documentation is not marked for translation, but On this page and Site navigation are, still it is not extracted for translation in Sphinx UI or docs.

The Sphinx docs' layout.html file extends sphinx/themes/basic/layout.html, which has its strings included for translation in Sphinx UI. The aforementioned strings shown in Sphinx theme are exclusive from doc/_themes/sphinx13/layout.html

image

@humitos
Copy link

humitos commented Jun 12, 2024

Note that Documentation is not marked for translation,

If it's not marked as translatable, there isn't too much that we can do at build time here. We need to update the Sphinx code and mark that string translatable as the first step. Then, update the .po file with the translated strings.

but On this page and Site navigation are, still it is not extracted for translation in Sphinx UI or docs.

These strings are not translated in any of the Portuguese variations, that's why they are not translated in the built documentation. They don't appear in any of the following files:

The solution for these is to update the translations from the source language and translate those strings after that.

@rffontenelle
Copy link
Collaborator Author

The POT and PO files are updated daily, so it means that even strings marked for translation are not actually extracted from source files. I assume the Sphinx docs' string extraction should be adjusted to extract from doc/_themes/sphinx13/layout.html as well, just like Sphinx UI extract from sphinx/themes/basic/layout.html. Homework to do... Thanks!

@rffontenelle
Copy link
Collaborator Author

rffontenelle commented Jul 29, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants