update translation

This commit is contained in:
2013-07-18 21:25:07 +02:00
parent 7c44f4ade6
commit e9ffd96a28
5 changed files with 150 additions and 127 deletions

View File

@ -530,7 +530,7 @@ class MetaConfig(CommonConfig):
for child in children:
if not isinstance(child, CommonConfig):
raise ValueError(_("metaconfig's children must be config, not {0}"
"".format(type(child))))
"").format(type(child)))
if self._impl_descr is None:
self._impl_descr = child.cfgimpl_get_description()
elif not self._impl_descr is child.cfgimpl_get_description():

View File

@ -671,8 +671,10 @@ class DomainnameOption(Option):
raise ValueError(_("invalid value for {0}, must have dot"
"").format(self._name))
if len(value) > length:
raise ValueError(_("invalid value's length for {0} (max {1})"
"").format(self._name, length))
raise ValueError(_("invalid domainname's length for {0} (max {1})").format(self._name, length))
if len(value) == 1:
raise ValueError(_("invalid domainname's length for {0} (min 2)"
"").format(self._name))
regexp = r'^[a-z]([a-z\d{0}-])*[a-z\d]$'.format(extrachar)
if re.match(regexp, value) is None:
raise ValueError(_('invalid domainname'))

View File

@ -289,13 +289,15 @@ class Setting(object):
properties.remove('frozen')
if properties != frozenset():
comment = (opt_or_descr._name, str(list(properties)))
if 'frozen' in properties:
raise_text = 'cannot change the value for option {0} this option is frozen'
raise PropertiesOptionError(_('cannot change the value for '
'option {0} this option is frozen'
'').format(comment))
else:
raise_text = "trying to access to an option named: {0} with properties {1}"
raise PropertiesOptionError(_(raise_text).format(opt_or_descr._name,
str(list(properties))),
list(properties))
raise PropertiesOptionError(_("trying to access to an option "
"named: {0} with properties {1}"
"").format(comment, list(properties)))
def _get_permissive(self, opt=None):
return self._permissives.get(opt, frozenset())