aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSeb Bacon <seb.bacon@gmail.com>2011-07-12 16:30:08 +0100
committerSeb Bacon <seb.bacon@gmail.com>2011-07-12 16:30:08 +0100
commitf49f769b03863a0ba4b98e55c021aca3dcf7275f (patch)
tree9f7e3d4db37c71fe666da301cf2cb47267c1ec0c
parentc2119758f2ded16c75641f08c8e3e1aad56b4383 (diff)
for reasons that are as yet unclear, I18n.default_locale doesn't always delegate to FastGettext.default_available_locales; so we set it explicitly here, too
-rw-r--r--config/environment.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/config/environment.rb b/config/environment.rb
index 9ccc39f89..acf2a1964 100644
--- a/config/environment.rb
+++ b/config/environment.rb
@@ -122,10 +122,10 @@ if ENV["RAILS_ENV"] == "test"
FastGettext.default_available_locales = ["en", "es"]
I18n.default_locale = :en
else
- available_locales = MySociety::Config.get('AVAILABLE_LOCALES', 'en es')
- default_locale = MySociety::Config.get('DEFAULT_LOCALE', 'en')
- FastGettext.default_available_locales = available_locales.split(/ /)
- I18n.default_locale = default_locale
+ available_locales = MySociety::Config.get('AVAILABLE_LOCALES', 'en es').split(/ /)
+ FastGettext.default_available_locales = available_locales
+ I18n.available_locales = available_locales
+ I18n.default_locale = MySociety::Config.get('DEFAULT_LOCALE', 'en')
end
# Load monkey patches and other things from lib/