Skip to content

Commit

Permalink
GH-121970: Fix gettext for audit events (#122651)
Browse files Browse the repository at this point in the history
  • Loading branch information
AA-Turner authored Aug 3, 2024
1 parent 1573d90 commit 95f5c89
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Doc/tools/extensions/audit_events.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,15 @@ def run(self) -> list[nodes.paragraph]:
node = nodes.paragraph("", classes=["audit-hook"], ids=ids)
self.set_source_info(node)
if self.content:
node.rawsource = '\n'.join(self.content) # for gettext
self.state.nested_parse(self.content, self.content_offset, node)
else:
num_args = min(2, len(args))
text = self._label[num_args].format(
name=f"``{name}``",
args=", ".join(f"``{a}``" for a in args),
)
node.rawsource = text # for gettext
parsed, messages = self.state.inline_text(text, self.lineno)
node += parsed
node += messages
Expand Down

0 comments on commit 95f5c89

Please sign in to comment.