ruby-cldr
ruby-cldr copied to clipboard
Ruby library for exporting data from CLDR (Common Locale Data Repository)
## Problem The `Plurals` component only outputs a `plurals.rb` file for a locale if the locale appears exactly in the [`supplemental/plurals.xml`](https://github.com/unicode-org/cldr/blob/82eb1a9a4fff1a590aa75455a148c9fe3c7a1d33/common/supplemental/plurals.xml) file. For example, `zh-Hant` doesn't have a `plurals.rb` file,...
## Problem `ruby-cldr.gemspec` is auto-generated by `bundle exec rake gemspec` (via Jeweler). However, developers will forget to run it as part of their PRs. Which means that we risk releasing...
Many of the elements in CLDR have `alt=variant` versions that are supposed to be used "in some circumstances". Figure out how we should export these. --- ### Examples #### `eraNames`...
[Sorbet](https://sorbet.org/) is a gradual typing system. Consider typing `ruby-cldr` using Sorbet to help catch typing bugs?
CLDR v38+ has the `c`/`e` operands in plural rules, which are used for formatting "compact decimal" numbers (e.g., `1.20050c3`). Ref: http://unicode.org/reports/tr35/tr35-numbers.html#Plural_Operand_Meanings
[This PR](https://github.com/unicode-org/cldr/pull/474) added inflections to units, so entries in the data changed from: ```xml Tage {0} Tag {0} Tage {0} pro Tag ``` to ```xml masculine Tage {0} Tag {0}...
### Problem? `thor cldr:export --components=subdivisions` is missing some subdivisions In version 35, `ruby-cldr` exports a `data/br/subdivisions.yml` file. In v36+, it does not. This is because the subdivisions have been [moved...
CLDR has a concept of ["Lateral Inheritance"](http://www.unicode.org/reports/tr35/#Lateral_Inheritance) where a value will fallback to another value before falling back to ancestor locales. #### Example `ia.units.unitLength.short.length-centimeter` defines only a single `other` key,...
[`cldr-json`](https://github.com/unicode-org/cldr-json) is a JSON serialization of the official CLDR XML data, created by the Unicode Consortium themselves. It doesn't contains values for everything in CLDR. For example, it only exports...
When falling back through locales, we don't want to fallback to a non-default script, and should instead fall back to `:root` Refer to this code in the CLDR upstream: https://github.com/unicode-org/cldr/blob/2ef01fbbb2a3de93f241e51dd8e37a4b37ae54be/tools/cldr-code/src/main/java/org/unicode/cldr/util/LocaleIDParser.java#L121-L148