Bug 112161 - Localizations are broken in WK2 in the Web Inspector
Summary: Localizations are broken in WK2 in the Web Inspector
Status: RESOLVED DUPLICATE of bug 112091
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebKit2 (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Timothy Hatcher
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2013-03-12 09:41 PDT by Timothy Hatcher
Modified: 2013-03-12 12:45 PDT (History)
4 users (show)

See Also:


Attachments
Proposed Change (6.94 KB, patch)
2013-03-12 09:45 PDT, Timothy Hatcher
timothy: review-
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Timothy Hatcher 2013-03-12 09:41:15 PDT
The WebProcess is always picking English.

<rdar://problem/13024065>
Comment 1 Radar WebKit Bug Importer 2013-03-12 09:41:50 PDT
<rdar://problem/13401023>
Comment 2 Timothy Hatcher 2013-03-12 09:45:20 PDT
Created attachment 192755 [details]
Proposed Change
Comment 3 Timothy Hatcher 2013-03-12 12:19:39 PDT
Comment on attachment 192755 [details]
Proposed Change

Tim Horton fixed this yesterday in http://trac.webkit.org/changeset/145458.
Comment 4 Tim Horton 2013-03-12 12:29:44 PDT
View in context: https://bugs.webkit.org/attachment.cgi?id=192755&action=review

> Source/WebKit2/ChangeLog:3
> +        Make localizations work again in the Web Inspector with WebKit2.

It's all about the Web Inspector with you :)

> Source/WebKit2/ChangeLog:5
> +        At some point CFBundleAllowMixedLocalizations was lost from the Info.plsit of the WebProcess.

Typo plist.

> Source/WebKit2/Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.h:89
> +        // FIXME: This should be moved to ChildProcessMac. The Web Inspector needs it to pick the right localizedStrings.js file.

Probably we should move it! Also, any injected bundle bits that want to use localized frameworks are also affected, not just the inspector.

> Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm:210
> +    RetainPtr<CFStringRef> cfLocalization(AdoptCF, WKCopyCFLocalizationPreferredName(NULL));

I think we use the = adoptCF() thing instead of the constructor-style adoption now.

> Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm:217
> +    xpc_dictionary_set_string(bootstrapMessage, "localization", localization.data());

Nothing is reading this out of the xpc bootstrap dictionary? What's the point, then?

> Source/WebKit2/WebProcess/EntryPoint/mac/LegacyProcess/Info.plist:36
> +	<key>CFBundleAllowMixedLocalizations</key>
> +	<true/>

I did this part (and the other two Info.plists) yesterday in http://trac.webkit.org/changeset/145458
Comment 5 Timothy Hatcher 2013-03-12 12:43:49 PDT
Goes to show I need to update to TOT before fixing bugs.

No need to land this just to fix a comment. Nothing to see here.
Comment 6 Timothy Hatcher 2013-03-12 12:44:19 PDT

*** This bug has been marked as a duplicate of bug 112091 ***
Comment 7 Tim Horton 2013-03-12 12:45:15 PDT
(In reply to comment #5)
> Goes to show I need to update to TOT before fixing bugs.
> 
> No need to land this just to fix a comment. Nothing to see here.

Well, if you want to make passing the localization from the UIProcess to the Web processes and services work, that is still something to fix :D