-
-
Notifications
You must be signed in to change notification settings - Fork 410
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
Regression(?) in v1.3.0, when used with rails-i18n
#449
Comments
rails-i18n
Thank you for reporting this. My understanding of the code in A patch with at least a regression test would be appreciated. Similarly to #447, I will not have time to investigate this deeply until after Jan 2. |
reopened? |
@PikachuEXE @radar Thanks for the quick response/feedback/fix. I'm happy with #450 as a fix for the issue. I think the new behaviour is best, for the majority of users. Focusing on the "composite keys" situation, to summarise what's changed now:
Both In my opinion, making keys symbols-unless-integer/boolean (the current master version) is best, in terms of consistency and backwards compatibility. In future, perhaps consider dropping this weird integer/boolean edge case, and just making keys always symbols - but that's a breaking change. |
Thank you for your confirmation @tom-lord. I agree that symbolising everything would make the API at least consistent, and also agree that it's a breaking change; something that should go into a new major release (i.e. 2.x) -- which is a long way off at this point in time. |
What I tried to do
"Composite" translations, where a hash is defined within the translation itself, have changed behaviour in
v1.2.0
andv1.3.0
, when this gem is used in a Rails application.What I expected to happen/actually happened/versions
Here is a repo I have created demonstrating the behavioural changes:
https://github.com/tom-lord/i18n_regression
In particular, note that we have now stringified they keys of nested hashes (the last line says
"hello"
, not:hello
).Is the new behaviour desired? Maybe.
Unlike before,
v1.3.0
of this library's behaves the same way with and without Rails.However, it's an undocumented change, which caught me off-guard. If this behaviour is expected, can we please add a regression test and ideally documentation?
The text was updated successfully, but these errors were encountered: