https://github.com/python/cpython/commit/4210a7d02ba6ea02c0baa8737fdcd5086a496618
commit: 4210a7d02ba6ea02c0baa8737fdcd5086a496618
branch: 3.13
author: Miss Islington (bot) <[email protected]>
committer: Yhg1s <[email protected]>
date: 2024-09-02T12:48:20+02:00
summary:

[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 95f5c89b545beaafad73f05a695742da3e90bc41)

Co-authored-by: Adam Turner <[email protected]>

files:
M Doc/tools/extensions/audit_events.py

diff --git a/Doc/tools/extensions/audit_events.py 
b/Doc/tools/extensions/audit_events.py
index d0f08522d21ea2..23d82c0f4414bf 100644
--- a/Doc/tools/extensions/audit_events.py
+++ b/Doc/tools/extensions/audit_events.py
@@ -149,6 +149,7 @@ 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))
@@ -156,6 +157,7 @@ def run(self) -> list[nodes.paragraph]:
                 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

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to