This project is archived and is in readonly mode.

#1466 ✓resolved
jana4u

Error during failsafe response: translation missing: en-US, time, formats

Reported by jana4u | November 25th, 2008 @ 09:02 AM | in 2.x

Error during failsafe response: translation missing: en-US, time, formats
(originally translation missing: en-US, time, formats)
I think this is problem because of renaming "en-US" to "en". I have app with only :cz locale, it's loaded properly but app stopped working completely after setting i18n configuration in environment.rb after updating to 2.2.2 (from 2.2.1). It works only with initializer which I used before i18n config options were added to environment.rb. I have set in environment.rb:
  # The internationalization framework can be changed to have another default locale (standard is :en) or more load paths.
  # All files from config/locales/*.rb,yml are added automatically.
  # config.i18n.load_path << Dir[File.join(RAILS_ROOT, 'my', 'locales', '*.{rb,yml}')]
  config.i18n.default_locale = :cz

You can see from [localized_dates] logging feature that :cz localization was loaded properly, but still it doesn't work - see error on bottom:

=> Booting Mongrel (use 'script/server webrick' to force WEBrick)
=> Rails 2.2.2 application starting on http://0.0.0.0:3007
=> Call with -d to detach
=> Ctrl-C to shutdown server
** Starting Mongrel listening at 0.0.0.0:3007
** Starting Rails with development environment...
** [localized_dates] localized_dates plugin loaded.
** [localized_dates] loading file P:/project/config/locales/cz.rb
** [localized_dates] locales loaded from config/locales.
** Rails loaded.
** Loading any Rails specific GemPlugins
** Signals ready.  INT => stop (no restart).
** Mongrel 1.1.5 available at 0.0.0.0:3007
** Use CTRL-C to stop.
Error during failsafe response: translation missing: en-US, time, formats
(originally translation missing: en-US, time, formats)

My initializer i18n.rb:

I18n.default_locale = 'cz'
I18n.locale = I18n.default_locale
I18n.load_path << "#{RAILS_ROOT}/config/locales/cz.rb"

With this initializer and no changes in environment.rb it works even in 2.2.2.

With first and last line (or all initializer lines) commented and setting i18n in environment.rb instead it doesn't work.

(If code is not well readable, you can get everything in attachment.)

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

People watching this ticket

Attachments

Pages