update translation
This commit is contained in:
parent
605163ab4a
commit
3d6696b26d
8 changed files with 1713 additions and 1362 deletions
|
@ -715,7 +715,7 @@ class Config(_CommonConfig):
|
|||
"""
|
||||
self._impl_meta = None
|
||||
if isinstance(descr, MasterSlaves):
|
||||
raise ConfigError(_('cannot set MasterSlaves object has root optiondescription'))
|
||||
raise ConfigError(_('cannot set masterslaves object has root optiondescription'))
|
||||
if force_settings is not None and force_values is not None:
|
||||
if isinstance(force_settings, tuple):
|
||||
self._impl_settings = Settings(self,
|
||||
|
|
|
@ -47,22 +47,22 @@ class MasterSlaves(OptionDescription):
|
|||
self._group_type = groups.master
|
||||
slaves = []
|
||||
if len(children) < 2:
|
||||
raise ValueError(_('a master and a slave and mandatory in masterslaves "{}"').format(name))
|
||||
raise ValueError(_('a master and a slave are mandatories in masterslaves "{}"').format(name))
|
||||
master = children[0]
|
||||
for idx, child in enumerate(children):
|
||||
if child.impl_is_symlinkoption(): # pragma: optional cover
|
||||
raise ValueError(_('master group "{0}" shall not have '
|
||||
raise ValueError(_('masterslaves "{0}" shall not have '
|
||||
"a symlinkoption").format(self.impl_get_display_name()))
|
||||
if not isinstance(child, Option): # pragma: optional cover
|
||||
raise ValueError(_('master group "{0}" shall not have '
|
||||
raise ValueError(_('masterslaves "{0}" shall not have '
|
||||
'a subgroup').format(self.impl_get_display_name()))
|
||||
if not child.impl_is_multi(): # pragma: optional cover
|
||||
raise ValueError(_('only multi option allowed in master group "{0}" but option '
|
||||
raise ValueError(_('only multi option allowed in masterslaves "{0}" but option '
|
||||
'"{1}" is not a multi').format(self.impl_get_display_name(),
|
||||
child.impl_get_display_name()))
|
||||
if idx != 0 and child.impl_getdefault() != []:
|
||||
raise ValueError(_('not allowed default value for option "{0}" '
|
||||
'in master/slave object "{1}"'
|
||||
'in masterslaves "{1}"'
|
||||
'').format(child.impl_get_display_name(),
|
||||
self.impl_get_display_name()))
|
||||
# no empty property for save
|
||||
|
|
|
@ -325,14 +325,14 @@ class OptionDescriptionWalk(CacheOptionDescription):
|
|||
config_bag)
|
||||
if child:
|
||||
return child
|
||||
raise AttributeError(_('unknown Option {0} '
|
||||
'in OptionDescription {1}'
|
||||
raise AttributeError(_('unknown option "{0}" '
|
||||
'in optiondescription "{1}"'
|
||||
'').format(name, self.impl_getname()))
|
||||
|
||||
def impl_get_opt_by_path(self,
|
||||
path):
|
||||
if getattr(self, '_cache_paths', None) is None:
|
||||
raise ConfigError(_('use impl_get_opt_by_path only with root OptionDescription'))
|
||||
raise ConfigError(_('use impl_get_opt_by_path only with root optiondescription'))
|
||||
if path not in self._cache_paths[1]:
|
||||
raise AttributeError(_('no option for path "{}"').format(path))
|
||||
return self._cache_paths[0][self._cache_paths[1].index(path)]
|
||||
|
|
|
@ -56,8 +56,8 @@ class SynDynOptionDescription(object):
|
|||
except ValueError:
|
||||
# when oname not in self._children
|
||||
pass
|
||||
raise AttributeError(_('unknown Option {0} '
|
||||
'in SynDynOptionDescription {1}'
|
||||
raise AttributeError(_('unknown option "{0}" '
|
||||
'in syndynoptiondescription "{1}"'
|
||||
'').format(name, self.impl_getname()))
|
||||
|
||||
def impl_getname(self):
|
||||
|
|
|
@ -584,7 +584,7 @@ class Settings(object):
|
|||
else:
|
||||
opt = config_bag.option
|
||||
if opt and opt.impl_is_symlinkoption():
|
||||
raise TypeError(_("can't assign property to the SymLinkOption \"{}\""
|
||||
raise TypeError(_("can't assign property to the symlinkoption \"{}\""
|
||||
"").format(opt.impl_get_display_name()))
|
||||
if 'force_default_on_freeze' in properties and \
|
||||
'frozen' not in properties and \
|
||||
|
@ -625,7 +625,7 @@ class Settings(object):
|
|||
if not isinstance(permissives, frozenset):
|
||||
raise TypeError(_('permissive must be a frozenset'))
|
||||
if opt and opt.impl_is_symlinkoption():
|
||||
raise TypeError(_("can't assign permissive to the SymLinkOption \"{}\""
|
||||
raise TypeError(_("can't assign permissive to the symlinkoption \"{}\""
|
||||
"").format(opt.impl_get_display_name()))
|
||||
forbidden_permissives = FORBIDDEN_SET_PERMISSIVES & permissives
|
||||
if forbidden_permissives:
|
||||
|
@ -647,7 +647,7 @@ class Settings(object):
|
|||
if self._getcontext().cfgimpl_get_meta() is not None:
|
||||
raise ConfigError(_('cannot change property with metaconfig'))
|
||||
if opt and opt.impl_is_symlinkoption():
|
||||
raise TypeError(_("can't reset properties to the SymLinkOption \"{}\""
|
||||
raise TypeError(_("can't reset properties to the symlinkoption \"{}\""
|
||||
"").format(opt.impl_get_display_name()))
|
||||
if all_properties and (path or opt):
|
||||
raise ValueError(_('opt and all_properties must not be set '
|
||||
|
|
|
@ -523,7 +523,7 @@ class Values(object):
|
|||
"""
|
||||
opt = config_bag.option
|
||||
if opt.impl_is_symlinkoption():
|
||||
raise ConfigError(_("can't set owner for the SymLinkOption \"{}\""
|
||||
raise ConfigError(_("can't set owner for the symlinkoption \"{}\""
|
||||
"").format(opt.impl_get_display_name()))
|
||||
if owner in forbidden_owners:
|
||||
raise ConfigError(_('set owner "{0}" is forbidden').format(str(owner)))
|
||||
|
|
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue