Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

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

#1466
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.)

Reported by jana4u · November 25th, 2008 @ 09:02 AM

State: resolved
Milestone: 2.x
Assigned to: DHH DHH
Importance: none

Activity

  1. jana4u
    jana4u

    summary:

    with initalizer only it works fine, but I would like to remove it and use environment.rb where same i18n configuration options were added - but it doesn't work

    November 25th, 2008 @ 09:35 AM

  2. josh
    josh
    • Assigned user set to DHH

    December 15th, 2008 @ 09:30 PM

  3. jana4u
    jana4u

    It looks like that problem was in localized_dates plugin - after removing it everything seems ok.

    I think you can close this ticket.

    December 15th, 2008 @ 10:39 PM

  4. DHH
    DHH
    • State changed from new to resolved

    December 15th, 2008 @ 11:18 PM