ruby-i18n / i18n

Internationalization (i18n) library for Ruby
MIT License
976 stars 408 forks source link

fix LazyLoadable#available_locales duplicating locales #655

Closed ccutrer closed 1 year ago

ccutrer commented 1 year ago

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 commented 1 year ago

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

ccutrer commented 1 year ago

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.