-
Notifications
You must be signed in to change notification settings - Fork 106
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
Normative: Allow Collator to get collation from option #459
Conversation
Collator already have "co" in [[RelevantExtensionKeys]] internal slot and therefore the usage by using "-u-co-$collationkey" is already supported in ECMA402. Close #380
To make it the same as the order already in Table 3: Resolved Options of Collator Instances
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.
PTAL
Looks good! Let's try to get consensus at the next 402 meeting. |
spec/collator.html
Outdated
1. Let _collation_ be ? GetOption(_options_, `"collation"`, `"string"`, *undefined*, *undefined*). | ||
1. If _collation_ is not *undefined*, then | ||
1. If _collation_ does not match the Unicode Locale Identifier `type` nonterminal, throw a *RangeError* exception. | ||
1. Set _opt_.[[co]] to _collation_. |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
spec/collator.html
Outdated
@@ -14,6 +14,10 @@ <h1>InitializeCollator ( _collator_, _locales_, _options_ )</h1> | |||
The abstract operation InitializeCollator accepts the arguments _collator_ (which must be an object), _locales_, and _options_. It initializes _collator_ as a *Collator* object. The following steps are taken: | |||
</p> | |||
|
|||
<p> | |||
The following algorithm refers to the `type` nonterminal from <a href="http://www.unicode.org/reports/tr35/#Unicode_locale_identifier">UTS 35's Unicode Locale Identifier grammar</a>. |
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.
Nit: "https" instead of "http".
TC39 gave consensus for this change on 2020-07-20. |
Just FYI |
I still have "You’re not authorized to merge this pull request." next to the grey "Merge pull request" button. |
FYI- landed into v8 and should be available in Chrome 86 |
Per change in tc39/ecma402#459 Bug: v8:10732 Change-Id: I2ef21e8b450cbf9c61f987c61f3ba7d6959db81a Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2309149 Reviewed-by: Jakob Kummerow <[email protected]> Commit-Queue: Frank Tang <[email protected]> Cr-Commit-Position: refs/heads/master@{#68976}
FYI, JSC enabled it on Trunk https://trac.webkit.org/changeset/267102/webkit |
thanks. I updated https://github.com/tc39/ecma402/wiki/Proposal-and-PR-Progress-Tracking |
… r=yulia Implements the changes from the "has consensus" PR <tc39/ecma402#459>. Drive-by change: - Enable a named groups RegExp test which wasn't enabled when bug 1362154 was implemented. Differential Revision: https://phabricator.services.mozilla.com/D95734
… r=yulia Implements the changes from the "has consensus" PR <tc39/ecma402#459>. Drive-by change: - Enable a named groups RegExp test which wasn't enabled when bug 1362154 was implemented. Differential Revision: https://phabricator.services.mozilla.com/D95734
https://bugs.webkit.org/show_bug.cgi?id=216529 Reviewed by Ross Kirsling. JSTests: * stress/intl-collator-co-extension.js: (shouldThrow): Source/JavaScriptCore: This patch adds "collation" option to Intl.Collator. We are already getting consensus[1], and will be integrated into the spec. Previously, passing "collation" is only available through "-u-co-" unicode extension in the passed locale. The proposal exposes collation option as an option to Intl.Collator so that we can set it easily. "collation" is used only when "usage" is "sort". "search" usage will filter out collation options since "search" itself is one of the "collation" option. [1]: tc39/ecma402#459 * runtime/IntlCollator.cpp: (JSC::IntlCollator::sortLocaleData): (JSC::IntlCollator::initializeCollator): Canonical link: https://commits.webkit.org/229383@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@267102 268f45cc-cd09-0410-ab3c-d52691b4dbfc
@FrankYFTang @sffc https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/Collator/Collator#parameters already lists |
It seems they list the possible values there. Not sure what is missing. Please at least add "zhuyin" as possible value
I think we should add all those missed from above (for example "zhuyin") except "search" and "standard" that is clearly stated not allowed in ECMA402 |
Collator already have "co" in [[RelevantExtensionKeys]] internal slot and therefore the usage by using "-u-co-$collationkey" is already supported in ECMA402.
This PR will also make our extension / option handling in ECMA402 consistent.
I check other object and I believe this is the only inconsistent handling between u extension and option now.
Close #380