You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
irb(main):002:0> I18n.locale = :fr ; I18n.t('toto', count: 1)
Traceback (most recent call last):
2: from (irb):2
1: from config/initializers/i18n.rb:10:in `pluralize'
I18n::InvalidPluralizationData (translation data {:other=>"en_totos"} can not be used with :count => 1. key 'one' is missing.)
To answer my own question: one consequence of this is that even if you throw a InvalidPluralizationData, it gets turned into a MissingTranslation by the time it hits the exception handler, which carries less information about what actually happened. I think the fallback code would also need to be adjusted to let this through, and probably the default exception handler as well.
Hello,
Wit a yml like this:
And all fallback things, I18n raise me an error
but i want this
I fixed it by adding this code into
config/initializer/i18n.rb
As I18n::Backend::Base.resolve/translate methods are wrapped into an
catch(:exception)
for managing falllbacksThe text was updated successfully, but these errors were encountered: