Don't export files when for locales if there is no relevant data in CLDR
Closed this issue · 0 comments
movermeyer commented
There are a number of places in ruby-cldr
where files are created for locales, despite there being no relevant information for that (locale, component) pair.
Sometimes this manifests as empty YAML mappings, and sometimes the entire file is meaningless.
These meaningless keys mean more memory usage for Rails users, and bloats the I18n.load_path
unnecessarily.
Examples:
data/af-ZA/calendars.yml
data/af-ZA/delimiters.yml
data/af-ZA/rbnf.yml
data/af-ZA/units.yml
Upstream CLDR has no relevant information for these components in this locale.
Of the 8332 YAML files output by ruby-cldr
, at least 2327 of them (28%) of them contain no relevant information.
Potential solution
Stop outputting keys and/or files unless there is actually relevant data from the upstream CLDR.