-
-
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
Don't store translations for locales not set as available #391
Don't store translations for locales not set as available #391
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small change and then I think this is good to go. Thanks for rebasing it!
lib/i18n/backend/simple.rb
Outdated
@@ -29,6 29,11 @@ def initialized? | |||
# translations will be overwritten by new ones only at the deepest | |||
# level of the hash. | |||
def store_translations(locale, data, options = {}) | |||
if I18n.available_locales_initialized? && | |||
I18n.available_locales.include?(locale.to_sym) == false && |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use !I18n.available_locales.include?(locale.to_sym)
here instead of == false
.
@radar updated PR |
LGTM! Thanks! |
Starting from version 0.9.3, I18n doesn't store translations for locales not set as available. This change set locales as available before storing translations. Fix: faker-ruby#1132 Ref: ruby-i18n/i18n#391
I18n.available_locales needs to be cleared before storing translations: ruby-i18n/i18n#391
Starting from version 0.9.3, I18n doesn't store translations for locales not set as available. This change set locales as available before storing translations. Fix: faker-ruby#1132 Ref: ruby-i18n/i18n#391
Starting from version 0.9.3, I18n doesn't store translations for locales not set as available. This change set locales as available before storing translations. Fix: faker-ruby#1132 Ref: ruby-i18n/i18n#391
Starting from version 0.9.3, I18n doesn't store translations for locales not set as available. This change set locales as available before storing translations. Fix: #1132 Ref: ruby-i18n/i18n#391
Starting from version 0.9.3, I18n doesn't store translations for locales not set as available. This change set locales as available before storing translations. Fix: faker-ruby#1132 Ref: ruby-i18n/i18n#391
rebased version of #261