Internationalization for public errors

Currently, we throw many public exceptions without proper i18n.
Wrap natural-language error messages in _() so they can be translated.

In the service plugin, raise NotFound errors using handle_not_found helper
so the error message contains the offending service.

Use ScriptError instead of NotFoundError in bindinstance install.

https://fedorahosted.org/freeipa/ticket/1953
This commit is contained in:
Petr Viktorin
2012-09-03 18:16:12 +02:00
committed by Martin Kosek
parent 4f03aed5e6
commit a95eaeac8e
30 changed files with 175 additions and 123 deletions
+1 -2
View File
@@ -2617,8 +2617,7 @@ class dnsrecord_del(LDAPUpdate):
attr_name = unicode(param.label or param.name)
except:
attr_name = attr
raise errors.AttrValueNotFound(attr=attr_name,
value=val)
raise errors.AttrValueNotFound(attr=attr_name, value=val)
entry_attrs[attr] = list(set(old_entry[attr]))
del_all = False