]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-44865: Fix yet one missing translations in argparse (GH-27668)
authorJérémie Detrey <jdetrey@users.noreply.github.com>
Mon, 26 Feb 2024 22:05:01 +0000 (23:05 +0100)
committerGitHub <noreply@github.com>
Mon, 26 Feb 2024 22:05:01 +0000 (22:05 +0000)
Lib/argparse.py
Misc/NEWS.d/next/Library/2021-08-24-20-47-37.bpo-44865.c3BhZS.rst [new file with mode: 0644]

index c16f538ae1535a11829d076b82412e03a92f4f8d..4200dd5e334ad5ce50f0330feb986fee8af505cd 100644 (file)
@@ -223,7 +223,8 @@ class HelpFormatter(object):
             # 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 (file)
index 0000000..ecdb26c
--- /dev/null
@@ -0,0 +1 @@
+Add missing call to localization function in :mod:`argparse`.