-
-
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] Fallbacks do not work for Rails STI models #617
Comments
Hey @jeffblake, sorry for the troubles you're encountering here. I've just tried to reproduce this in a new Rails application, and I wasn't able to successfully do it:
I can confirm I've enabled fallbacks and the translation file is the same. In terms of gems, I've got these relevant ones installed:
Could you please put an app up on GitHub that reproduces this issue? I think that would help me to track this down. Thanks! |
Here is the repro: https://github.com/jeffblake/i18n-bug |
Thank you. I was now able to reproduce this issue. The script I'm using for this reproduction is this:
And I run it with:
It looks like it was a regression in 1.9, as I am unable to reproduce the failure with 1.8.11. I'll try to find that commit that broke this. |
Looks like this might be the commit: fe72c0f.
|
Thanks for finding it, hopefully we can get a fix soon, it's causing a headache for a lot of my customers. |
Hey @movermeyer 👋 I'm going to revert the above commit (from #591), and add a regression test in for #617 in a separate PR. Could you please investigate a way that we could make #617 and your work on #591 work in harmony? |
What I tried to do
In application.rb:
config.i18n.fallbacks = true
In
en.yml
:In console:
What I expected to happen
Product::Ticket.model_name.human returns
Ticket
in any other language, i.e. uses theen
fallbackThe lookup chain is wrong (using I18n-debug gem):
Versions of i18n, rails, and anything else you think is necessary
Bonus points for providing an application or a small code example which reproduces the issue.
Thanks! ❤️
The text was updated successfully, but these errors were encountered: