In both apps there is `config.i18n.fallbacks = true` in `application.rb`:
Rails.version # "4.2.4"
Globalize.fallbacks # [:de]
I18n.fallbacks # { :de => [:de] }
Rails.application.config.i18n.fallbacks # nil
And:
Rails.version # "5.0.0.1"
Globalize # NameError: uninitialized constant Globalize
I18n.fallbacks # {}
Rails.application.config.i18n.fallbacks # nil
Unlike in v5.0.0.1, in v4.2.4 there is `gem "globalize"` in Gemfile.
It's been added there with following commit message:
Upgrade to Rails 2.3.8.
In the process, globalize2 is now updated and runs from a gem, not a plug in.
Unfortunately [rails configuration doc for v2.3.8](http://guides.rubyonrails.org/v2.3.8/configuring.html) doesn't say a word on it.
In v5.0.0.1 this gem was never there (checked with `git log -G'globalize' -- Gemfile`).
In v4.2.4 the setting was added explicitely with the following context:
+ # https://github.com/svenfuchs/globalize3
+ config.i18n.fallbacks = true
[Which](https://github.com/globalize/globalize#i18n-fallbacks-for-empty-translations) makes sense as long as you have the globalize gem installed.
In v5.0.0.1 the setting was added by `rails new` on rails 3.1.0.rc1, so unless the gem has been re-implemented into rails, the setting has been a noop from the very beginning. Am I missing something?
In both cases, should I remove the setting from the `application.rb`, I18n throws this:
# I18n.fallbacks # NoMethodError: undefined method `fallbacks' for I18n:Module
I don't call the `fallbacks` anywhere in the apps other than setting it in the config files.
I'd like to find out:
1. Is in v5.0.01 the `fallbacks` a dead setting, so I can safely remove it?
2. Why `Rails.application.config.i18n.fallbacks` returns `nil`, despite being set in the configs?
I searched through docs (incl. changelogs) of Rails, I18n, and Globalize, but didn't find anything interesting.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c221a2b5-ba3d-4c5c-ac65-f82e3e28c2b9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment