module PluralizationFallback
def pluralize(locale, entry, count)
super
- rescue InvalidPluralizationData => ex
- raise ex unless ex.entry.key?(:other)
- ex.entry[:other]
+ rescue InvalidPluralizationData => e
+ raise e unless e.entry.key?(:other)
+
+ e.entry[:other]
end
end
end
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