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

Make synopsis translatable #9935

Open
eviau opened this issue Dec 3, 2021 · 4 comments
Open

Make synopsis translatable #9935

eviau opened this issue Dec 3, 2021 · 4 comments
Milestone

Comments

@eviau
Copy link

eviau commented Dec 3, 2021

Thank you for building and maintaining Sphinx, it is a great project !


Is your feature request related to a problem? Please describe.

I have been part of the python-docs-fr localization project.

I wanted to translate the pymodule index page: https://docs.python.org/fr/3/py-modindex.html

As far as I understand, this page is generated automatically by Sphinx. The synopsis are not available in any .po file.

How to make them available for translation?

I believe that having this page accessible in the same locales as the docs is pivotal in navigating the docs in the chosen locale.

Describe the solution you'd like

I would like to have access to the synopsis on this page, either in one associated po file, or in the respective modules po files.

Describe alternatives you've considered

I did try to discover how to make the changes by myself, but my understanding of the Sphinx project does not enable me to make the changes, in either a PR to the main branch of the project, or as a sphinx extension, or a sphinxcontrib package.

As far as my understanding goes, the changes needs to be made in Sphinx itself, not in sphinx-intl nor docutils.

Additional context

This question was part of python/python-docs-fr#1705

I would be happy to work towards a solution for this feature with someone else in a pair programming setting, or to have some sort of support/mentoring to do so.

@eviau eviau added the type:enhancement enhance or introduce a new feature label Dec 3, 2021
@eviau
Copy link
Author

eviau commented Dec 3, 2021

My current main insight that might work would be to implement the translatable class:

class translatable(nodes.Node):

in the index class:

class index(nodes.Invisible, nodes.Inline, nodes.TextElement):

Does that make any sense ?

@eviau
Copy link
Author

eviau commented Dec 3, 2021

I have also looked at #7979 and #2880 for getting a better understanding of how to do this.

@tk0miya tk0miya added this to the 4.4.0 milestone Dec 4, 2021
@tk0miya tk0miya modified the milestones: 4.4.0, 4.5.0 Jan 13, 2022
@tk0miya tk0miya modified the milestones: 4.5.0, 5.0.0 Mar 27, 2022
@tk0miya tk0miya modified the milestones: 5.0.0, 5.x May 2, 2022
@AA-Turner AA-Turner modified the milestones: 5.x, 6.x Oct 4, 2022
@AA-Turner AA-Turner modified the milestones: 6.x, 7.x Apr 29, 2023
@eviau
Copy link
Author

eviau commented Feb 7, 2024

It's been a while - wanted to note that there are some good hints in #11956 (comment)

I believe that the synopsis is already a node, but I might be wrong...

Would it be possible to add a help wanted label to this issue ?

@eviau
Copy link
Author

eviau commented Mar 11, 2024

I continued researching this issue.

I think this could be used: https://www.sphinx-doc.org/en/master/extdev/i18n.html

My question is: is this only meant for extensions, or is this meant to be used in general?

Would someone know?

@AA-Turner AA-Turner modified the milestones: 7.x, 8.x Jul 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants