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 LazyLoadable#available_locales duplicating locales #655

Merged

Conversation

ccutrer
Copy link
Contributor

@ccutrer ccutrer commented Mar 29, 2023

Sometimes locales will be split across multiple files. LazyLoadable explicitly supports that, either by using multiple file types, or post-fixing the locale name with an _ and a descriptor.

But even so, there should only be one instance in available_locales.

Sometimes locales will be split across multiple files.
LazyLoadable explicitly supports that, either by using multiple
file types, or post-fixing the locale name with an _ and a descriptor.

But even so, there should only be one instance in available_locales.
@radar
Copy link
Collaborator

radar commented Apr 5, 2023

Just to confirm: before would there be two en, and then one fr? And now only one en and one fr?

@ccutrer
Copy link
Contributor Author

ccutrer commented Apr 5, 2023

Correct. The existing specs test this case, as long as there are two files with the same base locale, so I didn't add an additional spec, just changed the base data all the specs use.

@radar radar merged commit 4ced6ee into ruby-i18n:master Apr 26, 2023
23 of 24 checks passed
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