mirror of
https://github.com/ejwa/gitinspector.git
synced 2024-11-16 00:28:25 +01:00
Improved localization in the optval module.
This commit is contained in:
parent
3b82acdfa1
commit
ccd995a02b
1 changed files with 4 additions and 4 deletions
|
@ -35,7 +35,7 @@ def __handle_boolean_argument__(option, __opt_str__, value, parser, *__args__, *
|
|||
elif value.lower() == "true" or value.lower() == "t" or value == "1":
|
||||
value = True
|
||||
else:
|
||||
raise InvalidOptionArgument("The given option argument is not a valid boolean.")
|
||||
raise InvalidOptionArgument(_("The given option argument is not a valid boolean."))
|
||||
|
||||
if "multidest" in kwargs:
|
||||
for dest in kwargs["multidest"]:
|
||||
|
@ -72,8 +72,8 @@ class OptionParser(optparse.OptionParser):
|
|||
else:
|
||||
variable = msg.split()[-1]
|
||||
if variable[1] == "-":
|
||||
raise OptionParsingError("unrecognized option '{0}'".format(variable))
|
||||
raise OptionParsingError(_("unrecognized option '{0}'").format(variable))
|
||||
else:
|
||||
raise OptionParsingError("invalid option -- '{0}'".format(variable[1:]))
|
||||
raise OptionParsingError(_("invalid option -- '{0}'").format(variable[1:]))
|
||||
|
||||
raise OptionParsingError("invalid command-line options")
|
||||
raise OptionParsingError(_("invalid command-line options"))
|
||||
|
|
Loading…
Reference in a new issue