> For example, if the new user fails to enter a matching password - password
> confirmation, or makes any other entry error (no password, no login, etc),
> the message is like the following:
>
> 1 error prohibited this user from being saved
>
> There were problems with the following fields
>
> {{attribute}} {{message}}Aha. Probably a Rails gem version issue - try this: http://www.taylorbrooks.org/error-messages-in-rails-attribute-message/ > The {{attribute}}{{message}} isn't translated. And yes I know to use %{} and > not {{}} in en.yml. Clearly there is something I am doing wrong but I've > exhausted my ideas. Last I tried was as follows, which is an excerpt from > by_password.rb: > validates_presence_of :password, > :message=>I18n.t(:passwordpresent), :if => :password_required? Not relevant anymore, but for good measure: if you use I18n.t in a class context like that, IIRC it will always use the default locale in production (since the class isn't reloaded for every request). Instead, you just specify the symbol (:message => :passwordpresent) and make sure to put the translation key in the expected place (somewhere under activerecord.errors I believe). -- You received this message because you are subscribed to the Google Groups "rails-i18n" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rails-i18n?hl=en.
