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 Unified Intl.NumberFormat proposal to ECMA-402. #404

Merged
merged 1 commit into from
Feb 27, 2020

Conversation

sffc
Copy link
Contributor

@sffc sffc commented Jan 25, 2020

This PR is to merge the Unified Intl.NumberFormat proposal into ECMA-402, pending final Stage 4 approval.

https://github.com/tc39/proposal-unified-intl-numberformat

Copy link

@spectranaut spectranaut left a comment

Choose a reason for hiding this comment

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

This looks great. Approved, other than one small fix.

Localized symbols for compact and scientific notation (<emu-xref href="#sec-formatnumber"></emu-xref>)
</li>
<li>
Localized <ins>narrow, short, and long</ins> currency symbols <del>and names</del> (<emu-xref href="#sec-formatnumber"></emu-xref>)

Choose a reason for hiding this comment

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

left the <ins> and <del>

@@ -131,7 +131,8 @@ <h1>ResolvePlural ( _pluralRules_, _n_ )</h1>
1. Return *"other"*.
1. Let _locale_ be _pluralRules_.[[Locale]].
1. Let _type_ be _pluralRules_.[[Type]].
1. Let _s_ be ! FormatNumericToString(_pluralRules_, _n_).
1. Let _res_ be ! FormatNumericToString(_pluralRules_, _n_).
1. Let _s_ be _res_.[[FormattedString]]
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
1. Let _s_ be _res_.[[FormattedString]]
1. Let _s_ be _res_.[[FormattedString]].

1. Assert: _notation_ is *"compact"*.
1. Let _compactDisplay_ be _numberFormat_.[[CompactDisplay]].
1. Let _compactPatterns_ be _notationSubPatterns_.[[compact]].[[&gt;_compactDisplay_&lt;]].
1. Return _compactPatterns_.[[_exponent_]].
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
1. Return _compactPatterns_.[[_exponent_]].
1. Return _compactPatterns_.[[&lt;_exponent_&gt;]].

@sffc
Copy link
Contributor Author

sffc commented Feb 5, 2020

TC39 approved this for Stage 4 today, February 5, 2019. I will address the comments here and then we should be in the clear to merge.

Copy link
Member

@leobalter leobalter left a comment

Choose a reason for hiding this comment

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

LGTM after the other changes requested are addressed. They are minor changes only so I can apply them directly in a quick follow up. I'll have it prepared before merging.

1. Else if _exponent_ is not 0, then
1. Assert: _notation_ is *"compact"*.
1. Let _compactDisplay_ be _numberFormat_.[[CompactDisplay]].
1. Let _compactPatterns_ be _notationSubPatterns_.[[compact]].[[&gt;_compactDisplay_&lt;]].
Copy link
Member

@leobalter leobalter Feb 27, 2020

Choose a reason for hiding this comment

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

typo on the &gt; and &lt; ordering

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.

4 participants