mirror of https://github.com/python/cpython
GH-121970: Fix ``gettext`` for audit events (#122651)
This commit is contained in:
parent
1573d90ce1
commit
95f5c89b54
|
@ -149,6 +149,7 @@ class AuditEvent(SphinxDirective):
|
|||
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))
|
||||
|
@ -156,6 +157,7 @@ class AuditEvent(SphinxDirective):
|
|||
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
|
||||
|
|
Loading…
Reference in New Issue