-
Notifications
You must be signed in to change notification settings - Fork 595
Plural: Support ordinals #416
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
Conversation
>> **type** Optional | ||
>> | ||
>> String `cardinal` (default), or `ordinal`. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please, could you move options above value? Also, replace >>
with >
only.
Hi @tniessen, I left a couple of comments above. Great job so far. |
@@ -49,7 +74,7 @@ plural( 1 ); | |||
// > "other" | |||
``` | |||
|
|||
For comparison: | |||
For comparison (cardinals): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's create a similar table for ordinals?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
I'd like to see a brief definition for both cardinals and ordinals somewhere in the documentation. More examples would also help. |
@rxaviers @jzaefferer I pushed a commit a few days ago, awaiting reviews. |
|
||
| | en (English) | ru (Russian) | ar (Arabic) | | ||
| --- | --- | --- | --- | | ||
| `plural( 0 )` | `other` | `other` | `other` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All table needs the below change.
- plural( 0 )
+ plural( 0, { type: "ordinal" } )
Hi @tniessen, I added a couple of comments. Github doesn't send notifications when new commits are pushed. So, feel free to add a new comment if you have further updates. Thanks so far. |
Thank you @tniessen, one last comment. |
cardinal: cldr.supplemental( "plurals-type-cardinal" ) | ||
}; | ||
MakePlural.rules = {}; | ||
MakePlural.rules[type] = cldr.supplemental( "plurals-type-" + type ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spaces MakePlural.rules[ type ] =
@tniessen, no problem. Thanks landed 🎉 |
Fixes #403