Allow translating argument error messages

This commit is contained in:
DjMorgul 2019-11-15 19:53:46 +08:00 committed by GitHub
parent e8acc865a3
commit 7220a34baf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -746,7 +746,7 @@ class ArgumentError(Exception):
if self.argument_name is None: if self.argument_name is None:
format = '%(message)s' format = '%(message)s'
else: else:
format = 'argument %(argument_name)s: %(message)s' format = _('argument %(argument_name)s: %(message)s')
return format % dict(message=self.message, return format % dict(message=self.message,
argument_name=self.argument_name) argument_name=self.argument_name)