Reputation: 11
I'm trying to rename the authlogic error messages in a Rails 3 app.
The general format I found out working in Rails 3:
de:
errors:
template:
header:
one: "Konnte {{model}} nicht speichern: ein Fehler."
other: "Konnte {{model}} nicht speichern: {{count}} Fehler."
body: "Bitte überprüfen Sie die folgenden Felder:
But I want to change this for the authlogic user session model (and only for this one) because when the Login fails, the message "Could not save user session" does not make very much sense.
How can I do that?
Upvotes: 0
Views: 2019
Reputation: 31
I had the same problem and I fixed it this way:
Put in your view (like: _form.html.erb)
<div id="error_explanation">
<h2><%= I18n.t('activerecord.errors.template.header', :count => @user.errors.size, :model => @user.class) %></h2>
<h4><%= I18n.t('activerecord.errors.template.body', :count => @user.errors.size) %></h4>
It should work fine!
Upvotes: 3