WebKit2 needs to be made localizable
authorweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Mar 2011 19:41:03 +0000 (19:41 +0000)
committerweinig@apple.com <weinig@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 1 Mar 2011 19:41:03 +0000 (19:41 +0000)
commit7bdc3754df6b2cfce00704d2d13eca2efcd6f103
tree264ab293f66a77802c43ddfe0250b096b7a2488b
parent288419de13d3a72ca4e12a7a239f856c81dad93f
WebKit2 needs to be made localizable
https://bugs.webkit.org/show_bug.cgi?id=55483

Reviewed by Timothy Hatcher.

Source/WebCore:

* English.lproj/Localizable.strings: Copied from Source/WebKit/English.lproj/Localizable.strings.
* WebCore.xcodeproj/project.pbxproj:
Move Localizable.strings to WebCore.

* WebCore.exp.in:
Add export for localizedString function.

* platform/LocalizedStrings.h:
* platform/mac/LocalizedStringsMac.mm: Added.
Add function to get localized version of a string from the WebCore bundle.

Source/WebKit:

* StringsNotToBeLocalized.txt: Removed.
* WebKit.xcodeproj/project.pbxproj:
Copied Localizable.strings to WebCore, it can't be removed entirely
yet since Windows is still using it.

Source/WebKit/mac:

* WebCoreSupport/WebPlatformStrategies.mm:
Use WebCore's localizedString function instead of WebLocalizableStrings
since WebCore is now responsible for localization.

Source/WebKit2:

* PluginProcess/mac/PluginProcessMainMac.mm:
* WebProcess/mac/WebProcessMainMac.mm:
Set the default localization from the passed in parameter.

* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
Add the preferred localization as a parameter when launching processes
so that they can set their localization to match the launching app.

* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
Use WebCore's localizedString function on the mac, to actually localize
these strings.

(WebKit::WebPlatformStrategies::imageTitle):
Switch to using replace, instead of concatenation, to give localizers a chance
to rearrange the wording.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@80014 268f45cc-cd09-0410-ab3c-d52691b4dbfc
16 files changed:
Source/WebCore/ChangeLog
Source/WebCore/English.lproj/Localizable.strings [new file with mode: 0644]
Source/WebCore/StringsNotToBeLocalized.txt [moved from Source/WebKit/StringsNotToBeLocalized.txt with 100% similarity]
Source/WebCore/WebCore.exp.in
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/platform/LocalizedStrings.h
Source/WebCore/platform/mac/LocalizedStringsMac.mm [new file with mode: 0644]
Source/WebKit/ChangeLog
Source/WebKit/WebKit.xcodeproj/project.pbxproj
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm
Source/WebKit2/ChangeLog
Source/WebKit2/PluginProcess/mac/PluginProcessMainMac.mm
Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm
Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
Source/WebKit2/WebProcess/mac/WebProcessMainMac.mm