GH-97950: Allow translation of index directive content#104000
Merged
Uh oh!
There was an error while loading. Please reload this page.
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
indexdirectives 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
pairdirective is one of the already-translatedpairindextypesvalues. As we intend to move away from this, we need Sphinx to believe that these values don't exist, by deleting them when using thegettextbuilder.https://github.com/sphinx-doc/sphinx/blob/ba7408209e84ee413f240afc20f3c6b484a81f8f/sphinx/builders/gettext.py#L162-L165
A
.. index::entries #97950