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

Fix string locale will trigger on_fallback hook. #562

Merged
merged 1 commit into from Mar 30, 2021

Conversation

piecehealth
Copy link
Contributor

When I use the on_fallback hook (introduced by #520), I found it would be triggered unexpectedly when given a string locale value.

e.g.

I18n.t("hello", locale: :"zh-CN") # Symbol locale value, won't trigger `on_fallback` hook.
I18n.t("hello", locale: "zh-CN") # String locale value, would trigger `on_fallback` hook.

This PR tries to fix it.

@radar radar merged commit a469561 into ruby-i18n:master Mar 30, 2021
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 this pull request may close these issues.

None yet

2 participants