3 module PluralizationFallback
4 def pluralize(locale, entry, count)
6 rescue InvalidPluralizationData => e
7 raise e unless e.entry.key?(:other)
17 module NormaliseLocales
18 def store_translations(locale, data, options = {})
19 locale = ::I18n::Locale::Tag::Rfc4646.tag(locale).to_s
27 I18n::Backend::Simple.prepend(OpenStreetMap::I18n::NormaliseLocales)
29 I18n::Backend::Simple.include(I18n::Backend::PluralizationFallback)
30 I18n::Backend::Simple.include(I18n::Backend::Fallbacks)
32 I18n.fallbacks.map("no" => "nb")
34 I18n.enforce_available_locales = false
37 I18n.exception_handler = proc do |exception|
38 raise exception.to_exception
42 Rails.configuration.after_initialize do
43 I18n.available_locales