ruby-duration icon indicating copy to clipboard operation
ruby-duration copied to clipboard

Removing active-support issues causes uncaught exception

Open glennpratt opened this issue 8 years ago • 1 comments

./vendor/bundler/ruby/2.2.0/gems/i18n-0.7.0/lib/i18n.rb:284:in `enforce_available_locales!': :en is not a valid locale (I18n::InvalidLocale)
    from ./vendor/bundler/ruby/2.2.0/gems/i18n-0.7.0/lib/i18n.rb:151:in `translate'
    from ./vendor/bundler/ruby/2.2.0/gems/ruby-duration-3.2.2/lib/duration.rb:247:in `i18n_for'
    from ./vendor/bundler/ruby/2.2.0/gems/ruby-duration-3.2.2/lib/duration.rb:193:in `format'

glennpratt avatar Mar 07 '16 13:03 glennpratt

As far as I can tell, activesupport isn't providing any translations for time units and we are always providing a default.

I think we should either provide our own basic en translations or disable I18n.enforce_available_locales in our use case. For now, I will open a PR that restores active_support/i18n.

glennpratt avatar Mar 07 '16 18:03 glennpratt