A small collection of tools for locales wannabe project. Currently supports only sort_tokens.
When working with lot of tokens it's best practice to arrange the keys in alphabetical order. That is what this task does.
Give a yaml file like this:
en:
admin:
menu:
company: "Company"
about_us: "About Us"
flashes:
success: "Success"
failure: "Failure"
The result will be:
en:
admin:
flashes:
failure: Failure
success: Success
menu:
about_us: About Us
company: Company
This method uses the default to_yaml
formatting options.
gem 'tools_for_locales'
rake tools_for_locales:sort_tokens
WARNING:
All locale files will be overwritten
rspec spec/
tools_for_locales is released under the MIT License