Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] upgrade to version 1.8.4 breaks our translation logic #536

Closed
stereosupersonic opened this issue Jul 23, 2020 · 0 comments · Fixed by #537
Closed

[BUG] upgrade to version 1.8.4 breaks our translation logic #536

stereosupersonic opened this issue Jul 23, 2020 · 0 comments · Fixed by #537

Comments

@stereosupersonic
Copy link
Contributor

What I tried to do

we use our own fallback class for some custom translation logic:

class I18n::OurFallback
  def [](key)
      ... 
  end
end

I18n.fallbacks = I18n::OurFallback.new

this class is not used any more because of this change here

@@fallbacks = fallbacks.is_a?(I18n::Locale::Fallbacks) ? fallbacks : I18n::Locale::Fallbacks.new(fallbacks)

is it possible to fix #534 with the other way around:

  def fallbacks=(fallbacks)
      @@fallbacks = fallbacks.is_a?(Array) ?  I18n::Locale::Fallbacks.new(fallbacks) : fallbacks
   end

thx, i'll prepare a PR for a possible fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant