yaroslav/russian — pull request #56 by Envek (2014-09-19 09:10:41+00:00)
Title: Sort locale files list alphabetically

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.

[i18n]: https://github.com/svenfuchs/i18n
[i18n-js]: https://github.com/fnando/i18n-js