Closed Bug 1589095 Opened 5 years ago Closed 4 years ago

Add support for "type" and "style" options to Intl.ListFormat and enable Intl.ListFormat by default

Categories

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

enhancement

Tracking

()

RESOLVED FIXED
mozilla78
Tracking Status
firefox78 --- fixed

People

(Reporter: anba, Assigned: anba)

References

()

Details

(Keywords: dev-doc-complete)

Attachments

(4 files)

This is currently blocked because of missing ICU APIs: https://unicode-org.atlassian.net/browse/ICU-12863

Priority: -- → P3

ulistfmt_openForType is a draft API, so it may not be available when compiling
against a system ICU. Instead of disabling Intl.ListFormat completely, this
patch adds a boolean parameter to InitializeListFormat to conditionally enable
the "type" and "style" options when ICU draft APIs are available.

Assignee: nobody → andrebargull
Status: NEW → ASSIGNED

"conjunction-long.js" can be removed, because the more thorough
"conjunction-type.js" test gets enabled in this patch.

Depends on D72916

We can avoid initialising the ICU list formatter and calling into C++ when the
list contains less than two elements.

Depends on D72917

Pushed by apavel@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/a0fcee52ae04
Part 1: Call new ICU API for list formatters to set style/width options. r=jwalden
https://hg.mozilla.org/integration/autoland/rev/ed81e75b9623
Part 2: Enable additional Intl.ListFormat test cases. r=jwalden
https://hg.mozilla.org/integration/autoland/rev/26fe2fe0c9e5
Part 3: Add ListFormat optimisation when list contains less two elements. r=jwalden
https://hg.mozilla.org/integration/autoland/rev/f17442f0485c
Part 4: Enable Intl.ListFormat by default. r=jwalden
Keywords: dev-doc-needed
Summary: Add support for "type" and "style" options to Intl.ListFormat → Add support for "type" and "style" options to Intl.ListFormat and enable Intl.ListFormat by default
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: