wow, how much time wasted figuring out this. your fix didn't work for me, but you pointed me in the right direction. a fix in the link you posted did the job:
in environments/production.rb: config.i18n.locale = :es That's a bug in rails-core: "...I18n.locale is called before the config.i18n.default_locale is propagated to the I18n class..." which isn't fixed yet. thanks Atastor :) On Wed, Feb 23, 2011 at 8:27 AM, Atastor <[email protected]> wrote: > Hi > > I thought Ill write this here, as it might be of general interest. > > I had some trouble localizing my rails3 application based on Volker > Hochsteins AS branch. Strange enough the trouble only showed when in > production mode. Volker pointed me to a known bug in rails3 and its > workaround: > > > http://groups.google.com/group/rubyonrails-core/browse_thread/thread/1fe3e88f9fe73177/ > > Alas this wasnt enough for me, my app refused to start with message > > ../gems/i18n-0.5.0/lib/i18n/backend/base.rb:37:in `translate': > translation missing: de.date (I18n::MissingTranslationData) > from > /usr/local/rvm/gems/ruby-1.9.2-p136/gems/i18n-0.5.0/lib/i18n.rb: > 155:in `translate' > from > /usr/local/rvm/gems/ruby-1.9.2-p136/gems/i18n-0.5.0/lib/i18n.rb: > 164:in `translate!' > from /var/rails/RLC2/releases/20110223101935/vendor/plugins/ > active_scaffold/lib/active_scaffold/bridges/date_picker/lib/ > datepicker_bridge.rb:71:in `date_options' > from /var/rails/RLC2/releases/20110223101935/vendor/plugins/ > active_scaffold/lib/active_scaffold/bridges/date_picker/lib/ > datepicker_bridge.rb:54:in `localization' > ... > > Obviously it couldnt find my german locale, although it was correctly > in place, formatted and working in production console mode. After > quite some time I figured out, that you not only had to set > > I18n.default_locale = :de > > but > > I18n.load_path += Dir[Rails.root.join('config', 'locales', '*. > {rb,yml}').to_s] > > as well. > > Regards > Michael > > -- > You received this message because you are subscribed to the Google Groups > "ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en. > > -- You received this message because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en.
