Rails 3 - Translation of Error header doen't work

I am preparing the upgrade of one RoR aplication that used Rails 2.3.8
and where all the translations worked fine. Now I discovered that it
is not the case any more. Everything seems to work fien except the
Error windows header where the interpolation is not recognized.
I’m using Rails 3.0.3, Ruby 1.9.2.
I’ve just created a simple application, downloaded the latest french
YML file from I18n github and added a simple validation:

class Client < ActiveRecord::Base
  validates :firstname, :lastname, :presence=> true
end

Then I modified the ‘application.rb’ file as follows:

config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.
{rb,yml}').to_s]
config.i18n.default_locale = :fr

Then I tried to save a Client by leaving the mandatory fields empty
and got:

"Impossible d'enregistrer ce %{model} : %{count} erreurs"

as the header of the Errors dialog window. As you see, the
interpolation was taken as it is instead of putting the Model name and
errors number. The rest of validation message was translated
correctly.
Any idea?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs