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

Sort locale files list alphabetically #56

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Envek
Copy link

@Envek Envek commented Sep 19, 2014

See fnando/i18n-js#239 for explanation, investigation and discussion.

In short: list of files with translations should be always the same (including order). Dir[] may produce list of file paths with different order on different machines.

For example: In case of i18n-js gem it need to produce always equal translation data. If it's not equal and Rails Asset Pipeline is used, it will lead to generating assets with different hashsums on different servers and link to asset in generated page and in the web server will be different, and site will become broken.

There is probably no good solution possible on the side of i18n or i18n-js gems. So every app and every gem should push to I18n.load_path sorted list of filenames.

That's it.

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.

1 participant