Point every write action's error_handler at AshGettext.ErrorTranslation.ErrorHandler.
Doing this at compile time is what makes translation a property of the resource
rather than a thing each action has to remember. Adding an action to a resource
that uses AshGettext.Resource cannot forget to translate.
Two deliberate limits:
- Write actions only. Ash 3.29 exposes
error_handleroncreate,updateanddestroy— the changeset-based actions. Read and generic actions have no equivalent hook, so their errors are not translated here. - An action that already declares an
error_handleris left alone. The app asked for that handler explicitly; silently replacing it would be a worse surprise than an untranslated message.
Summary
Functions
Callback implementation for Spark.Dsl.Transformer.after_compile?/0.
Callback implementation for Spark.Dsl.Transformer.before?/1.
Functions
Callback implementation for Spark.Dsl.Transformer.after_compile?/0.
Callback implementation for Spark.Dsl.Transformer.before?/1.