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 tests for Intl.PluralRules.prototype.resolvedOptions().pluralCategories order #4275

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ben-allen
Copy link
Contributor

@ben-allen ben-allen commented Oct 21, 2024

Array elements should appear in following order: "zero", "one", "two", "few", "many", "other"

see tc39/ecma402#918

fix #4261

@ben-allen ben-allen requested a review from a team as a code owner October 21, 2024 23:24
…egories` order

Array elements should appear in following order: "zero", "one", "two", "few", "many", "other"

see tc39/ecma402#918
@ben-allen ben-allen force-pushed the pluralrules-sort-order-pr-918 branch from 2b9b41b to 18e3e85 Compare October 21, 2024 23:27
Comment on lines 13 to 14
includes: [compareArray.js]
---*/
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this not need a locale: [...] tag?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed! (also alphabetized the locales just to be doing it)

assert.compareArray(new Intl.PluralRules('ar').resolvedOptions().pluralCategories, ['zero', 'one', 'two', 'few', 'many', 'other'], "pluralCategories order or contents incorrect for 'ar' locale");



Copy link
Contributor

Choose a reason for hiding this comment

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

Please remove the spurious empty lines

Copy link
Contributor Author

Choose a reason for hiding this comment

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

d'oh. fixed!

Copy link
Contributor

Choose a reason for hiding this comment

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

You seem to have missed the one between ko and sl, I'm afraid

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sigh. Sorry about that, should be fixed now

i3roly pushed a commit to i3roly/firefox-dynasty that referenced this pull request Nov 26, 2024
…olvedOptions. r=spidermonkey-reviewers,dminor

Sort plural categories per <tc39/ecma402#918>.

Tests are in <tc39/test262#4275>.

Differential Revision: https://phabricator.services.mozilla.com/D228569
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.

Need to add test for ECMA402 PR918
2 participants