Make "locales" and "options" arguments and the "type" property mandatory for Intl.DisplayNames
Categories
(Core :: JavaScript: Internationalization API, task, P2)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox80 | --- | fixed |
People
(Reporter: anba, Assigned: anba)
Details
Attachments
(4 files)
Make "locales" and "options" arguments and the "type" property mandatory for Intl.DisplayNames per the latest spec proposal changes. Also canonicalise the input arguments to the of() method.
Updated•5 years ago
|
| Assignee | ||
Comment 1•5 years ago
|
||
Moves the fallback handling from JS into C++ code, because the language, script,
and region tags were already canonicalised in C++, so handling the fallback path
in C++ altogether avoids repeated canonicalisation.
Drive-by:
Change Intl_DisplayNames_of to call ToString(code) before getDisplayNamesInternals()
following comments from a previous review.
| Assignee | ||
Comment 2•5 years ago
|
||
"month" is the only date-time type which may return an empty string (only for
Undecimber, though). Handle this case and also assert all other date-time types
always return a non-empty result.
Depends on D83944
| Assignee | ||
Comment 3•5 years ago
|
||
Zero initialisation is cheap for this case (two mov for script and a single
mov for region types).
Depends on D83945
| Assignee | ||
Comment 4•5 years ago
|
||
Drive-by change:
Enable now passing test262 tests which weren't updated in the last test262 update.
Depends on D83946
Comment 6•5 years ago
|
||
| bugherder | ||
https://hg.mozilla.org/mozilla-central/rev/29b831c685f0
https://hg.mozilla.org/mozilla-central/rev/c57a391c7063
https://hg.mozilla.org/mozilla-central/rev/0f66e6b2e06c
https://hg.mozilla.org/mozilla-central/rev/5c653e761010
Description
•