diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2011-07-13 08:49:59 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2011-07-13 08:49:59 +0100 |
commit | 552e6a0f759b84b1e32e391d5c6de5439f4c9ae6 (patch) | |
tree | 62aeb51211e64482db9849b39699b319415daca3 | |
parent | e1010f07cd1af6a8480c1610ff6dd04fe9bb2923 (diff) |
Explicitly set default locale when testing as well as in production
-rw-r--r-- | config/environment.rb | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/config/environment.rb b/config/environment.rb index acf2a1964..86c66ad18 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -119,15 +119,17 @@ end # fallback locale and available locales if ENV["RAILS_ENV"] == "test" # The tests assume that the "en" and "es" locales are available - FastGettext.default_available_locales = ["en", "es"] - I18n.default_locale = :en + available_locales = ["en", "es"] + default_locale = "en" else 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') + default_locale = MySociety::Config.get('DEFAULT_LOCALE', 'en') end +FastGettext.default_available_locales = available_locales +I18n.available_locales = available_locales +I18n.default_locale = default_locale + # Load monkey patches and other things from lib/ require 'tmail_extensions.rb' require 'activesupport_cache_extensions.rb' |