gh-156360: Improve turtle translation support - #156422
StanFromIreland wants to merge 8 commits into
Conversation
Documentation build overview
397 files changed ·
|
|
@m-aciek can you please take a look? |
m-aciek
left a comment
There was a problem hiding this comment.
After thinking it through, I don’t think we need to change the existing loader. The turtle-translations package can provide modules such as turtle_docstringdict_pl.py containing a docsdict dictionary, which older Python versions can already load through turtle.cfg. This would let us distribute and update translations independently of Python releases while preserving compatibility with the existing loading mechanism.
Documenting the package would still help users discover and install translations, and an environment variable for selecting the language could be a convenient addition. Could we focus this PR on those improvements and keep the existing loader?
|
I'm still not convinced, however, for two reasons:
|
|
I agree that the top-level modules introduce some namespace clutter; that seems to be the main trade-off of preserving compatibility with the existing loader. For the version-compatibility issue, though, I don't think this necessarily requires separate releases of The version-specific dictionaries could also be generated from the common translation catalogue against the API exposed by each supported |
|
Ok, let's try that for now, and we can always iterate since there's quite a bit of time till the feature freeze. I've made the switch, please review. |
m-aciek
left a comment
There was a problem hiding this comment.
Thanks for the update. Could we make the documentation easier to follow for beginners by leading with a complete example of enabling a translation, followed by a link to instructions for contributing a new language? The dictionary format and module lookup details could go alongside write_docstringdict().
In the introduction, “translations” would be clearer than “translation catalogues” or “docstring dictionaries”. It would also help to explain that only the help text is translated; Python function names remain unchanged.
Co-authored-by: Maciej Olko <maciej.olko@affirm.com>
|
I reshuffled some things around, thanks for the review. I'd like to wait a little before we start deprecating things, and I need to think a bit more about what to do with the |
m-aciek
left a comment
There was a problem hiding this comment.
🚀 I left yet couple of non-blocking suggestions.
Co-authored-by: Maciej Olko <maciej.olko@affirm.com>
Uh oh!
There was an error while loading. Please reload this page.