From: DjMorgul Date: Thu, 5 May 2022 05:32:49 +0000 (+0200) Subject: Allow translating argument error messages (#17169) X-Git-Tag: v3.11.0b1~47 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=b885b8f4be9c74ef1ce7923dbf055c31e7f47735;p=thirdparty%2FPython%2Fcpython.git Allow translating argument error messages (#17169) --- diff --git a/Lib/argparse.py b/Lib/argparse.py index 8d1a00ad2207..1c5520c4b41b 100644 --- a/Lib/argparse.py +++ b/Lib/argparse.py @@ -766,7 +766,7 @@ class ArgumentError(Exception): if self.argument_name is None: format = '%(message)s' else: - format = 'argument %(argument_name)s: %(message)s' + format = _('argument %(argument_name)s: %(message)s') return format % dict(message=self.message, argument_name=self.argument_name)