mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2026-09-03 20:52:56 -05:00
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:
committed by
Martin Kosek
parent
4f03aed5e6
commit
a95eaeac8e
@@ -208,7 +208,8 @@ class ra(rabase.rabase):
|
||||
serial = x509.get_serial_number(cert)
|
||||
except NSPRError, e:
|
||||
self.log.error('Unable to decode certificate in entry: %s' % str(e))
|
||||
raise errors.CertificateOperationError(error='Unable to decode certificate in entry: %s' % str(e))
|
||||
raise errors.CertificateOperationError(
|
||||
error=_('Unable to decode certificate in entry: %s') % str(e))
|
||||
|
||||
# To make it look like dogtag return just the base64 data.
|
||||
cert = cert.replace('\n','')
|
||||
|
||||
Reference in New Issue
Block a user