-
Notifications
You must be signed in to change notification settings - Fork 200
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
Text in navigation footer (previous, next) in not translated #359
Comments
Thanks for opening your first issue here! Engagement like this is essential for open source projects! 🤗 |
Heya, yeh these navigations are inherited from pydata-sphinx-theme:https://github.com/pydata/pydata-sphinx-theme/blob/f0834772d24c962b7d11643114db88615c43674e/pydata_sphinx_theme/layout.html#L4, and so are not currently handled by the translation functionality included in sphinx-book-theme So either it needs to be "fixed" there (cc @jorisvandenbossche) or we need to override that macro |
Ah this was actually a recent change in the CSS to add "previous" and "next" (it was inspired from the Furo docs). This makes me think we might want to change the implementation as I doubt CSS can be translated unless we turn it into a here's the CSS where that's defined: sphinx-book-theme/src/scss/_page.scss Line 90 in 298502b
|
Ah ok yeh no that needs to go in the html templates, so it can be translated |
@choldgraf did you check that #374 actually works, because I don't think it will; you are using sphinx's internal translation function which does not include PREVIOUS/NEXT, rather than using the translation function I set up in #214 |
testing in #381 |
ahhh in that case you are right - I didn't realize we needed a separate setup for this. I will keep this on my plate in that case and try to get to it when I have time. |
I can confirm that the translations do not work. I tried using the @chrisjsewell what languages did you select when you generated the translations? And after that you just put it in a specific folder and then ran |
all of them
yep should be as easy as that |
I spent a while trying to figure out the translation machinery and was not able to do so. I don't have time to work on this now so instead I've opened up an issue about documenting this infrastructure, and added in my steps that I took in that issue in case others have time to take a look: #382 I'll leave this issue open in the meantime, though removing myself from assignment because I'm not sure when I'll have a moment to work on coding stuff. We might also consider reverting back to just using |
I verified and translations happen correctly, thanks! |
Describe the problem
Hi,
The new navigation footer now has "PREVIOUS" and "NEXT" labels. These labels seem to be hardcoded in the css and are not translated when changing the language of the book. While they can be overridden in the CSS, it might be good to have them generated directly in the book's language (I am using "language: fr").
(As a side note, I preferred the old style with "<<", ">>" and the smaller font.)
Thanks,
Pascal
Link to your repository or website
No response
Steps to reproduce
This problem can be seen in any generated book when setting the language to anything different from English.
The version of Python you're using
No response
Your operating system
No response
Versions of your packages
Tasks
The text was updated successfully, but these errors were encountered: