]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] bpo-44865: Fix yet one missing translations in argparse (GH-27668) (GH-115975)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 26 Feb 2024 23:14:32 +0000 (00:14 +0100)
committerGitHub <noreply@github.com>
Mon, 26 Feb 2024 23:14:32 +0000 (23:14 +0000)
(cherry picked from commit 6087315926fb185847a52559af063cc7d337d978)

Co-authored-by: Jérémie Detrey <jdetrey@users.noreply.github.com>
Lib/argparse.py
Misc/NEWS.d/next/Library/2021-08-24-20-47-37.bpo-44865.c3BhZS.rst [new file with mode: 0644]

index a6ff3122da531a63f24c1aa6a51b1c62c8ab59d0..2f5ecda9239eb5ba006b3b3c91ca636fc34108cd 100644 (file)
@@ -225,7 +225,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`.