WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
159693
platformUserPreferredLanguages on Mac should not try to put the region into the language
https://bugs.webkit.org/show_bug.cgi?id=159693
Summary
platformUserPreferredLanguages on Mac should not try to put the region into t...
Filip Pizlo
Reported
2016-07-12 15:37:21 PDT
Currently, navigator.language is the thing that we use as the BCP-47 tag in our Intl code when certain APIs are called without a locale argument. That mostly based sense, and is deeply wired into our engine. In
bug 156993
, we made Intl aware of the region as a separate thing from the language by having platformUserPreferredLanguages() return something like a BCP-47 tag that was <language>-<region>. For example, if I told System Preferences that I want to speak English in Poland then we'd get "en-pl". This had the effect of making Intl APIs format dates using Polish formatting, for example. But this is an odd change, since that same function also feeds into navigator.language. "en-pl" isn't what we want there, since my System Preferences settings did not mean to imply that I want to speak Polish-style English. I don't think there is such a thing as Polish-style English (except in funny jokes, maybe). It may be worthwhile to wire the region settings more elegantly into Intl, but if we do that, it should be via a mechanism that is separate from navigator.language.
Attachments
the patch
(6.00 KB, patch)
2016-07-12 15:40 PDT
,
Filip Pizlo
ap
: review+
Details
Formatted Diff
Diff
patch for landing
(8.49 KB, patch)
2016-07-12 15:50 PDT
,
Filip Pizlo
no flags
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
Filip Pizlo
Comment 1
2016-07-12 15:40:47 PDT
Created
attachment 283463
[details]
the patch
Alexey Proskuryakov
Comment 2
2016-07-12 15:43:10 PDT
Comment on
attachment 283463
[details]
the patch rs=me We don't need to revert API tests, do we?
Filip Pizlo
Comment 3
2016-07-12 15:43:55 PDT
(In reply to
comment #2
)
> Comment on
attachment 283463
[details]
> the patch > > rs=me > > We don't need to revert API tests, do we?
We may have to. I will run them and see!
Filip Pizlo
Comment 4
2016-07-12 15:44:33 PDT
(In reply to
comment #3
)
> (In reply to
comment #2
) > > Comment on
attachment 283463
[details]
> > the patch > > > > rs=me > > > > We don't need to revert API tests, do we? > > We may have to. I will run them and see!
Yeah we have to. I will revert
https://trac.webkit.org/changeset/200105/trunk/Tools/TestWebKitAPI/Tests/mac/NavigatorLanguage.mm
.
Filip Pizlo
Comment 5
2016-07-12 15:50:43 PDT
Created
attachment 283465
[details]
patch for landing Also reverted the API test.
Filip Pizlo
Comment 6
2016-07-12 17:09:53 PDT
Landed in
https://trac.webkit.org/changeset/203141
Radar WebKit Bug Importer
Comment 7
2016-07-12 17:10:18 PDT
<
rdar://problem/27313190
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug