X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/cbea796ef412840af9a3ec2fd26bf08657fc4cd3..7f6028cd7d6d63e72e7aaeef4baba53b6158915e:/config/initializers/i18n.rb diff --git a/config/initializers/i18n.rb b/config/initializers/i18n.rb index 6e0930017..8f74c3cd3 100644 --- a/config/initializers/i18n.rb +++ b/config/initializers/i18n.rb @@ -18,7 +18,7 @@ module OpenStreetMap def store_translations(locale, data, options = {}) locale = ::I18n::Locale::Tag::Rfc4646.tag(locale).to_s - super(locale, data, options) + super end end @@ -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