From 7220a34baf8b8e8789e9a14dfe5c71665429fd40 Mon Sep 17 00:00:00 2001 From: DjMorgul Date: Fri, 15 Nov 2019 19:53:46 +0800 Subject: [PATCH] Allow translating argument error messages --- Lib/argparse.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/argparse.py b/Lib/argparse.py index 94e1b8ad0ed..c529e8ad361 100644 --- a/Lib/argparse.py +++ b/Lib/argparse.py @@ -746,7 +746,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)