Bug 133126 - [Cocoa] WebProcess doesn't follow localization of UI process when run as a service
Summary: [Cocoa] WebProcess doesn't follow localization of UI process when run as a se...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Alexey Proskuryakov
URL:
Keywords: InRadar
Depends on: 133288
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-20 10:51 PDT by Alexey Proskuryakov
Modified: 2014-07-01 11:42 PDT (History)
3 users (show)

See Also:


Attachments
proposed fix (9.54 KB, patch)
2014-05-20 10:57 PDT, Alexey Proskuryakov
sam: review+
Details | Formatted Diff | Diff
proposed patch (16.37 KB, patch)
2014-06-12 15:25 PDT, Alexey Proskuryakov
thorton: review+
ap: commit-queue-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alexey Proskuryakov 2014-05-20 10:51:03 PDT
We pass -AppleLanguages as an argument when launching child processes, but don't do anything when launching services. So, the service just uses system languages, potentially resulting in a mismatch with application language. One specific way this is observable is when running regression tests with non-English primary language - many accessibility tests fail because they get localized strings from accessibility framework.

<rdar://problem/13396515>
<rdar://problem/16561084>
Comment 1 Alexey Proskuryakov 2014-05-20 10:57:18 PDT
Created attachment 231777 [details]
proposed fix
Comment 2 Tim Horton 2014-05-20 11:06:04 PDT
Comment on attachment 231777 [details]
proposed fix

View in context: https://bugs.webkit.org/attachment.cgi?id=231777&action=review

> Source/WebKit2/Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:94
> +        [[NSUserDefaults standardUserDefaults] setObject:@[[NSString stringWithUTF8String:localization]] forKey:@"AppleLanguages" inDomain:NSArgumentDomain];

I think we put spaces inside the array literals.
Comment 3 Alexey Proskuryakov 2014-05-20 11:45:27 PDT
Committed <http://trac.webkit.org/r169122>.
Comment 4 WebKit Commit Bot 2014-05-26 10:43:36 PDT
Re-opened since this is blocked by bug 133288
Comment 5 Alexey Proskuryakov 2014-06-12 15:25:02 PDT
Created attachment 232999 [details]
proposed patch
Comment 6 Tim Horton 2014-07-01 11:42:07 PDT
http://trac.webkit.org/changeset/170653