mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 12:17:35 +00:00
LibJS: Rename the Intl Enumeration Available* AOs to AvailableCanonical*
This is an editorial change to the Intl Enumeration API proposal. See:807b444
Note that this was followed by a normative change to actually ensure the returned values are canonical:075a6dc
But the values we return are already canonical.
This commit is contained in:
parent
b10bbac061
commit
92f4f40198
1 changed files with 9 additions and 9 deletions
|
@ -76,8 +76,8 @@ JS_DEFINE_NATIVE_FUNCTION(Intl::get_canonical_locales)
|
||||||
return Array::create_from(realm, marked_locale_list);
|
return Array::create_from(realm, marked_locale_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
// 1.4.4 AvailableTimeZones (), https://tc39.es/proposal-intl-enumeration/#sec-availablecurrencies
|
// 1.4.4 AvailableCanonicalTimeZones (), https://tc39.es/proposal-intl-enumeration/#sec-availablecanonicaltimezones
|
||||||
static Vector<StringView> available_time_zones()
|
static Vector<StringView> available_canonical_time_zones()
|
||||||
{
|
{
|
||||||
// 1. Let names be a List of all supported Zone and Link names in the IANA Time Zone Database.
|
// 1. Let names be a List of all supported Zone and Link names in the IANA Time Zone Database.
|
||||||
auto names = TimeZone::all_time_zones();
|
auto names = TimeZone::all_time_zones();
|
||||||
|
@ -117,33 +117,33 @@ JS_DEFINE_NATIVE_FUNCTION(Intl::supported_values_of)
|
||||||
|
|
||||||
// 2. If key is "calendar", then
|
// 2. If key is "calendar", then
|
||||||
if (key == "calendar"sv) {
|
if (key == "calendar"sv) {
|
||||||
// a. Let list be ! AvailableCalendars( ).
|
// a. Let list be ! AvailableCanonicalCalendars( ).
|
||||||
list = ::Locale::get_available_calendars();
|
list = ::Locale::get_available_calendars();
|
||||||
}
|
}
|
||||||
// 3. Else if key is "collation", then
|
// 3. Else if key is "collation", then
|
||||||
else if (key == "collation"sv) {
|
else if (key == "collation"sv) {
|
||||||
// a. Let list be ! AvailableCollations( ).
|
// a. Let list be ! AvailableCanonicalCollations( ).
|
||||||
list = ::Locale::get_available_collation_types();
|
list = ::Locale::get_available_collation_types();
|
||||||
}
|
}
|
||||||
// 4. Else if key is "currency", then
|
// 4. Else if key is "currency", then
|
||||||
else if (key == "currency"sv) {
|
else if (key == "currency"sv) {
|
||||||
// a. Let list be ! AvailableCurrencies( ).
|
// a. Let list be ! AvailableCanonicalCurrencies( ).
|
||||||
list = ::Locale::get_available_currencies();
|
list = ::Locale::get_available_currencies();
|
||||||
}
|
}
|
||||||
// 5. Else if key is "numberingSystem", then
|
// 5. Else if key is "numberingSystem", then
|
||||||
else if (key == "numberingSystem"sv) {
|
else if (key == "numberingSystem"sv) {
|
||||||
// a. Let list be ! AvailableNumberingSystems( ).
|
// a. Let list be ! AvailableCanonicalNumberingSystems( ).
|
||||||
list = ::Locale::get_available_number_systems();
|
list = ::Locale::get_available_number_systems();
|
||||||
}
|
}
|
||||||
// 6. Else if key is "timeZone", then
|
// 6. Else if key is "timeZone", then
|
||||||
else if (key == "timeZone"sv) {
|
else if (key == "timeZone"sv) {
|
||||||
// a. Let list be ! AvailableTimeZones( ).
|
// a. Let list be ! AvailableCanonicalTimeZones( ).
|
||||||
static auto time_zones = available_time_zones();
|
static auto time_zones = available_canonical_time_zones();
|
||||||
list = time_zones.span();
|
list = time_zones.span();
|
||||||
}
|
}
|
||||||
// 7. Else if key is "unit", then
|
// 7. Else if key is "unit", then
|
||||||
else if (key == "unit"sv) {
|
else if (key == "unit"sv) {
|
||||||
// a. Let list be ! AvailableUnits( ).
|
// a. Let list be ! AvailableCanonicalUnits( ).
|
||||||
static auto units = sanctioned_single_unit_identifiers();
|
static auto units = sanctioned_single_unit_identifiers();
|
||||||
list = units.span();
|
list = units.span();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue