-
-
Notifications
You must be signed in to change notification settings - Fork 411
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] 1.8.6 breaks fallback logic #546
Comments
Possibly a bug caused by #542? |
Do you have a smaller repro case than an app? Ideally a failing test case on i18n would be good. That’s typically what I’m using to prevent future regressions like this. |
I am unable to reproduce this with either this test script: require 'bundler/inline'
gemfile do
source 'https://rubygems.org'
gem 'i18n', '1.8.6'
gem 'pry'
end
require 'i18n'
require 'pry'
I18n::Backend::Simple.send :include, I18n::Backend::Fallbacks
I18n.enforce_available_locales = false
I18n.fallbacks = [:en]
I18n.locale = :jp
I18n.backend.store_translations(:en, { discussions: { posted_by_html: "%{user} %{date}" } })
p I18n.t('discussions.posted_by_html', user: 'Ryan', date: 'Today') Or within a fresh Rails application. I have not yet tried greasyfork -- I do not have time this morning to start it up. I would be interested to hear back from you, @JasonBarnabe, if you're able to come up with a smaller repro case. Or this will wait until later this week when I have time to build greasyfork locally. |
Hey @radar, upgrading my app to 1.8.6 also broke the fallbacks. Reverting to 1.8.5 fixed it. I'll see if I can find some time to create a working example, but I just thought I'd mention it. You might wanna yank the gem until it can be resolved. |
I haven't been able to reproduce in a small test case, so I'm trying debugging in my app. I've found that in 1.8.6, when |
In 1.8.5, In 1.8.6, |
Thank you for the information. That will be tremendously helpful when figuring this issue out. Thank you also for your patience. I was able to reproduce this issue today in a new Rails application with:
<h1><%= I18n::VERSION %></h1>
<h1><%= t('discussions.posted_by_html', user: 'Ryan', date: 'Today') %></h1>
On 1.8.6, I see: On 1.8.5 I see: So I now have an easy test case local. Let's see about fixing this up. Sorry for the regression! |
Interestingly, I cannot reproduce this in a
|
|
After upgrading to i18n 1.8.6, my fallbacks stopped working. I want missing translations to fallback to English, but now they are doing they are doing the
<span class="translation_missing">
behaviour.My app: https://github.com/JasonBarnabe/greasyfork
Ruby 2.7.2
Rails 6.1.0
rail-i18n 6.0.0
Using this in an initializer:
Reverting to 1.8.5 fixes the issue.
The text was updated successfully, but these errors were encountered: