]> git.openstreetmap.org Git - rails.git/commitdiff
Force an I18n reload to work around ordering problem
authorTom Hughes <tom@compton.nu>
Wed, 19 Oct 2011 20:59:03 +0000 (21:59 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 14 Nov 2011 09:42:57 +0000 (09:42 +0000)
Unfortunately the rails-i18n-updater plugin adds the rails translations
to the load path after rails has already loaded the translations, so we
have to force a reload to get the translated versions.

config/initializers/i18n.rb

index 2561c07f21149ba5526e1db94c92e8194f9e0268..7b5db5aabf1d2c0babbc914924bfa0813a6fe408 100644 (file)
@@ -40,3 +40,7 @@ I18n::Backend::Simple.send(:include, I18n::Backend::PluralizationFallback)
 I18n.load_path << "#{Rails.root}/config/pluralizers.rb"
 
 I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks)
+
+Rails.configuration.after_initialize do
+  I18n.reload!
+end