Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Allow translating the availability directive
  • Loading branch information
AA-Turner committed Feb 1, 2025
commit 8da7fdaacf34c1248169e894f550374f3377728e
3 changes: 2 additions & 1 deletion Doc/tools/extensions/availability.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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"]),
Expand Down
4 changes: 4 additions & 0 deletions Doc/tools/templates/dummy.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
{% 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.py:
Comment thread
AA-Turner marked this conversation as resolved.
Outdated

{% trans %}Availability{% endtrans %}

In extensions/c_annotations.py:

{% trans %}Part of the{% endtrans %}
Expand Down