From 19ce186f979040f26a22ea1587f821e7e7ad6506 Mon Sep 17 00:00:00 2001 From: Timothy Flynn Date: Mon, 7 Apr 2025 14:35:34 -0400 Subject: [PATCH] LibJS: Define Intl.Locale's LocaleExtensionKeys more declaratively This is an editorial change in the ECMA-402 spec. See: https://github.com/tc39/ecma402/commit/3898acf --- Libraries/LibJS/Runtime/Intl/Locale.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Libraries/LibJS/Runtime/Intl/Locale.h b/Libraries/LibJS/Runtime/Intl/Locale.h index e7c8960b8e8..4cc694f6d88 100644 --- a/Libraries/LibJS/Runtime/Intl/Locale.h +++ b/Libraries/LibJS/Runtime/Intl/Locale.h @@ -29,9 +29,9 @@ public: { // 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 [[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]]. + // The value of the [[LocaleExtensionKeys]] internal slot is a List that must include all elements of + // « "ca", "co", "fw"sv, "hc", "nu" », must additionally include any element of « "kf", "kn" » that is also an + // element of %Intl.Collator%.[[RelevantExtensionKeys]], and must not include any other elements. return AK::Array { "ca"sv, "co"sv, "fw"sv, "hc"sv, "kf"sv, "kn"sv, "nu"sv }; }