X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/9f57f60b87ff55a4ba69db3afadb21bbbdcb3385..88e7d3b05f6500fd2d01ac8e19484a3ceb5c0b22:/config/initializers/i18n.rb diff --git a/config/initializers/i18n.rb b/config/initializers/i18n.rb index 6e0930017..266e41cbb 100644 --- a/config/initializers/i18n.rb +++ b/config/initializers/i18n.rb @@ -42,6 +42,12 @@ I18n.fallbacks.map("no" => "nb") I18n.enforce_available_locales = false +if Rails.env.test? + I18n.exception_handler = proc do |exception| + raise exception.to_exception + end +end + Rails.configuration.after_initialize do I18n.available_locales end