Fix false positive i18n warnings for translated glossary term references#14357
Open
m-aciek wants to merge 7 commits intosphinx-doc:masterfrom
Open
Fix false positive i18n warnings for translated glossary term references#14357m-aciek wants to merge 7 commits intosphinx-doc:masterfrom
m-aciek wants to merge 7 commits intosphinx-doc:masterfrom
Conversation
- Modified update_refnamed_references() to only check reference count, not display text - This allows translators to change display text while keeping the same target - Added comprehensive test case covering cases 2-4 from issue sphinx-doc#14162 - Case 5 (glossary terms) already works correctly with explicit target syntax Co-authored-by: m-aciek <9288014+m-aciek@users.noreply.github.com>
- Clarified comment about display text affecting rawsource comparison - Simplified case 4 test to better demonstrate the fixup mechanism Co-authored-by: m-aciek <9288014+m-aciek@users.noreply.github.com>
…ary terms - Modified update_pending_xrefs() to only check count, not reftarget content - This allows translators to translate glossary term names when glossary is also translated - Handles newlines from PO file wrapping without false warnings - Added comprehensive test cases covering all scenarios from the issue - All 43 intl tests passing Agent-Logs-Url: https://github.com/m-aciek/sphinx/sessions/5401f5a5-02a7-43cc-9525-a8039f9fa3f7 Co-authored-by: m-aciek <9288014+m-aciek@users.noreply.github.com>
… docstring Agent-Logs-Url: https://github.com/m-aciek/sphinx/sessions/5401f5a5-02a7-43cc-9525-a8039f9fa3f7 Co-authored-by: m-aciek <9288014+m-aciek@users.noreply.github.com>
Contributor
Author
|
|
This file contains hidden or 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
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.
Purpose
:term:) were generating "inconsistent term references" warnings when translators legitimately translated glossary term names or when PO files wrapped lines mid-reference.Cases from #14162:
Changes
Modified
update_pending_xrefs()to validate cross-reference count only, not contentcompare_references()call comparing byreftargetModified
update_refnamed_references()- same pattern applied to term referencesTest coverage for newline handling and translated term names
This unblocks Python documentation translations where glossaries are translated alongside the content.
Note that changes were coded with use of Copilot, I performed a review and tests.
Python docs warnings before and after those changes (build warnings column).
References
termroles #14162