-
-
Notifications
You must be signed in to change notification settings - Fork 31k
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
hugovk
merged 6 commits into
python:main
from
AA-Turner:old-index-directives/translate-index
May 4, 2023
Merged
GH-97950: Allow translation of index directive content #104000
hugovk
merged 6 commits into
python:main
from
AA-Turner:old-index-directives/translate-index
May 4, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
AA-Turner
added
docs
Documentation in the Doc dir
skip news
needs backport to 3.11
only security fixes
labels
Apr 29, 2023
ezio-melotti
reviewed
May 1, 2023
AA-Turner
commented
May 1, 2023
hugovk
reviewed
May 2, 2023
ezio-melotti
approved these changes
May 3, 2023
hugovk
approved these changes
May 3, 2023
Thanks @AA-Turner for the PR, and @hugovk for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11. |
GH-104151 is a backport of this pull request to the 3.11 branch. |
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 <[email protected]>
Thanks Hugo! A |
hugovk
pushed a commit
that referenced
this pull request
May 4, 2023
) (#104151) Co-authored-by: Adam Turner <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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-translatedpairindextypes
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 thegettext
builder.https://github.com/sphinx-doc/sphinx/blob/ba7408209e84ee413f240afc20f3c6b484a81f8f/sphinx/builders/gettext.py#L162-L165
A
.. index::
entries #97950