ruby-cldr icon indicating copy to clipboard operation
ruby-cldr copied to clipboard

Distinguishing attribute `numberSystem` is ignored.

Open movermeyer opened this issue 4 years ago • 0 comments

Cldr::Export::Data::Numbers#symbols ignores the distinguishing attribute numberSystem:

Example

In the bn locale, there are data for two number systems. However, Cldr::Export::Data::Numbers#symbols merges them all together:

(byebug) select('numbers/symbols/*').size
23

23 = 11 from the beng numberSystem, and 12 from the latn numberSystem (CLDR v34)

The result is a set of symbols that combine bits of both numberSystems.

bn:
  numbers:
    symbols:
      alias: ''
      decimal: "."
      group: ","
      list: ";"
      percent_sign: "%"
      plus_sign: "+"
      minus_sign: "-"
      exponential: E
      superscripting_exponent: "×"
      per_mille: "‰"
      infinity: "∞"
      nan: NaN
      time_separator: ":"

Distinguishing attributes are used to distinguish multiple elements at the same level.

I expected different numberSystem elements to be kept separate during the export, since that's what the spec calls for. Something like:

bn:
  numbers:
    symbols:
      beng:
          ....
      latn:
          ....

movermeyer avatar Oct 05 '21 19:10 movermeyer