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 resolved options order correction, normalize description #36056

Merged
merged 15 commits into from
Sep 27, 2024

Conversation

ben-allen
Copy link
Contributor

Description

Reorders the resolvedOptions of Intl objects to the order in which properties are added in the spec. Adds a few properties that were previously left off resolvedOptions return value.

Motivation

Improve readability/consistency of Intl documentation.

Additional details

See discussion here: #33340

Related issues and pull requests

Fixes #36055

@ben-allen ben-allen requested a review from a team as a code owner September 26, 2024 00:12
@ben-allen ben-allen requested review from Josh-Cena and removed request for a team September 26, 2024 00:12
@github-actions github-actions bot added Content:JS JavaScript docs size/m [PR only] 51-500 LoC changed labels Sep 26, 2024
Copy link
Contributor

github-actions bot commented Sep 26, 2024

Preview URLs (11 pages)
External URLs (4)

URL: /en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat/NumberFormat
Title: Intl.NumberFormat() constructor


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

(comment last updated: 2024-09-27 20:10:03)

@Josh-Cena
Copy link
Member

Thanks! It has always been on my TODOs to fix the Intl options and reordering them was one of the goals. Will check this soon.

@ben-allen ben-allen force-pushed the intl-resolved-options-order-correction branch from 20f748d to 95ab21e Compare September 26, 2024 12:36
@github-actions github-actions bot added the merge conflicts 🚧 [PR only] label Sep 27, 2024
Copy link
Contributor

This pull request has merge conflicts that must be resolved before it can be merged.

@ben-allen ben-allen force-pushed the intl-resolved-options-order-correction branch from 1434af4 to c874c7d Compare September 27, 2024 09:23
@github-actions github-actions bot removed the merge conflicts 🚧 [PR only] label Sep 27, 2024
@ben-allen
Copy link
Contributor Author

rebased!

…tions-order-correction' into intl-resolved-options-order-correction
@Josh-Cena Josh-Cena changed the title Intl resolved options order correction Intl resolved options order correction, normalize description Sep 27, 2024
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.

I've audited all pages, and also changed the descriptions to keep everything consistent. Thank you!

@Josh-Cena Josh-Cena merged commit 643fa96 into mdn:main Sep 27, 2024
8 checks passed
@ben-allen
Copy link
Contributor Author

Thank you so much!

fiji-flo pushed a commit that referenced this pull request Oct 2, 2024
* Added `"languageDisplay"` to `resolvedOptions()` of `Intl.DisplayNames` objects

* Swapped order of `"style"` and `"type"` properties in Intl.ListFormat's `resolvedOptions()` to match 402 spec

* Reordered `Intl.NumberFormat` `resolvedOptions` to reflect spec order.

* Reordered `resolvedOptions` properties for `Intl.PluralRules` to reflect spec order

* fixup! Added `"languageDisplay"` to `resolvedOptions()` of `Intl.DisplayNames` objects

* fixup! Swapped order of `"style"` and `"type"` properties in Intl.ListFormat's `resolvedOptions()` to match 402 spec

* Standardize format, first three

* Fixes

* Swapped order of `"style"` and `"type"` properties in Intl.ListFormat's `resolvedOptions()` to match 402 spec

* Reordered `Intl.NumberFormat` `resolvedOptions` to reflect spec order.

* Reordered `resolvedOptions` properties for `Intl.PluralRules` to reflect spec order

* fixup! Swapped order of `"style"` and `"type"` properties in Intl.ListFormat's `resolvedOptions()` to match 402 spec

* Fix others

* numberformat

---------

Co-authored-by: Joshua Chen <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:JS JavaScript docs size/m [PR only] 51-500 LoC changed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

resolvedOptions for Intl objects not given in spec order
2 participants