https://github.com/python/cpython/commit/3185a1ba117631aaf6886f87892045f89cebddbe
commit: 3185a1ba117631aaf6886f87892045f89cebddbe
branch: 3.12
author: Miss Islington (bot) <[email protected]>
committer: serhiy-storchaka <[email protected]>
date: 2024-02-26T23:09:57Z
summary:

[3.12] bpo-44865: Fix yet one missing translations in argparse (GH-27668) 
(GH-115974)

(cherry picked from commit 6087315926fb185847a52559af063cc7d337d978)

Co-authored-by: Jérémie Detrey <[email protected]>

files:
A Misc/NEWS.d/next/Library/2021-08-24-20-47-37.bpo-44865.c3BhZS.rst
M Lib/argparse.py

diff --git a/Lib/argparse.py b/Lib/argparse.py
index f23e2a4611b27a..120cb6c845897f 100644
--- a/Lib/argparse.py
+++ b/Lib/argparse.py
@@ -225,7 +225,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 00000000000000..ecdb26cdd6edd6
--- /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`.

_______________________________________________
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