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

LibUnicode: Canonicalize the subtag "imperial" to "uksystem"

This commit is contained in:
Timothy Flynn 2021-08-31 11:12:03 -04:00 committed by Linus Groh
parent 2d90144888
commit 335f985b31
2 changed files with 9 additions and 0 deletions

View file

@ -484,6 +484,7 @@ static void perform_hard_coded_key_value_substitutions(String& key, String& valu
{
// FIXME: In the XML export of CLDR, there are some aliases defined in the following files:
// https://github.com/unicode-org/cldr-staging/blob/master/production/common/bcp47/collation.xml
// https://github.com/unicode-org/cldr-staging/blob/master/production/common/bcp47/measure.xml
// https://github.com/unicode-org/cldr-staging/blob/master/production/common/bcp47/transform.xml
//
// There doesn't seem to be a counterpart in the JSON export. Since there aren't many such
@ -499,6 +500,8 @@ static void perform_hard_coded_key_value_substitutions(String& key, String& valu
// but those are semantically incorrect values (they are too long), so they can be skipped.
} else if ((key == "m0"sv) && (value == "names"sv)) {
value = "prprname"sv;
} else if ((key == "ms"sv) && (value == "imperial"sv)) {
value = "uksystem"sv;
}
}