Change :default_messageto:your_model_name
As you can see in the source , the method error_notificationuses translate_error_notificationto get the translation from the YAML file.
def translate_error_notification
lookups = []
lookups << :"#{object_name}"
lookups << :default_message
lookups << "Please review the problems below:"
I18n.t(lookups.shift, scope: :"simple_form.error_notification", default: lookups)
end
For the usermodel lookupscontains:
lookups == [:user, :default_messge, "Please review the problems below:]
The translation may differ for each object, so this transaction is called:
en:
simple_form:
error_notification:
user: "A custom message:"
Vote if that helps;)
source
share