mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 19:17:35 +00:00
LibJS: Replace JS::Intl::PluralRules::Type with Unicode::PluralForm
The JS::Intl enum was added when implementing the PluralRules constructor. Now that LibUnicode has a plural rules implementation, replace the JS::Intl enum with the analagous Unicode enum.
This commit is contained in:
parent
2982aa0373
commit
670bd066a5
2 changed files with 5 additions and 32 deletions
|
@ -14,27 +14,4 @@ PluralRules::PluralRules(Object& prototype)
|
|||
{
|
||||
}
|
||||
|
||||
void PluralRules::set_type(StringView type)
|
||||
{
|
||||
if (type == "cardinal"sv) {
|
||||
m_type = Type::Cardinal;
|
||||
} else if (type == "ordinal"sv) {
|
||||
m_type = Type::Ordinal;
|
||||
} else {
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
}
|
||||
|
||||
StringView PluralRules::type_string() const
|
||||
{
|
||||
switch (m_type) {
|
||||
case Type::Cardinal:
|
||||
return "cardinal"sv;
|
||||
case Type::Ordinal:
|
||||
return "ordinal"sv;
|
||||
default:
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue