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

Intl.NumberFormat. v3 fixes #28023

Merged
merged 4 commits into from
Jul 20, 2023
Merged

Intl.NumberFormat. v3 fixes #28023

merged 4 commits into from
Jul 20, 2023

Conversation

hamishwillee
Copy link
Collaborator

@hamishwillee hamishwillee commented Jul 18, 2023

FF116 adds support for Intl.NumberFormat v3 proposal. This has largely been documented already, but this fixes some omissions/does some tidy up. The work might happen across a number of PRs.

Fixes in this one:

  • Intl.NumberFormat constructor
    • remove the experimental inline markers for the new options.
    • Add some exceptions (might not be exhaustive - but is something.)
  • NumberFormat.resolvedOptions()
    • new options for trailing zeros and rounding might be returned (in addition to the userGrouping already indicated. These have been added.
    • Added missing results: unit, unitDisplay
    • Added cross links to the constructor docs, which define the values you might receive properly - i.e. this is just a summary - if you want detail you look in the constructor.
    • Improved the example to show more of these new options.

Other docs work can be tracked in #27746

@github-actions github-actions bot added the Content:JS JavaScript docs label Jul 18, 2023
@@ -18,7 +18,7 @@ selectRange(startRange, endRange)
### Return value

A string representing the pluralization category of the `number`.
This can be one of `zero`, `one`, `two`, `few`, `many` or `other`, that are relevant for the locale whose localization is specified in [LDML Language Plural Rules](https://unicode-org.github.io/cldr-staging/charts/37/supplemental/language_plural_rules.html#rules).
This can be one of `zero`, `one`, `two`, `few`, `many` or `other`, that are relevant for the locale whose localization is specified in [LDML Language Plural Rules](https://www.unicode.org/cldr/charts/43/supplemental/language_plural_rules.html).
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

FYI Link moved.

@github-actions
Copy link
Contributor

github-actions bot commented Jul 18, 2023

Preview URLs

Flaws (1)

Note! 2 documents with no flaws that don't need to be listed. 🎉

URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/resolvedOptions
Title: Intl.NumberFormat.prototype.resolvedOptions()
Flaw count: 1

  • broken_links:
    • Anchor not lowercase
External URLs (1)

URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/PluralRules/selectRange
Title: Intl.PluralRules.prototype.selectRange()

(comment last updated: 2023-07-18 06:20:29)

@hamishwillee hamishwillee mentioned this pull request Jul 18, 2023
10 tasks
@hamishwillee hamishwillee marked this pull request as ready for review July 18, 2023 06:36
@hamishwillee hamishwillee requested a review from a team as a code owner July 18, 2023 06:36
@hamishwillee hamishwillee requested review from Josh-Cena and removed request for a team July 18, 2023 06:36
@hamishwillee
Copy link
Collaborator Author

Note, there is more to be done here, but I'm away until Friday and most of that work will be in PluralRules - so we might as well get this in if possible.

Copy link
Member

@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

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

Constructor change LGTM; I would trust you with the resolvedOptions change because I plan to homogenize/deduplicate all the resolvedOptions pages later anyway ^^

@Josh-Cena Josh-Cena merged commit fe6f4c3 into main Jul 20, 2023
@Josh-Cena Josh-Cena deleted the ff116_numberformat_v3 branch July 20, 2023 16:08
@hamishwillee
Copy link
Collaborator Author

Thanks very much.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:JS JavaScript docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants