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

Order i18n yml hashes #13982

Merged
merged 2 commits into from Mar 24, 2017
Merged

Order i18n yml hashes #13982

merged 2 commits into from Mar 24, 2017

Conversation

Hamms
Copy link
Contributor

@Hamms Hamms commented Mar 24, 2017

Because we are in ruby > 1.9, hashes preserve the order in which keys are inserted, meaning that our YAML files containing translations have also been nicely ordered.

Unfortunately, this order was dependent on the order in which the files were returned from Dir.glob, which is going to be different on HFS+ and ext filesystems (case-sensitive vs case-insensitive ordering).

To prevent confusion and to allow flexibility in who calls this script while maintaining consistency, we .sort the files at the Ruby level before processing them.

@Hamms Hamms merged commit 412b88d into staging Mar 24, 2017
@Hamms Hamms deleted the order-i18n-yml branch March 24, 2017 16:59
@Hamms Hamms mentioned this pull request Apr 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants