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

GH-97950: Allow translation of index directive content #104000

Merged
merged 6 commits into from
May 4, 2023

Conversation

AA-Turner
Copy link
Member

@AA-Turner AA-Turner commented Apr 29, 2023

This comment, which eventually links to this comment point out that Sphinx's support for translating index directives isn't as straightfowards as it could be.

This PR is my best attempt at a workaround -- the reason for the commenting out is that there is a test to check if an entry of a pair directive is one of the already-translated pairindextypes values. As we intend to move away from this, we need Sphinx to believe that these values don't exist, by deleting them when using the gettext builder.

https://github.com/sphinx-doc/sphinx/blob/ba7408209e84ee413f240afc20f3c6b484a81f8f/sphinx/builders/gettext.py#L162-L165

A

@hugovk hugovk merged commit 35d2738 into python:main May 4, 2023
19 checks passed
@miss-islington
Copy link
Contributor

Thanks @AA-Turner for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11.
🐍🍒⛏🤖

@bedevere-bot
Copy link

GH-104151 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label May 4, 2023
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 4, 2023
…H-104000)

(cherry picked from commit 35d2738)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
@AA-Turner
Copy link
Member Author

Thanks Hugo!

A

hugovk pushed a commit that referenced this pull request May 4, 2023
) (#104151)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
@AA-Turner AA-Turner deleted the old-index-directives/translate-index branch May 4, 2023 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants