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

Add PluralRules selectRange #16

Closed
sffc opened this issue Jul 8, 2020 · 4 comments
Closed

Add PluralRules selectRange #16

sffc opened this issue Jul 8, 2020 · 4 comments
Labels
has-consensus Has consensus and ready to implement

Comments

@sffc
Copy link
Collaborator

sffc commented Jul 8, 2020

Number ranges have their own rules for plural selection. CLDR has this data. Consider exposing it in JavaScript via PluralRules.prototype.selectRange().

https://unicode-org.atlassian.net/browse/ICU-21190

@sffc sffc added the discuss Needs discussion to make progress label Oct 8, 2020
@jswalden
Copy link

jswalden commented Oct 8, 2020

UTS 35 briefly discusses plural rules for ranges: https://unicode.org/reports/tr35/tr35-numbers.html#Plural_Ranges

@eemeli
Copy link
Member

eemeli commented Oct 8, 2020

I can probably expand my intl-pluralrules polyfill to support this. @sffc please let me know once there's something like a spec to start playing around with?

@sffc sffc added has-consensus Has consensus and ready to implement and removed discuss Needs discussion to make progress labels Oct 8, 2020
@sffc
Copy link
Collaborator Author

sffc commented Oct 14, 2020

@eemeli
Copy link
Member

eemeli commented Oct 16, 2020

By spec I actually meant a spec for the PluralRules.prototype.selectRange()JS function, but I can presume that it's something like (start: number, end: number): 'zero'|'one'|'two'|'few'|'many'|'other' to start with, and make up stuff about errors.

As a first step I'll need to add the data to make-plural, which is what intl-pluralrules internally uses. While starting at that, I noticed that the cldr-core npm package does not include the pluralRanges data. I'll add a ticket on the CLDR Jira about this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has-consensus Has consensus and ready to implement
Projects
None yet
Development

No branches or pull requests

3 participants