|
Hi Hardy,
We have two use cases: First, a fairly standard use case: generic error handling a single page web app, written in AngularJS, only static resources and REST web services. When an validation error occurs, the constraint violations are serialized as a JSON blob, which is handled client side by angular directives to highlight fields in error and display some tooltips with the CV message. It matters here as all i18n is handled browser side. The workaround would be to use the interpolated message, but IMHO it's not very clean to handle part of the i18n server side. Translations are GUI stuff after all...
Next, a more exotic one: our product exposes a SOAP web service to be used by another of our products. Same principle here, constraint violations are serialized and may be displayed to user on the other product's GUI. The catch is that
-
the constraints applied to this WS input are user defined, which implies a heavy use of expression variables
-
several users of the other product may see the error message and we don't know their locale in advance (worst case: some errors end up in audit logs, which are localized). So using the interpolated message is not an option here.
Cheers, Nicolas
|