mirror of
https://github.com/Alex313031/thorium.git
synced 2025-01-10 03:47:44 -03:00
Update js-display-names.cc
This commit is contained in:
parent
e4fe865607
commit
2e8d3954ef
1 changed files with 3 additions and 1 deletions
|
@ -133,7 +133,9 @@ class LanguageNames : public LocaleDisplayNamesCommon {
|
||||||
// 1.b If IsStructurallyValidLanguageTag(code) is false, throw a RangeError
|
// 1.b If IsStructurallyValidLanguageTag(code) is false, throw a RangeError
|
||||||
// exception.
|
// exception.
|
||||||
icu::Locale l =
|
icu::Locale l =
|
||||||
icu::Locale::createCanonical(icu::Locale::forLanguageTag(code, status).getBaseName());
|
icu::Locale(icu::Locale::forLanguageTag(code, status).getBaseName());
|
||||||
|
// 1.c Set code to CanonicalizeUnicodeLocaleId(code).
|
||||||
|
l.canonicalize(status);
|
||||||
std::string checked = l.toLanguageTag<std::string>(status);
|
std::string checked = l.toLanguageTag<std::string>(status);
|
||||||
|
|
||||||
if (U_FAILURE(status)) {
|
if (U_FAILURE(status)) {
|
||||||
|
|
Loading…
Reference in a new issue