From 0200b655359ce935ba5bd2dcc8d3f19fec4d15db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9mie=20Detrey?= Date: Mon, 26 Feb 2024 23:05:01 +0100 Subject: [PATCH] bpo-44865: Fix yet one missing translations in argparse (GH-27668) --- Lib/argparse.py | 3 ++- .../next/Library/2021-08-24-20-47-37.bpo-44865.c3BhZS.rst | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Library/2021-08-24-20-47-37.bpo-44865.c3BhZS.rst diff --git a/Lib/argparse.py b/Lib/argparse.py index c16f538ae1535a1..4200dd5e334ad5c 100644 --- a/Lib/argparse.py +++ b/Lib/argparse.py @@ -223,7 +223,8 @@ def format_help(self): # add the heading if the section was non-empty if self.heading is not SUPPRESS and self.heading is not None: current_indent = self.formatter._current_indent - heading = '%*s%s:\n' % (current_indent, '', self.heading) + heading_text = _('%(heading)s:') % dict(heading=self.heading) + heading = '%*s%s\n' % (current_indent, '', heading_text) else: heading = '' diff --git a/Misc/NEWS.d/next/Library/2021-08-24-20-47-37.bpo-44865.c3BhZS.rst b/Misc/NEWS.d/next/Library/2021-08-24-20-47-37.bpo-44865.c3BhZS.rst new file mode 100644 index 000000000000000..ecdb26cdd6edd60 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2021-08-24-20-47-37.bpo-44865.c3BhZS.rst @@ -0,0 +1 @@ +Add missing call to localization function in :mod:`argparse`.