Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

es-MX FixedDecimalFormatter data seems to be missing #4232

Closed
sven-oly opened this issue Oct 27, 2023 · 2 comments
Closed

es-MX FixedDecimalFormatter data seems to be missing #4232

sven-oly opened this issue Oct 27, 2023 · 2 comments
Assignees
Labels
A-data Area: Data coverage or quality C-numbers Component: Numbers, units, currencies T-bug Type: Bad behavior, security, privacy

Comments

@sven-oly
Copy link
Contributor

es-MX uses . for the decimal separator:

https://github.com/unicode-org/cldr-json/blob/main/cldr-json/cldr-numbers-full/main/es-MX/numbers.json

However, the ICU4X data file has no entry for es-MX or for es-419, meaning that es-MX falls back to es data, which uses , as the decimal separator:

https://github.com/unicode-org/icu4x/blob/main/provider/baked/decimal/data/macros/decimal_symbols_v1.rs.data

@sven-oly sven-oly added T-bug Type: Bad behavior, security, privacy C-numbers Component: Numbers, units, currencies A-data Area: Data coverage or quality labels Oct 27, 2023
@sffc
Copy link
Member

sffc commented Oct 27, 2023

Verbose datagen output:

2023-10-27T02:01:00.599Z TRACE [icu_datagen::driver] Generating key/locale: decimal/symbols@1/es-MX
2023-10-27T02:01:00.839Z TRACE [icu_datagen::driver] Deduplicating decimal/symbols@1/es-MX (inherits from es-419)
2023-10-27T02:01:00.826Z TRACE [icu_datagen::driver] Deduplicating decimal/symbols@1/es-419 (inherits from und)

But es-419 does not inherit from und.

@sffc
Copy link
Member

sffc commented Oct 27, 2023

The problem was that the runtime fallback mode was deduplicating locales that had any parent with equal data, but it should have been deduplicating locales only if the closest parent had equal data. This affected es-MX because it has the same data as und, but it has different data than es, which was being reached by fallback. (There were other locales besides es-MX which were impacted.)

This affected data in the following components:

  • icu_compactdecimal
  • icu_datetime
  • icu_decimal
  • icu_displaynames
  • icu_properties

@sffc sffc closed this as completed Oct 27, 2023
@sffc sffc self-assigned this Oct 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-data Area: Data coverage or quality C-numbers Component: Numbers, units, currencies T-bug Type: Bad behavior, security, privacy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants