-
Notifications
You must be signed in to change notification settings - Fork 322
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
Translations for the theme #434
Comments
Hi, I found this very nice theme right now but noticed the same issue. |
AFAICS, “Back to top” isn't translated either. |
Broadly speaking, most of the stuff in this theme is not translated. It's plumbed into Sphinx's translation engine, but the theme doesn't contain localisations for any of the strings it has that aren't in Sphinx's default translations bundle. Text like "Back to top" is an example of that. Honestly, I'm not familiar with how to add translations to this theme such that Sphinx would pick it up (and obviously can't translate to languages that I don't know) -- so help would be welcome for this! |
Hello - I was onboarded into working on tech doc by working on translation projects using Sphinx, so let me give you a few insights if I may ? I hope I understand the question correctly, let me know if that is not the case. I would be happy to help translate this theme messages from English to French and to figure out how to set things up generally speaking. A few things:
I am happy to do some research on all of this, let me know what questions you have! |
If you need a Spanish translator, count with me ;) |
I did some more research ! The short version is : I believe the more straightforward path would be to add messages to this transifex project for sphinx system messages. I believe this because of a message on the Sphinx users list and another similar message on Github. I haven't found yet proper instructions on how to translate just one theme while making this translation available... I guess you could commit the More resources consulted include this Transifex doc on integrating with Sphinx |
I know that this is not the right solution by far, but if you just need to translate a couple of components you can extend the 'page.html' template (or any other). This was the simplest and quickest solution I managed to implement. In the example below, I needed to translate from "On this page" to "Nesta página":
|
Any progress on the current issue? |
|
Perhaps you could ask the team who manage the translation of But, BTW, while I could find the "Back to top" string in the Furo repo, I couldn't find "on this page" either in the Furo repo or in the Transifex repo for Sphinx. |
@pradyunsg you can count me in for Polish 🇵🇱 It would be great to have a native button to switch the language! 🤩 Here is what I partially did without Transifex |
For reference, the similar Pydata Sphinx Theme implemented translation support recently (minus a language switcher, which I plan to hopefully try to contribute in the future), see PR pydata/pydata-sphinx-theme#1192 for details on that. |
🙋 I can do German |
I can do Turkish translation. I checked the latest code and saw |
@pradyunsg I'm working on a script to handle localization of Python docs theme at python/python-docs-theme#195. It extracts source strings into template POT file, initializes locale PO files, updates existing PO based on new POT files, and compiles MO files from locales PO file to be used by the theme. Are you looking for something like that? Or a more complicated solution ia needed? |
Discussed in #429
This theme currently does not provide translations for any of the text in it, that isn't already a part of the Sphinx translations database. This is an issue for discussing and tracking improvements on this front.
The text was updated successfully, but these errors were encountered: