Skip to content

Commit 4210a7d

Browse files
[3.13] GH-121970: Fix gettext for audit events (GH-122651) (#122653)
GH-121970: Fix ``gettext`` for audit events (GH-122651) (cherry picked from commit 95f5c89) Co-authored-by: Adam Turner <[email protected]>
1 parent 57ba3b0 commit 4210a7d

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)