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 for reseting available locales Cache on load_path changes #272

Closed
wants to merge 2 commits into from

Conversation

tjgfernandes
Copy link

When using simple backend and changing the load_path the locales Cache wasn't updating to show updated available_locales. By "reseting" cache it forces to create a new one whenever load_path is changed.

@arthurnn
Copy link
Contributor

This make sense... not sure about the implementation tho, if we should extract that @@available_locales_set = nil to a method or something. Anyhow this make sense to me.

@@ -110,12 +110,14 @@ def missing_interpolation_argument_handler=(exception_handler)
# register translation files like this:
# I18n.load_path << 'path/to/locale/en.yml'
def load_path
reset_available_locales_set
@@load_path ||= []
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

load_path= must be defined as a method, and in case of resetting it should trigger reset of available locales.

@dmitry
Copy link

dmitry commented Nov 17, 2016

#261 and this PR should work together.

@radar radar added this to the 0.9.0 milestone Nov 20, 2016
@radar radar modified the milestones: 0.9.0, 0.10.0 Oct 1, 2017
@dillonwelch
Copy link
Contributor

@radar seems like either this could be merged (since it's all green) or closed (since the other linked PR was also closed)? Thoughts?

@radar radar closed this Jun 4, 2020
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

5 participants