[3.13] gh-126609: Allow translating the `availability` directive (GH-129549) (#129584)

gh-126609: Allow translating the ``availability`` directive (GH-129549)
(cherry picked from commit 0612a89ffc)

Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2025-02-03 09:28:11 +01:00 committed by GitHub
parent b13b76f98a
commit 9862800a71
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View file

@ -6,6 +6,7 @@
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"]),