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

Relative Date Time Format fails with locale en-US and non-Latn numbering system #5204

Closed
sven-oly opened this issue Jul 9, 2024 · 2 comments · Fixed by #5914
Closed

Relative Date Time Format fails with locale en-US and non-Latn numbering system #5204

sven-oly opened this issue Jul 9, 2024 · 2 comments · Fixed by #5914
Assignees
Labels
C-numbers Component: Numbers, units, currencies discuss Discuss at a future ICU4X-SC meeting T-bug Type: Bad behavior, security, privacy U-ecma402 User: ECMA-402 compatibility

Comments

@sven-oly
Copy link
Contributor

sven-oly commented Jul 9, 2024

In ICU conformance testing with this data, the expected result has Arabic digits. This appears to be a problem in inheritance for en-US

{"test_type": "rdt_fmt", "label":"704","unit":"second","count":"-100","locale":"en-US","options":{"numberingSystem":"arab"}}

Actual result: {"actual_options":"DataLocale{en-US-u-nu-arab}","label":"704","result":"100 seconds ago"}

Expected "١٠٠ seconds ago"

Similar with Bengali digits:
{"test_type": "rdt_fmt", "label":"1056","unit":"second","count":"-100","locale":"en-US","options":{"numberingSystem":"beng"}}

Actual result: {"actual_options":"DataLocale{en-US-u-nu-beng}","label":"1056","result":"100 seconds ago"}

Expected: "১০০ seconds ago"

Similar with Adlam digits:
{"test_type": "rdt_fmt", "label":"1408","unit":"second","count":"-100","locale":"en-US","options":{"numberingSystem":"adlm"}}

Actual result: {"actual_options":"DataLocale{en-US-u-nu-adlm}","label":"1408","result":"100 seconds ago"}

Expected: "𞥑𞥐𞥐 seconds ago"

@sffc sffc added T-bug Type: Bad behavior, security, privacy C-numbers Component: Numbers, units, currencies labels Jul 9, 2024
@sffc
Copy link
Member

sffc commented Jul 9, 2024

I think it's FixedDecimalFormatter in general, not just RelativeTimeFormatter.

-u-nu-arab only loads data for locales that have a -u-nu-arab. However, not all locales have it, and datagen only exports it when it is in the CLDR data for that locale.

It does raise the question, do we really want/need to support en-u-nu-arab if CLDR doesn't provide data for it? ICU and others support arbitrary numbering systems with Latin symbols. But does that make sense?

@sffc sffc added the discuss Discuss at a future ICU4X-SC meeting label Jul 9, 2024
@sven-oly
Copy link
Contributor Author

sven-oly commented Jul 9, 2024

I agree that we should verify if using any numbering system with any locale is useful. The tests show that Arabic, Adlam, and Bengali digits do appear with conforming locales.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-numbers Component: Numbers, units, currencies discuss Discuss at a future ICU4X-SC meeting T-bug Type: Bad behavior, security, privacy U-ecma402 User: ECMA-402 compatibility
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants