summaryrefslogtreecommitdiffstats
path: root/Lib/argparse.py
diff options
context:
space:
mode:
authorDjMorgul <jmfo1982@gmail.com>2022-05-05 05:32:49 (GMT)
committerGitHub <noreply@github.com>2022-05-05 05:32:49 (GMT)
commitb885b8f4be9c74ef1ce7923dbf055c31e7f47735 (patch)
tree5dbb834cacceefadb343de1551b6c6e3c92d8686 /Lib/argparse.py
parenta918589578a2a807396c5f6afab7b59ab692c642 (diff)
downloadcpython-b885b8f4be9c74ef1ce7923dbf055c31e7f47735.zip
cpython-b885b8f4be9c74ef1ce7923dbf055c31e7f47735.tar.gz
cpython-b885b8f4be9c74ef1ce7923dbf055c31e7f47735.tar.bz2
Allow translating argument error messages (#17169)
Diffstat (limited to 'Lib/argparse.py')
-rw-r--r--Lib/argparse.py2
1 files changed, 1 insertions, 1 deletions
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)