better error msg

This commit is contained in:
2016-10-23 23:18:06 +02:00
parent 9a912376b9
commit 44dfd21ff6
3 changed files with 11 additions and 12 deletions

View File

@ -517,7 +517,7 @@ class Settings(object):
return PropertiesOptionError(_("cannot access to {0} {1} "
"because has {2} {3}"
"").format(opt_type,
opt_or_descr._name,
opt_or_descr.impl_get_display_name(),
prop_msg,
display_list(props)), props,
self, datas, opt_type)
@ -689,10 +689,10 @@ class Settings(object):
calc_properties.setdefault(action, []).extend(msg)
else:
if not inverse:
msg = _("the value of {0} is {1}")
msg = _('the value of "{0}" is {1}')
else:
msg = _("the value of {0} is not {1}")
calc_properties.setdefault(action, []).append(msg.format(reqpath, display_list(expected, 'or')))
msg = _('the value of "{0}" is not {1}')
calc_properties.setdefault(action, []).append(msg.format(option.impl_get_display_name(), display_list(expected, 'or')))
else:
calc_properties.add(action)
break