mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
gh-126609: Allow translating the `availability
` directive (#129549)
This commit is contained in:
parent
4e38eeafe2
commit
0612a89ffc
2 changed files with 6 additions and 1 deletions
|
@ -6,6 +6,7 @@ from typing import TYPE_CHECKING
|
|||
|
||||
from docutils import nodes
|
||||
from sphinx import addnodes
|
||||
from sphinx.locale import _ as sphinx_gettext
|
||||
from sphinx.util import logging
|
||||
from sphinx.util.docutils import SphinxDirective
|
||||
|
||||
|
@ -55,7 +56,7 @@ class Availability(SphinxDirective):
|
|||
final_argument_whitespace = True
|
||||
|
||||
def run(self) -> list[nodes.container]:
|
||||
title = "Availability"
|
||||
title = sphinx_gettext("Availability")
|
||||
refnode = addnodes.pending_xref(
|
||||
title,
|
||||
nodes.inline(title, title, classes=["xref", "std", "std-ref"]),
|
||||
|
|
|
@ -7,6 +7,10 @@ In extensions/pyspecific.py:
|
|||
{% trans %}Deprecated since version {deprecated}, will be removed in version {removed}{% endtrans %}
|
||||
{% trans %}Deprecated since version {deprecated}, removed in version {removed}{% endtrans %}
|
||||
|
||||
In extensions/availability.py:
|
||||
|
||||
{% trans %}Availability{% endtrans %}
|
||||
|
||||
In extensions/c_annotations.py:
|
||||
|
||||
{% trans %}Part of the{% endtrans %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue