Skip to content

Commit 95f5c89

Browse files
authored
GH-121970: Fix gettext for audit events (#122651)
1 parent 1573d90 commit 95f5c89

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Doc/tools/extensions/audit_events.py

+2
Original file line numberDiff line numberDiff line change
@@ -149,13 +149,15 @@ def run(self) -> list[nodes.paragraph]:
149149
node = nodes.paragraph("", classes=["audit-hook"], ids=ids)
150150
self.set_source_info(node)
151151
if self.content:
152+
node.rawsource = '\n'.join(self.content) # for gettext
152153
self.state.nested_parse(self.content, self.content_offset, node)
153154
else:
154155
num_args = min(2, len(args))
155156
text = self._label[num_args].format(
156157
name=f"``{name}``",
157158
args=", ".join(f"``{a}``" for a in args),
158159
)
160+
node.rawsource = text # for gettext
159161
parsed, messages = self.state.inline_text(text, self.lineno)
160162
node += parsed
161163
node += messages

0 commit comments

Comments
 (0)