-
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 locale based ignorePunctuation default #833
Conversation
"th" locale default ignorePunctuation to true instead of false so we need to get tht default value from the locale data instead of always false. Address #832
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.
This looks reasonable to me from the spec point of view. I haven't yet investigated what needs to be changed implementation-wise, though.
One small nit: Annex A https://tc39.es/ecma402/#annex-implementation-dependent-behaviour should also be updated to include:
The default ignore punctuation value per locale (<xref> here)
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.
Minor typo fix, otherwise great
Co-authored-by: Ben Allen <[email protected]>
Changed. PTAL |
LGTM! |
remove trailing space
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.
This seems like a good change to me; let's discuss in the next TG2
…inor The default value for `GetOption` in `InitializeCollator` is changed from `false` to `undefined` to avoid having to `intl_isIgnorePunctuation` in the constructor function. The corresponding spec PR is <tc39/ecma402#833>, but our behaviour is already not strictly spec-compliant as described in <tc39/ecma402#832>, so it seems reasonable to simply implement the spec PR ahead of time. (We don't want to "fix" our implementation to strictly follow the spec without the PR, because that could be web-incompatible resp. at least disruptive for Thai users, which currently already get the expected behaviour where punctuation characters are ignored in Thai.) Differential Revision: https://phabricator.services.mozilla.com/D189545
…inor The default value for `GetOption` in `InitializeCollator` is changed from `false` to `undefined` to avoid having to `intl_isIgnorePunctuation` in the constructor function. The corresponding spec PR is <tc39/ecma402#833>, but our behaviour is already not strictly spec-compliant as described in <tc39/ecma402#832>, so it seems reasonable to simply implement the spec PR ahead of time. (We don't want to "fix" our implementation to strictly follow the spec without the PR, because that could be web-incompatible resp. at least disruptive for Thai users, which currently already get the expected behaviour where punctuation characters are ignored in Thai.) Differential Revision: https://phabricator.services.mozilla.com/D189545
…inor The default value for `GetOption` in `InitializeCollator` is changed from `false` to `undefined` to avoid having to `intl_isIgnorePunctuation` in the constructor function. The corresponding spec PR is <tc39/ecma402#833>, but our behaviour is already not strictly spec-compliant as described in <tc39/ecma402#832>, so it seems reasonable to simply implement the spec PR ahead of time. (We don't want to "fix" our implementation to strictly follow the spec without the PR, because that could be web-incompatible resp. at least disruptive for Thai users, which currently already get the expected behaviour where punctuation characters are ignored in Thai.) Differential Revision: https://phabricator.services.mozilla.com/D189545 UltraBlame original commit: bcf3b4652f995f4f52792d5897cd2d905d5a029f
…inor The default value for `GetOption` in `InitializeCollator` is changed from `false` to `undefined` to avoid having to `intl_isIgnorePunctuation` in the constructor function. The corresponding spec PR is <tc39/ecma402#833>, but our behaviour is already not strictly spec-compliant as described in <tc39/ecma402#832>, so it seems reasonable to simply implement the spec PR ahead of time. (We don't want to "fix" our implementation to strictly follow the spec without the PR, because that could be web-incompatible resp. at least disruptive for Thai users, which currently already get the expected behaviour where punctuation characters are ignored in Thai.) Differential Revision: https://phabricator.services.mozilla.com/D189545 UltraBlame original commit: bcf3b4652f995f4f52792d5897cd2d905d5a029f
…inor The default value for `GetOption` in `InitializeCollator` is changed from `false` to `undefined` to avoid having to `intl_isIgnorePunctuation` in the constructor function. The corresponding spec PR is <tc39/ecma402#833>, but our behaviour is already not strictly spec-compliant as described in <tc39/ecma402#832>, so it seems reasonable to simply implement the spec PR ahead of time. (We don't want to "fix" our implementation to strictly follow the spec without the PR, because that could be web-incompatible resp. at least disruptive for Thai users, which currently already get the expected behaviour where punctuation characters are ignored in Thai.) Differential Revision: https://phabricator.services.mozilla.com/D189545 UltraBlame original commit: bcf3b4652f995f4f52792d5897cd2d905d5a029f
This is on the agenda for discussion on 2024-02-06 TC39 meeting https://github.com/tc39/agendas/blob/main/2024/02.md |
Has concensus from TG1 this morning around 11:25am PST (2024-02-06) |
Please merge |
…3338) * Update defaults for Intl.Collator's `ignorePunctuation` parameter to reflect tc39/ecma402#833 * Update files/en-us/web/javascript/reference/global_objects/intl/collator/collator/index.md --------- Co-authored-by: Joshua Chen <[email protected]>
…lt (#3922) * Add test for ECMA402 833 tc39/ecma402#833 * Update test/intl402/Collator/prototype/resolvedOptions/ignorePunctuation-default.js Co-authored-by: André Bargull <[email protected]> * Update test/intl402/Collator/prototype/resolvedOptions/ignorePunctuation-default.js Co-authored-by: André Bargull <[email protected]> --------- Co-authored-by: André Bargull <[email protected]>
"th" locale in CLDR collation rule default ignorePunctuation to true instead of false so we need to get tht default value from the locale data instead of always false.
Address #832
th CLDR rule is in
https://github.com/unicode-org/cldr/blob/main/common/collation/th.xml#L17
@anba @sffc @ben-allen @gibson042