Sort your locales (yml file) in alphabetical order for better readability.
Add this line to your application's Gemfile:
gem 'i18n_yaml_sort', git: 'https://github.com/GovTechSG/i18n_yaml_sort.git'And then execute:
$ bundle
Or install it yourself as:
$ gem install i18n_yaml_sort
Default: Run rake i18n:sort to sort all your locales.
Pass the filename as a param to the task rake i18n:sort[path/to/yaml/file] to sort the given file alone.
Bug reports and pull requests are welcome on GitHub at https://github.com/GovTechSG/i18n_yaml_sort. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.
The gem is available as open source under the terms of the MIT License.