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

Allow overriding the numbering system during decimal format #5914

Merged
merged 6 commits into from
Dec 18, 2024

Conversation

Manishearth
Copy link
Member

Fixes #5204

@Manishearth Manishearth requested a review from sffc as a code owner December 18, 2024 00:02
@sffc
Copy link
Member

sffc commented Dec 18, 2024

Let's say the data contains:

  1. Symbols for en in default numsys latn
  2. Symbols for th in default numsys thai
  3. Symbols for th in non-default numsys latn

Then I think the behavior should be:

Input Locale Symbols Digits Return value of numbering_system()
en latn latn latn
en-u-nu-thai latn thai thai
th thai thai thai
th-u-nu-latn latn latn latn
en-u-nu-wxyz latn latn latn
th-u-nu-wxyz thai thai thai

I think we should probably fall back gracefully if the numsys is not known? The client can check with the new numbering_system() getter if the digits are what they expected.

@Manishearth
Copy link
Member Author

Makes sense, added fallback. I like the table and I added it to the source as well, this will prevent further confusion on this behavior.

@sffc
Copy link
Member

sffc commented Dec 18, 2024

(Please add a test for the table, not just a comment about it)

@Manishearth Manishearth merged commit 55989b6 into unicode-org:main Dec 18, 2024
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Relative Date Time Format fails with locale en-US and non-Latn numbering system
2 participants