From bec91ee133a487fed1cd110de66fbc6630776d3a Mon Sep 17 00:00:00 2001 From: Ari Entlich Date: Wed, 30 Apr 2014 13:58:50 -0400 Subject: [PATCH] Enable the i18n module's enforce_available_locales option. This suppresses an annoying warning message. See the comment for more details. --- config/initializers/locale.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 config/initializers/locale.rb diff --git a/config/initializers/locale.rb b/config/initializers/locale.rb new file mode 100644 index 000000000..3f99b5d9d --- /dev/null +++ b/config/initializers/locale.rb @@ -0,0 +1,9 @@ +# i18n's old behavior was to not validate locales when +# certain things were done with it. This behavior is now +# deprecated, but is still the default. When i18n defaults +# to the deprecated behavior, it prints a warning message. +# Our options are to either explicitly choose the deprecated +# behavior or switch to the new behavior, both of which +# suppress the warning message. There doesn't seem to be any +# reason not to switch to the new behavior, so we do that here. +I18n.config.enforce_available_locales = true