1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 11:38:11 +00:00

LibJS: Partially implement Intl.Locale.prototype.collations property

We do not yet parse collation data from the CLDR. This stubs out the
collations property, analogous to Intl.supportedValuesOf.
This commit is contained in:
Timothy Flynn 2022-07-05 12:28:21 -04:00 committed by Linus Groh
parent e9bc35d805
commit 4d32f38a76
7 changed files with 57 additions and 2 deletions

View file

@ -120,7 +120,7 @@ JS_DEFINE_NATIVE_FUNCTION(Intl::supported_values_of)
// 3. Else if key is "collation", then
else if (key == "collation"sv) {
// a. Let list be ! AvailableCollations( ).
// NOTE: We don't yet parse any collation data, but "default" is allowed.
// FIXME: We don't yet parse any collation data, but "default" is allowed. This matches Intl.Locale.prototype.collations.
static constexpr auto collations = AK::Array { "default"sv };
list = collations.span();
}