ruby-i18n/ruby-cldr

Sorted files should retain sort order after merge

Closed this issue · 0 comments

Problem

The sort order of the files is not maintained when locales are merged.

Steps to reproduce

  1. thor cldr:export --locales fr --components currencies

Note the all the currency data is sorted by currency code.

  1. thor cldr:export --locales fr --components currencies --merge

Note that the currencies mentioned by the root locale (added by --merge) are found at the top of the file, followed by those found only in the fr file.

Expectation

In this case, the root locale adds nothing that isn't present in the fr locale, so the files should be identical.

The same sort order should be maintained. For currency files, this uses the currency code.
For other files, it might use another.

Benefits

  • As a human, it's easier to find what you're looking for
  • For those using line-by-line diff tools, the diffs are cleaner