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

Normative: Allow locale based ignorePunctuation default #833

Merged
merged 6 commits into from
Feb 13, 2024

Conversation

FrankYFTang
Copy link
Contributor

@FrankYFTang FrankYFTang commented Sep 8, 2023

"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

				[alternate shifted]

@anba @sffc @ben-allen @gibson042

"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
@FrankYFTang FrankYFTang changed the title Allow locale based ignorePunctuation default Normative: Allow locale based ignorePunctuation default Sep 9, 2023
Copy link
Contributor

@anba anba 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 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)

Copy link
Contributor

@ben-allen ben-allen left a 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

spec/collator.html Outdated Show resolved Hide resolved
@FrankYFTang
Copy link
Contributor Author

Changed. PTAL

@ben-allen
Copy link
Contributor

LGTM!

remove trailing space
Copy link
Contributor

@sffc sffc left a 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

moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Nov 5, 2023
…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
jamienicol pushed a commit to jamienicol/gecko that referenced this pull request Nov 6, 2023
…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
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Nov 8, 2023
…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
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Nov 8, 2023
…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
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Nov 8, 2023
…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
@FrankYFTang
Copy link
Contributor Author

This is on the agenda for discussion on 2024-02-06 TC39 meeting https://github.com/tc39/agendas/blob/main/2024/02.md

@FrankYFTang FrankYFTang added has consensus Has consensus from TC39-TG2 has consensus (TG1) Has consensus from TC39-TG1 and removed needs consensus labels Feb 6, 2024
@FrankYFTang
Copy link
Contributor Author

Has concensus from TG1 this morning around 11:25am PST (2024-02-06)

@FrankYFTang
Copy link
Contributor Author

Please merge

@ben-allen ben-allen merged commit 8d1a057 into master Feb 13, 2024
3 checks passed
@ben-allen ben-allen deleted the FrankYFTang-patch-3 branch February 13, 2024 20:16
ben-allen added a commit to ben-allen/mdn-content that referenced this pull request Apr 30, 2024
Josh-Cena added a commit to mdn/content that referenced this pull request Apr 30, 2024
…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]>
ptomato pushed a commit to FrankYFTang/test262 that referenced this pull request Jun 27, 2024
ptomato pushed a commit to tc39/test262 that referenced this pull request Jun 27, 2024
…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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
has consensus (TG1) Has consensus from TC39-TG1 has consensus Has consensus from TC39-TG2 normative
Projects
Status: Previously Discussed
Development

Successfully merging this pull request may close these issues.

5 participants