I am trying to customise my errors messages in Devise for the password renewal when the user has forgotten their password. I did all translations and customisations right for registrations
but for passwords
I am a bit struggling.
In my passwords/new view I have the usual helper call :
<%= devise_error_messages! %>
But the translation that is fetched from the locale file is this one :
translation missing: fr.errors.messages.not_saved
This is a bit strange as this message is the same used for registrations
and is set with "Your account has not been saved" at the moment in my app. But in this case this is not about saving an account but rather confirming a renewal email has been sent.
(of course, on top of this, I have an error message related to the email field which shows correctly)
Is it tweakable ?
EDIT EDIT
Ok it seems it is coming from this bit of code from Devise error helper :
sentence = I18n.t("errors.messages.not_saved",
:count => resource.errors.count,
:resource => resource.class.model_name.human.downcase)
https://github.com/plataformatec/devise/blob/master/app/helpers/devise_helper.rb
Any idea I could tweak this bit of code so that it is different for each of Devise subcontrollers inside the Devise namespace ?