-
-
Notifications
You must be signed in to change notification settings - Fork 31.8k
GH-121970: Extract issue_role
into a new extension
#130615
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
Conversation
issue_role
into a new extension
return [prb], [msg] | ||
|
||
issue_url = self.ISSUE_URI.format(issue) | ||
refnode = nodes.reference(issue, f"bpo-{issue}", refuri=issue_url) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here we're passing something like 12345
and bpo-12345
as the first two arguments.
Before we were passing something like bpo-12345
and bpo-12345
for both.
I see the second one is used in the refnode:
<reference refuri="https://bugs.python.org/issue?@action=redirect&bpo=13936">bpo-13936</reference>
How is the first one used?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's the docutils rawsource, it should reflect what was actually written in the document.
Sphinx uses this for translation, I don't think these nodes are translatable but I'll double check.
A
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See e.g. https://github.com/python/python-docs-fr/blob/3.13/whatsnew/3.13.po#L394-L399, the whole role is included in the translation string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So should it match 12345
or bpo-12345
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Unresolving so the question isn't hidden :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The text of what is actually written in the document, so "14159".
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
Thanks @AA-Turner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13. |
GH-130651 is a backport of this pull request to the 3.13 branch. |
GH-130652 is a backport of this pull request to the 3.12 branch. |
…130615) Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
pyspecific
#121970📚 Documentation preview 📚: https://cpython-previews--130615.org.readthedocs.build/