Open
Bug 1632302
Opened 4 years ago
Updated 4 years ago
mozilla::intl::Locale fails to parse a lang tag that includes extension subtags
Categories
(Core :: Internationalization, defect, P3)
Core
Internationalization
Tracking
()
NEW
People
(Reporter: jfkthame, Unassigned)
References
Details
This led to incorrect font prefs usage in bug 1618034, because Google Translate serves pages with tags like lang=en-x-mtfrom-it
; the presence of the private extension subtag caused Locale() construction to fail, and resulted in using x-unicode
font prefs instead of x-western
.
(When this is fixed properly, we should remove the hack introduced by bug 1618034 to strip -x- subtags in nsLanguageAtomService::GetUncachedLanguageGroup.)
Comment 1•4 years ago
|
||
We have two paths forward:
- Use
Locale
fromunic-locale
to backMozLocale
- Handle parsing locale identifier into
LanguageIdentifier
by stopping at the first-x-
,-t-
or-u-
and ignoring the rest
I think I'd prefer to start with (2), and extend to (1) if we need to support extensions in Gecko.
Updated•4 years ago
|
Priority: -- → P3
Comment 2•4 years ago
|
||
The severity field is not set for this bug.
:m_kato, could you have a look please?
For more information, please visit auto_nag documentation.
Flags: needinfo?(m_kato)
Updated•4 years ago
|
Severity: -- → S3
Flags: needinfo?(m_kato)
You need to log in
before you can comment on or make changes to this bug.
Description
•