]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.12] bpo-44865: Fix yet one missing translations in argparse (GH-27668) (GH-115974)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 26 Feb 2024 23:09:57 +0000 (00:09 +0100)
committerGitHub <noreply@github.com>
Mon, 26 Feb 2024 23:09:57 +0000 (23:09 +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 f23e2a4611b27a43dc254b1ac61252c853bbeb77..120cb6c845897f54973cd57e8f61e38ce646beac 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`.