From b885b8f4be9c74ef1ce7923dbf055c31e7f47735 Mon Sep 17 00:00:00 2001 From: DjMorgul Date: Thu, 5 May 2022 07:32:49 +0200 Subject: Allow translating argument error messages (#17169) --- Lib/argparse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/argparse.py b/Lib/argparse.py index 8d1a00a..1c5520c 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) -- cgit v0.12