Forum: Rails I18n "translation missing" errors in production, not in development

Posted by Meike (Guest)
on 2010-06-11 11:42
(Received via mailing list)
Hello,

I've got a similar problem to this one:
http://groups.google.com/group/rails-i18n/browse_t...

Tranlations are working fine in development mode, but in production
mode translations are missing in a certain case.

Adding translated custom error messages to validations is successful
in development mode.

  validates_acceptance_of :terms, :message => I18n.t("errors.terms")

  => "Bedingungen müssen akzeptiert werden"

But in production mode it says:

  =>  "translation missing: en, errors, terms"

It's no surprise that this translation is missing since my application
is in german, russian and polish only. I've got no idea why it's
suddenly trying to find an english translation.

All other translation are working as expected in development and
production mode. Like this one for example:

  errors[:base] << I18n.t("errors.address")


I searched for a setting of the I18n.load_path because in the thread
mentioned above the solution was to add a I18n.reload! after setting
the load_path. I found this line in my plugin called dynamic_form:

 I18n.load_path << File.expand_path("../../locale/en.yml", __FILE__)

But reloading I18n or deleting this line has no effect whatsoever.


My application is running on Rails 3.0.0 beta3.

Has anyone any ideas?

Meike
Please log in before posting. Registration is free and takes only a minute.
Existing account (Switch to SSL-encrypted connection)
NEW: Do you have a Google/GoogleMail or Yahoo account? No registration required!
Log in with Google account | Log in with Yahoo account
No account? Register here.