LibJS: Rename Intl.Locale's RelevantExtensionKeys to LocaleExtensionKeys

This is an editorial change in the ECMA-402 spec. See:
e2a5747
This commit is contained in:
Timothy Flynn 2025-04-07 14:33:34 -04:00 committed by Tim Flynn
commit 75fce14f09
Notes: github-actions[bot] 2025-04-08 10:53:36 +00:00
2 changed files with 16 additions and 18 deletions

View file

@ -25,15 +25,13 @@ class Locale final : public Object {
public:
static GC::Ref<Locale> create(Realm&, GC::Ref<Locale> source_locale, String);
static constexpr auto relevant_extension_keys()
static constexpr auto locale_extension_keys()
{
// 15.2.2 Internal slots, https://tc39.es/ecma402/#sec-intl.locale-internal-slots
// 1.3.2 Internal slots, https://tc39.es/proposal-intl-locale-info/#sec-intl.locale-internal-slots
// The value of the [[RelevantExtensionKeys]] internal slot is « "ca", "co", "fw", "hc", "kf", "kn", "nu" ».
// If %Collator%.[[RelevantExtensionKeys]] does not contain "kf", then remove "kf" from %Locale%.[[RelevantExtensionKeys]].
// If %Collator%.[[RelevantExtensionKeys]] does not contain "kn", then remove "kn" from %Locale%.[[RelevantExtensionKeys]].
// FIXME: We do not yet have an Intl.Collator object. For now, we behave as if "kf" and "kn" exist, as test262 depends on it.
// The value of the [[LocaleExtensionKeys]] internal slot is « "ca", "co", "fw", "hc", "kf", "kn", "nu" ».
// If %Intl.Collator%.[[RelevantExtensionKeys]] does not contain "kf", then remove "kf" from %Intl.Locale%.[[LocaleExtensionKeys]].
// If %Intl.Collator%.[[RelevantExtensionKeys]] does not contain "kn", then remove "kn" from %Intl.Locale%.[[LocaleExtensionKeys]].
return AK::Array { "ca"sv, "co"sv, "fw"sv, "hc"sv, "kf"sv, "kn"sv, "nu"sv };
}