LibJS+LibUnicode: Designate a sort order for Intl.PluralRules categories

This is a normative change in the ECMA-402 spec. See:
62fe5db
This commit is contained in:
Timothy Flynn 2024-12-04 12:47:40 -05:00 committed by Andreas Kling
commit 5e534f4d83
Notes: github-actions[bot] 2024-12-05 08:50:46 +00:00
4 changed files with 12 additions and 22 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2022-2024, Tim Flynn <trflynn89@serenityos.org>
* Copyright (c) 2022-2024, Tim Flynn <trflynn89@ladybird.org>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
@ -18,12 +18,13 @@ PluralForm plural_form_from_string(StringView);
StringView plural_form_to_string(PluralForm);
enum class PluralCategory {
Other,
// NOTE: These are sorted in preferred order for Intl.PluralRules.prototype.resolvedOptions.
Zero,
One,
Two,
Few,
Many,
Other,
// https://unicode.org/reports/tr35/tr35-numbers.html#Explicit_0_1_rules
ExactlyZero,