How can ActiveRecord full error messages be translated?
For example, I want to show them in spanish.
I create this file config/locales/es.yml:
es:
errors:
attributes:
email:
blank: "El email no puede estar en blanco"
But when submitting a form with a presence: true, validation is including the attribute always at the beginning of the message:
Email El email no puede estar en blanco
The first “Email” word is not necessary. How can I get rid of it?
Ok, after much reading and re-reading the official i18n guide, I discovered in the section 5.2.2 this:
So, the solution is to configure the format, like this: