Closed Bug 1855749 Opened 2 years ago Closed 2 years ago

ignorePunctuation collator option is locale-dependent

Categories

(Core :: JavaScript: Internationalization API, defect, P3)

defect

Tracking

()

RESOLVED FIXED
121 Branch
Tracking Status
firefox120 --- wontfix
firefox121 --- fixed

People

(Reporter: anba, Assigned: anba)

References

Details

Attachments

(3 files)

Fix the issue reported in https://github.com/tc39/ecma402/issues/832.

Add Collator::GetIgnorePunctuation() similar to the existing
Collator::GetCaseFirst() function.

Drive-by change:

  • Remove unnecessary macro with an inline function.

Depends on D189542

Adds intl_isIgnorePunctuation() and SharedIntlData::isIgnorePunctuation(),
which are both similar to the existing intl_isUpperCaseFirst() and
SharedIntlData::isUpperCaseFirst().

Depends on D189543

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 https://github.com/tc39/ecma402/pull/833, but
our behaviour is already not strictly spec-compliant as described in
https://github.com/tc39/ecma402/issues/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.)

Depends on D189544

Severity: -- → N/A
Priority: -- → P3
Severity: N/A → S4
Pushed by andre.bargull@gmail.com: https://hg.mozilla.org/integration/autoland/rev/ca59d4521a8e Part 1: Add intl::Collator::GetIgnorePunctuation(). r=dminor https://hg.mozilla.org/integration/autoland/rev/a58b936add5f Part 2: Add intl_isIgnorePunctuation self-hosting helper. r=dminor https://hg.mozilla.org/integration/autoland/rev/bcf3b4652f99 Part 3: Correctly handle ignorePunctuation option. r=dminor
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 121 Branch

The patch landed in nightly and beta is affected.
:anba, is this bug important enough to require an uplift?

  • If yes, please nominate the patch for beta approval.
  • If no, please set status-firefox120 to wontfix.

For more information, please visit BugBot documentation.

Flags: needinfo?(andrebargull)

(In reply to BugBot [:suhaib / :marco/ :calixte] from comment #6)

The patch landed in nightly and beta is affected.
:anba, is this bug important enough to require an uplift?

No, uplift isn't required.

Flags: needinfo?(andrebargull)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: