Skip to content

Drop the notation, compactDisplay, & numberingSystem options #1015

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

Merged
merged 1 commit into from
Feb 17, 2025

Conversation

eemeli
Copy link
Collaborator

@eemeli eemeli commented Feb 17, 2025

This fixes some of the issues identified in the ICU4X TC in the doc linked from #1006 (comment) by removing the notation, compactDisplay, and numberingSystem options from all functions that currently have them.

This is not a complete solution, nor is it the one preferred by the ICU4X TC, but for at least these options it's the simplest thing we can do, and as @aphillips notes in a comment on the doc:

Compact display strikes me as a candidate for removal to another function, since not all platforms have this feature in their low-level I18N libraries. We hived off percent. Compact display seems more optional.

The removal of notation and compactDisplay was previously considered in #664, but dismissed on 2024-02-26.

Regarding numberingSystem, we should take it out for now and re-evaluate what shape its option ought to take after the '47 release. Again, quoting @aphillips:

[Toggling between Latin and native digit shaping] is a VERY common thing to want to do. Forcing Latin doesn't require a variable, but setting native digits does with the current design, since you have to specify the script. We might provide a boolean option to turn "digit shaping" on/off to reduce the incidence of needing numberingSystem as an option. I would even support removing this option in favor of such a switch. If you want arbitrary digit shaping, you are doing something super-special and probably not I18N best practices.

@eemeli eemeli added functions Issue pertains to the default function set Agenda+ Requested for upcoming teleconference LDML47 LDML 47 Release (Stable) labels Feb 17, 2025
Copy link
Member

@aphillips aphillips left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about suggesting keeping these in Draft, but suspect that we'll do something different. No reason for us to mislead implementers.

@@ -116,10 +116,10 @@ which makes it available for use in later _expressions_ and _markup_ _options_.
> For example, in
> ```
> .input {$a :number minimumFractionDigits=3}
> .local $b = {$a :integer notation=compact}
> .local $b = {$a :integer useGrouping=never}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should make this change regardless

Comment on lines -76 to -78
> - ICU4J's implementation might _accept_ a `com.ibm.icu.text.NumberingSystem` object
> instead of using a [Unicode Numbering System Identifier](https://unicode.org/reports/tr35/tr35.html#UnicodeNumberSystemIdentifier)
> for the option `numberingSystem` in _functions_ such as `:number` or `:integer`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In an ideal world we would find a replacement here, but not this morning.

@sffc
Copy link
Member

sffc commented Feb 17, 2025

Sure, if you want to do this and punt on the problem, fine with me.

I'm not convinced compact notation should be moved to a separate function, but that's a discussion we can have at another time.

@aphillips aphillips merged commit 2727a5a into main Feb 17, 2025
1 check passed
@aphillips aphillips deleted the icu4x-number-fixes branch February 17, 2025 18:41
eemeli added a commit to messageformat/messageformat that referenced this pull request Mar 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Agenda+ Requested for upcoming teleconference functions Issue pertains to the default function set LDML47 LDML 47 Release (Stable)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants