Синхронизация перевода

master3.3
Mike Hiretsky 11 years ago
parent 70fd1b4f6c
commit 8527513c73

@ -377,7 +377,8 @@ class Variable:
"""Check value for type"""
if "int" in self.type:
if value and not value.isdigit():
raise VariableError(_("Value of variable '{varname}' must be integer"
raise VariableError(
_("Value of variable '{varname}' must be integer"
).format(varname=self.label or self.name))
if "list" in self.type:
if not type(value) in (list,tuple):
@ -385,10 +386,10 @@ class Variable:
_("Value for variable '{varname}' may be '{vartype}' only").format(
varname=self.label or self.name,
vartype="list"))
error = _("Values for variable '{varname}' may be {vartype} only")
error = _("Values for variable '{varname}' may be '{vartype}' only")
else:
value = repeat(value,1)
error = _("Value for variable '{varname}' may be {vartype} only")
error = _("Value for variable '{varname}' may be '{vartype}' only")
if "string" in self.type:
value, valuecopy = tee(value,2)
for v in (x for x in valuecopy if not type(x) in (str,unicode)):
@ -1555,7 +1556,7 @@ class DataVars(SimpleDataVars):
_toUNICODE(val).lower() in _toUNICODE(x[1]).lower()),
choicedata)
if len(result) > 1:
raise VariableError(_("Ambigious choice:%s")%
raise VariableError(_("Ambiguous choice:%s")%
",".join(map(lambda x:'"%s"(%s)'%(x[1],x[0]),
result)))
elif result:

@ -110,7 +110,7 @@ class process:
self.cwd = kwarg.get("cwd",None)
self.command = getProgPath(command)
if not self.command:
raise FilesError(_("Program %s is not found")%
raise FilesError(_("Command not found '%s'")%
command)
self.command = [self.command] + list(params)
self.stdin = stdin

@ -242,8 +242,8 @@ class VariableClDispatchConf(Variable):
self.label = _("Method for updating config files")
def choice(self):
return [("usenew",_("Use new config files")),
("skip",_("Skip the config files update")),
return [("usenew",_("Use the new config files")),
("skip",_("Skip the update of config files")),
("dispatch",_("Manually update config files"))]
class VariableClWsdl(Variable):

Loading…
Cancel
Save