Make WebCore and WebKit2 work with update-webkit-localizable-strings.
authortimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Mar 2011 20:24:59 +0000 (20:24 +0000)
committertimothy@apple.com <timothy@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 29 Mar 2011 20:24:59 +0000 (20:24 +0000)
Source/WebCore: Update WebCore Localizable.strings to contain WebCore, WebKit/mac and WebKit2 strings.

https://webkit.org/b/57354

Reviewed by Sam Weinig.

* English.lproj/Localizable.strings: Updated.
* StringsNotToBeLocalized.txt: Removed. To hard to maintain in WebCore.
* platform/network/cf/LoaderRunLoopCF.h: Remove a single quote in an #error so
extract-localizable-strings does not complain about unbalanced single quotes.

Source/WebKit: Update WebKit Localizable.strings to only contain WebKit/win strings.

https://webkit.org/b/57354

Reviewed by Sam Weinig.

* English.lproj/Localizable.strings: Updated.

Source/WebKit2: Make WebKit2 work with update-webkit-localizable-strings.

https://webkit.org/b/57354

Reviewed by Sam Weinig.

* PluginProcess/mac/PluginProcessMac.mm: Remove UI_STRING macro. Use WebLocalizableStrings.h.
* Shared/WebLocalizableStrings.h: Added.
* UIProcess/API/mac/WKView.mm: Remove UI_STRING macro. Use WebLocalizableStrings.h.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::platformInspectedURLChanged): Use UI_STRING. Remove FIXME.
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Remove UI_STRING macros.
Use WebLocalizableStrings.h.
* WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
(registerErrors): Remove UI_STRING macro. Use WebLocalizableStrings.h.
* WebProcess/mac/WebProcessMac.mm:
(WebKit::WebProcess::platformInitializeWebProcess): Use UI_STRING. Remove FIXME.

* GNUmakefile.am: Added Shared/WebLocalizableStrings.h.
* WebKit2.pro: Ditto.
* WebKit2.xcodeproj/project.pbxproj: Ditto.
* win/WebKit2.vcproj: Ditto.

Tools: Update update-webkit-localizable-strings to understand that WebKit and
WebKit2 strings go in WebCore.

Also make extract-localizable-strings optionally use an exclude file. No individual
warnings are produced about unlocalized strings when there is no exclude file. This
is needed for WebCore, since there are too many bare strings.

https://webkit.org/b/57354

Reviewed by Sam Weinig.

* Scripts/extract-localizable-strings: Support "-" to mean no exclude file.
* Scripts/update-webkit-localizable-strings: Update paths to scan WebCore and WebKit2.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@82308 268f45cc-cd09-0410-ab3c-d52691b4dbfc

21 files changed:
Source/WebCore/ChangeLog
Source/WebCore/English.lproj/Localizable.strings
Source/WebCore/StringsNotToBeLocalized.txt [deleted file]
Source/WebCore/platform/network/cf/LoaderRunLoopCF.h
Source/WebKit/ChangeLog
Source/WebKit/English.lproj/Localizable.strings
Source/WebKit2/ChangeLog
Source/WebKit2/GNUmakefile.am
Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm
Source/WebKit2/Shared/WebLocalizableStrings.h [new file with mode: 0644]
Source/WebKit2/UIProcess/API/mac/WKView.mm
Source/WebKit2/UIProcess/mac/WebInspectorProxyMac.mm
Source/WebKit2/WebKit2.pro
Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
Source/WebKit2/WebProcess/WebCoreSupport/mac/WebErrorsMac.mm
Source/WebKit2/WebProcess/mac/WebProcessMac.mm
Source/WebKit2/win/WebKit2.vcproj
Tools/ChangeLog
Tools/Scripts/extract-localizable-strings
Tools/Scripts/update-webkit-localizable-strings

index a80d8c40442a88f22f74641e685b54f73ba4976d..5ffb0694c31abe791951e308c36dbc2d8f940e6f 100644 (file)
@@ -1,3 +1,16 @@
+2011-03-29  Timothy Hatcher  <timothy@apple.com>
+
+        Update WebCore Localizable.strings to contain WebCore, WebKit/mac and WebKit2 strings.
+
+        https://webkit.org/b/57354
+
+        Reviewed by Sam Weinig.
+
+        * English.lproj/Localizable.strings: Updated.
+        * StringsNotToBeLocalized.txt: Removed. To hard to maintain in WebCore.
+        * platform/network/cf/LoaderRunLoopCF.h: Remove a single quote in an #error so
+        extract-localizable-strings does not complain about unbalanced single quotes.
+
 2011-03-29  Sheriff Bot  <webkit.review.bot@gmail.com>
 
         Unreviewed, rolling out r82295 and r82300.
index 5bf80057065d5d6b307ec1f8d7cc208b9cb7a83d..ee8a2b703b9b7cd1a56668ca6987c91ca22820f9 100644 (file)
Binary files a/Source/WebCore/English.lproj/Localizable.strings and b/Source/WebCore/English.lproj/Localizable.strings differ
diff --git a/Source/WebCore/StringsNotToBeLocalized.txt b/Source/WebCore/StringsNotToBeLocalized.txt
deleted file mode 100644 (file)
index c505ec2..0000000
+++ /dev/null
@@ -1,904 +0,0 @@
-"    "
-" "
-" #%*[^\n\r]%*[\n\r]"
-" %32[^# \t\n\r]%*[^# \t\n\r] "
-" %@"
-" (KHTML, like Gecko) "
-" (KHTML, like Gecko)"
-" (clipped)"
-" (clipping)"
-" (reflection)"
-" *POST*"
-" *target*"
-" >>>"
-" Mac OS X %@) AppleWebKit/%@ (KHTML, like Gecko) %@"
-" Mac OS X %@) AppleWebKit/%@ (KHTML, like Gecko)"
-" Version/3.2.1"
-" class=\"%@\""
-" id=\"%@\""
-"#"
-"%"
-"%.0f"
-"%.1lf"
-"%.2lu/%.2lu/%.10lu-%.10lu.cache"
-"%.2u/%.2u/%.10u-%.10u.cache"
-"%0.fpx"
-"%02d:%02d"
-"%20"
-"%2d) "
-"%4u"
-"%@ %.0fpx %.0fpx %.0fpx"
-"%@ %.0fpx %.0fpx"
-"%@ %@"
-"%@%@"
-"%@, %@"
-"%@-%d"
-"%@/%s"
-"%@/Library/Preferences/%@"
-"%@:%u"
-"%@://%@"
-"%@://%@/%@"
-"%@://%@:%d"
-"%d"
-"%d:%02d:%02d"
-"%d_%d"
-"%d_%d_%d"
-"%dpx"
-"%ld"
-"%s%01d:%02d:%02d"
-"%s%02d:%02d"
-"%s%02d:%02d:%02d"
-"%u"
-"&ie=UTF-8&oe=UTF-8"
-"(%.0f, %.0f)"
-") AppleWebKit/"
-"+"
-"+ve z-order list"
-", "
-","
-"-"
-"-1px"
-"-createPluginMIMETypesPreferences"
-"-khtml-text-decorations-in-effect"
-"-ve z-order list"
-"."
-".download"
-".html"
-".jpg"
-".svg"
-".xhtml"
-"/"
-"/Frameworks/PDFKit.framework"
-"/Library/Internet Plug-Ins"
-"/System/Library/Frameworks/ApplicationServices.framework/Frameworks/LangAnalysis.framework/LangAnalysis"
-"/System/Library/Frameworks/Carbon.framework/Frameworks/HIToolbox.framework/HIToolbox"
-"/System/Library/Frameworks/CoreVideo.framework"
-"/Volumes"
-"/tmp/XXXXXX.tiff"
-"0"
-"062AEEE3-9E42-44DC-A8A9-236B216FE011"
-"1"
-"10.1"
-"10.1.53.60"
-"1000"
-"12px"
-"13"
-"16"
-"1800"
-"1px"
-"2"
-"3.1"
-"3dbd565b-db22-4d88-8e0e-778bde54524a"
-"420+"
-"5CACD637-F82F-491F-947A-5DCA38AA0FEA"
-"6EB8D98F-2723-4472-88D3-5936F9D6E631"
-"7"
-"7.1"
-"9"
-":"
-"://"
-":/?#"
-"; "
-"; WOW64"
-"; Win64; x64"
-"; Win64; IA64"
-"<!"
-"<%@ %@>"
-"<?"
-"<a "
-"<channel"
-"<feed"
-"<html"
-"<html>"
-"<rdf"
-"<rss"
-"<script"
-"<title>"
-">,?"
-"?"
-"@"
-"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-."
-"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+.-"
-"ARIAApplicationAlert"
-"ARIAApplicationAlertDialog"
-"ARIAApplicationDialog"
-"ARIAApplicationLog"
-"ARIAApplicationMarquee"
-"ARIAApplicationStatus"
-"ARIAApplicationTimer"
-"ARIADocument"
-"ARIADocumentArticle"
-"ARIADocumentMath"
-"ARIADocumentNote"
-"ARIADocumentRegion"
-"ARIALandmarkApplication"
-"ARIALandmarkBanner"
-"ARIALandmarkComplementary"
-"ARIALandmarkContentInfo"
-"ARIALandmarkMain"
-"ARIALandmarkNavigation"
-"ARIALandmarkSearch"
-"ARIATabPanel"
-"ARIAUserInterfaceTooltip"
-"AXEnhancedUserInterface"
-"AccessibleBase"
-"AccessibleObjectFromWindow"
-"AllowsUndo"
-"Apple Web Archive pasteboard type"
-"AppleKeyboardUIMode"
-"AppleTextDirection"
-"AudioElement"
-"BEGIN:VCALENDAR"
-"BEGIN:VCARD"
-"BP_CreatePluginMIMETypesPreferences"
-"CFBundleShortVersionString"
-"CFDictionaryPropertyBag"
-"CSS"
-"Change Back to \\U201C%@\\U201D"
-"Content-Encoding"
-"Content-Length"
-"Content-Type"
-"ControlsPanel"
-"CurrentTimeDisplay"
-"D"
-"DCMDictionaryServiceWindowShow"
-"DELEGATE METHODS"
-"DOCBASE"
-"DOMHTMLObjectElement"
-"DOMNode"
-"DYLD_FRAMEWORK_PATH"
-"DefaultDownloadDelegate"
-"DefaultPolicyDelegate"
-"DeleteBackward"
-"DeleteForward"
-"DeleteWordBackward"
-"DeleteWordForward"
-"DisableWebKitDeveloperExtras"
-"FAKETRACKPOINTHSCROLLBAR"
-"FAKETRACKPOINTVSCROLLBAR"
-"FD3B2381-0BB6-4B59-AF09-0E599C8901CF"
-"FastMallocCommittedVMBytes"
-"FastMallocFreeListBytes"
-"FastMallocReservedVMBytes"
-"FrameName"
-"FullscreenButton"
-"GCS_COMPATTR"
-"GEN_DOMObject"
-"GET"
-"GetNativeSystemInfo"
-"GroupName"
-"HIDictionaryWindowShow"
-"HTTP "
-"Helvetica"
-"HideClosedCaptionsButton"
-"HostedNetscapePluginStream"
-"IDNScriptWhiteList"
-"IDNScriptWhiteList.txt"
-"IMM32.DLL"
-"IMN_CHANGECANDIDATE"
-"IMN_CLOSECANDIDATE"
-"IMN_CLOSESTATUSWINDOW"
-"IMN_GUIDELINE"
-"IMN_OPENCANDIDATE"
-"IMN_OPENSTATUSWINDOW"
-"IMN_SETCANDIDATEPOS"
-"IMN_SETCOMPOSITIONFONT"
-"IMN_SETCOMPOSITIONWINDOW"
-"IMN_SETCONVERSIONMODE"
-"IMN_SETOPENSTATUS"
-"IMN_SETSENTENCEMODE"
-"IMN_SETSTATUSWINDOWPOS"
-"IMR_CANDIDATEWINDOW"
-"IMR_COMPOSITIONFONT"
-"IMR_COMPOSITIONWINDOW"
-"IMR_CONFIRMRECONVERTSTRING"
-"IMR_DOCUMENTFEED"
-"IMR_QUERYCHARPOSITION"
-"IMR_RECONVERTSTRING"
-"If-Match"
-"If-Modified-Since"
-"If-None-Match"
-"If-Range"
-"If-Unmodified-Since"
-"ImmAssociateContextEx"
-"ImmGetCompositionStringW"
-"ImmGetContext"
-"ImmNotifyIME"
-"ImmReleaseContext"
-"ImmSetCandidateWindow"
-"ImmSetOpenStatus"
-"IncludeDebugMenu"
-"InsertBacktab"
-"InsertNewline"
-"InsertTab"
-"Intel"
-"IsWow64Process"
-"JSDOMWindowShell"
-"JavaScript"
-"JavaScriptFreeSize"
-"JavaScriptHeapSize"
-"JavaScriptJITSize"
-"JavaScriptStackSize"
-"Joy!peff"
-"LTR"
-"Library/Caches"
-"Library/Internet Plug-Ins"
-"LresultFromObject"
-"MIME\\Database\\Content Type"
-"MailQuirksUserScript"
-"MainPageJavaScript.js"
-"MemoryStream"
-"MenuCommands"
-"Microsoft/com.microsoft.Messenger"
-"MoveDown"
-"MoveDownAndModifySelection"
-"MoveLeft"
-"MoveLeftAndModifySelection"
-"MovePageDown"
-"MovePageDownAndModifySelection"
-"MovePageUp"
-"MovePageUpAndModifySelection"
-"MoveRight"
-"MoveRightAndModifySelection"
-"MoveToBeginningOfDocument"
-"MoveToBeginningOfDocumentAndModifySelection"
-"MoveToBeginningOfLine"
-"MoveToBeginningOfLineAndModifySelection"
-"MoveToEndOfDocument"
-"MoveToEndOfDocumentAndModifySelection"
-"MoveToEndOfLine"
-"MoveToEndOfLineAndModifySelection"
-"MoveUp"
-"MoveUpAndModifySelection"
-"MoveWordLeft"
-"MoveWordLeftAndModifySelection"
-"MoveWordRight"
-"MoveWordRightAndModifySelection"
-"Mozilla/5.0 (Macintosh; "
-"Mozilla/5.0 ("
-"MuteButton"
-"NP_GetEntryPoints"
-"NP_Initialize"
-"NP_Shutdown"
-"NSAlert"
-"NSAllowContinuousSpellChecking"
-"NSAllowsBaseWritingDirectionKeyBindings"
-"NSApplicationIcon"
-"NSCarbonWindow"
-"NSErrorFailingURLKey"
-"NSErrorFailingURLStringKey"
-"NSEvent"
-"NSView"
-"NeXT smart paste pasteboard type"
-"NetscapePluginInstanceProxy"
-"PDFDocument"
-"PDFPreviewView"
-"PDFView"
-"PDFViewChangedPage"
-"PDFViewDisplayModeChanged"
-"PDFViewScaleChanged"
-"POST"
-"PPC"
-"PauseButton"
-"PlayButton"
-"ProxyRuntimeObject"
-"Quartz.framework"
-"RTL"
-"Referer"
-"ReturnToRealtimeButton"
-"RewindButton"
-"SAMILang"
-"SAMIStyle"
-"SCROLLBAR"
-"Safari.exe"
-"ScrollerRectangle"
-"SeekBackButton"
-"SeekForwardButton"
-"SelectAll"
-"ShowClosedCaptionsButton"
-"Slider"
-"SliderThumb"
-"Software\\Alps\\Apoint\\TrackPoint"
-"Software\\Lenovo\\TrackPoint"
-"Software\\Lenovo\\UltraNav"
-"Software\\Synaptics\\SynTPEnh\\UltraNavPS2"
-"Software\\Synaptics\\SynTPEnh\\UltraNavUSB"
-"StatusDisplay"
-"TSUpdateCheck"
-"TimeRemainingDisplay"
-"Times"
-"ToggleBold"
-"ToggleItalic"
-"U+0009"
-"U+001B"
-"UTF-8"
-"UnMuteButton"
-"UseBackForwardList"
-"User-Agent"
-"VideoElement"
-"Volumes"
-"W"
-"WEBKIT_UNSET_DYLD_FRAMEWORK_PATH"
-"WebActionButtonKey"
-"WebActionElementKey"
-"WebActionFormKey"
-"WebActionModifierFlagsKey"
-"WebActionNavigationTypeKey"
-"WebActionOriginalURLKey"
-"WebActionPropertyBag"
-"WebArchive"
-"WebAuthenticationPanel"
-"WebBackForwardList"
-"WebBackForwardList:\n"
-"WebCache"
-"WebCookieManager"
-"WebCoreStatistics"
-"WebDataRequest"
-"WebDataSource"
-"WebDatabaseDidModifyDatabaseNotification"
-"WebDatabaseDidModifyOriginNotification"
-"WebDatabaseDirectory"
-"WebDatabaseDisplayNameKey"
-"WebDatabaseExpectedSizeKey"
-"WebDatabaseIdentifierKey"
-"WebDatabaseManager"
-"WebDatabaseUsageKey"
-"WebDocumentLoader"
-"WebDownload"
-"WebDropSource"
-"WebElementDOMNode"
-"WebElementFrame"
-"WebElementImage"
-"WebElementImageAltString"
-"WebElementImageRect"
-"WebElementImageURL"
-"WebElementIsContentEditableKey"
-"WebElementIsInScrollBar"
-"WebElementIsSelected"
-"WebElementLinkIsLive"
-"WebElementLinkLabel"
-"WebElementLinkTitle"
-"WebElementLinkURL"
-"WebElementMediaURL"
-"WebElementPropertyBag"
-"WebElementSpellingToolTip"
-"WebElementTargetFrame"
-"WebElementTitle"
-"WebError"
-"WebFrame"
-"WebFrameCanSuspendActiveDOMObjectsKey"
-"WebFrameHasPluginsKey"
-"WebFrameHasUnloadListenerKey"
-"WebFrameMainDocumentErrorKey"
-"WebFramePolicyListener"
-"WebFrameUsesApplicationCacheKey"
-"WebFrameUsesDatabasesKey"
-"WebFrameUsesGeolocationKey"
-"WebGeolocationPolicyListener"
-"WebGeolocationPosition"
-"WebHTMLRepresentation"
-"WebHistory"
-"WebHistoryAllItemsRemovedNotification"
-"WebHistoryDates"
-"WebHistoryFileVersion"
-"WebHistoryItem"
-"WebHistoryItemChangedNotification"
-"WebHistoryItems"
-"WebHistoryItemsAddedNotification"
-"WebHistoryItemsDiscardedWhileLoadingNotification"
-"WebHistoryItemsRemovedNotification"
-"WebHistoryLoadedNotification"
-"WebHistorySavedNotification"
-"WebIconDatabase"
-"WebIconDatabaseDidAddIconNotification"
-"WebIconDatabaseDidRemoveAllIconsNotification"
-"WebIconDatabaseDirectoryDefaultsKey"
-"WebIconDatabaseEnabled"
-"WebIconDatabaseImportDirectoryDefaultsKey"
-"WebIconDatabaseVersion"
-"WebIconNotificationUserInfoURLKey"
-"WebInspector"
-"WebInspectorPointer"
-"WebInspectorPreferences"
-"WebInspectorWindowClass"
-"WebJavaScriptCollector"
-"WebJavaScriptTextInputPanel"
-"WebKitClassFactory"
-"WebKitDeveloperExtras"
-"WebKitErrorDomain"
-"WebKitErrorMIMETypeKey"
-"WebKitErrorPlugInNameKey"
-"WebKitErrorPlugInPageURLStringKey"
-"WebKitHistoryAgeInDaysLimit"
-"WebKitHistoryItemLimit"
-"WebKitInspectorHiddenPanels"
-"WebKitLocalCache"
-"WebKitLogLevel"
-"WebKitOmitPDFSupport"
-"WebKitOriginalBottomMargin"
-"WebKitOriginalTopMargin"
-"WebKitPDFs-XXXXXX"
-"WebKitPlugInStreamXXXXXX"
-"WebKitPluginHost.app"
-"WebKitPreferences.plist"
-"WebKitStatistics"
-"WebLoginWindowDidSwitchFromUserNotification"
-"WebLoginWindowDidSwitchToUserNotification"
-"WebMainResource"
-"WebModalDialogPretendWindow"
-"WebMutableURLRequest"
-"WebNavigationData"
-"WebNodeHighlightPointer"
-"WebNodeHighlightWindowClass"
-"WebNotification"
-"WebNotificationCenter"
-"WebPageCacheDataSourceKey"
-"WebPageCacheDocumentViewKey"
-"WebPageCacheEntryDateKey"
-"WebPlugInAttributesKey"
-"WebPlugInBaseURLKey"
-"WebPlugInContainerKey"
-"WebPlugInContainingElementKey"
-"WebPlugInModeKey"
-"WebPlugInShouldLoadMainResourceKey"
-"WebPluginAttributes"
-"WebPluginBaseURL"
-"WebPluginContainer"
-"WebPluginDescription"
-"WebPluginExtensions"
-"WebPluginLocalizationName"
-"WebPluginMIMETypes"
-"WebPluginMIMETypesFilename"
-"WebPluginName"
-"WebPluginTypeDescription"
-"WebPluginTypeEnabled"
-"WebPluginWillPresentNativeUserInterface"
-"WebPreferences"
-"WebPreferences%d"
-"WebPreferencesChangedNotification"
-"WebPreferencesRemovedNotification"
-"WebProgressEstimateChangedNotification"
-"WebProgressFinishedNotification"
-"WebProgressStartedNotification"
-"WebResource"
-"WebResourceData"
-"WebResourceFrameName"
-"WebResourceHandler"
-"WebResourceMIMEType"
-"WebResourceResponse"
-"WebResourceTextEncodingName"
-"WebResourceURL"
-"WebScriptErrorDescription"
-"WebScriptErrorDomain"
-"WebScriptErrorLineNumber"
-"WebScriptObject"
-"WebScriptWorld"
-"WebScrollBar"
-"WebSecurityOrigin"
-"WebSerializedJSValue"
-"WebSiteURLToIconURLKey"
-"WebSubframeArchives"
-"WebSubresources"
-"WebTextRenderer"
-"WebURLAuthenticationChallenge"
-"WebURLAuthenticationChallengeSender"
-"WebURLCredential"
-"WebURLProtectionSpace"
-"WebURLResponse"
-"WebURLsWithTitlesPboardType"
-"WebUserContentURLPattern"
-"WebView"
-"WebViewDidBeginEditingNotification"
-"WebViewDidChangeNotification"
-"WebViewDidChangeSelectionNotification"
-"WebViewDidChangeTypingStyleNotification"
-"WebViewDidEndEditingNotification"
-"WebViewWindowClass"
-"WebWorkersPrivate"
-"Windows "
-"Windows 3.1"
-"Windows 95"
-"Windows 98"
-"Windows 98; Win 9x 4.90"
-"Windows CE"
-"Windows CE "
-"Windows CE .NET"
-"Windows NT "
-"WinNT4.0"
-"WmvPlugin"
-"XSL"
-"XXXXXX-"
-"\"@?"
-"\"\\"
-"\0"
-"\0*.*\0\0"
-"\\"
-"\\StringFileInfo\\%04x%04x\\ProductVersion"
-"\\StringFileInfo\\040904b0\\ProductVersion"
-"\\VarFileInfo\\Translation"
-"\\WebKit.resources"
-"\n        "
-"\n    "
-"\n"
-"\n--------------------------------------------\n"
-"\r"
-"\xFF\xD8\xFF\xE0"
-"_WebViewDidStartAcceleratedCompositing"
-"_top"
-"a"
-"ab"
-"about:"
-"acceleratedCompositingEnabled"
-"actions"
-"anchorPoint"
-"apple-dashboard://stylesheet"
-"applewebdata"
-"applewebdata://%@"
-"application.pdf"
-"application/atom+xml"
-"application/octet-stream"
-"application/pdf"
-"application/postscript"
-"application/rss+xml"
-"application/x-apple-msg-attachment"
-"application/x-java-applet"
-"application/x-snkp"
-"application/x-webarchive"
-"application/xhtml+xml"
-"attributeKeys"
-"attributeValues"
-"b"
-"basefont"
-"bounds"
-"bundlePath"
-"c"
-"canGoBack"
-"canGoForward"
-"com.RealNetworks.RealOne Player"
-"com.adiumX.adiumX"
-"com.adobe.Acrobat"
-"com.adobe.Acrobat.Pro"
-"com.adobe.Contribute"
-"com.adobe.InCopy"
-"com.adobe.InDesign"
-"com.adobe.Installers.Setup"
-"com.adobe.Reader"
-"com.adobe.Soundbooth"
-"com.adobe.distiller"
-"com.adobe.dreamweaver-9.0"
-"com.alientechnology.Proteus"
-"com.app4mac.KidsBrowsercom.app4mac.wKiosk"
-"com.apple.Aperture"
-"com.apple.AppKit"
-"com.apple.Automator"
-"com.apple.Automator."
-"com.apple.AutomatorRunner"
-"com.apple.Dashcode"
-"com.apple.Dictionary"
-"com.apple.HIWebView"
-"com.apple.JavaAppletPlugin"
-"com.apple.JavaPluginCocoa"
-"com.apple.KeyboardUIModeDidChange"
-"com.apple.Mail"
-"com.apple.QuickTime Plugin.plugin"
-"com.apple.Safari"
-"com.apple.WebCore"
-"com.apple.WebKit"
-"com.apple.WebKit.PluginAgent"
-"com.apple.Xcode"
-"com.apple.dashboard.client"
-"com.apple.helpviewer"
-"com.apple.hiview"
-"com.apple.iChat"
-"com.apple.iWeb"
-"com.apple.installer"
-"com.apple.mail"
-"com.apple.quicktime.webplugin"
-"com.apple.universalaccess"
-"com.barebones.bbedit"
-"com.barebones.textwrangler"
-"com.barebones.yojimbo"
-"com.culturedcode.xyle"
-"com.e-frontier.shade10"
-"com.equinux.iSale4"
-"com.equinux.iSale5"
-"com.freeverse.bumpercar"
-"com.growl.growlframework"
-"com.intrarts.PandoraMan"
-"com.karelia.Sandvox"
-"com.lizardtech.NPDjVu"
-"com.macrabbit.CSSEdit"
-"com.macromates.textmate"
-"com.macromedia.Flash Player.plugin"
-"com.macromedia.fireworks"
-"com.microsoft.SilverlightPlugin"
-"com.microsoft.WMP.defaultplugin"
-"com.omnigroup.OmniWeb5"
-"com.panic.Coda"
-"com.ranchero.NetNewsWire"
-"com.realmacsoftware.rapidweaverpro"
-"com.red-sweater.marsedit"
-"com.sunrisebrowser.Sunrise"
-"com.thinkmac.NewsLife"
-"com.yahoo.messenger3"
-"composited for plug-in, video or WebGL"
-"composited: container layer"
-"composited: tiled layer"
-"contents"
-"contentsRect"
-"cp949"
-"cpuType"
-"de.codingmonkeys.SubEthaEdit"
-"dir"
-"displayTitle"
-"doctype"
-"estimatedProgress"
-"fi.karppinen.Pyro"
-"file:"
-"file:///System/Library/PrivateFrameworks/DashboardClient.framework/Resources/widget.css"
-"frameName"
-"fsVideoAudioVolumeHigh"
-"fsVideoAudioVolumeLow"
-"fsVideoExitFullscreen"
-"fsVideoPause"
-"fsVideoPlay"
-"ftp:"
-"fullFrame"
-"fullscreenVideeoHUDWindowClass"
-"groupName"
-"htm"
-"html"
-"http"
-"http:"
-"http://"
-"http://www.google.com/search?q="
-"https"
-"https:"
-"i"
-"icon.db"
-"image.pict"
-"image.png"
-"image.tiff"
-"image/jpeg"
-"image/pict"
-"image/png"
-"image/svg+xml"
-"image/tiff"
-"img"
-"info.colloquy"
-"insertText:"
-"isLoading"
-"isindex"
-"javascript:"
-"jpeg"
-"js"
-"kernel32.dll"
-"kioskmode"
-"ks_c_5601-1987"
-"kungfoo.tv.ecto"
-"lastVisitWasFailure"
-"lastVisitWasHTTPNonGet"
-"lastVisitedDate"
-"line-through"
-"lineNumber"
-"localhost"
-"localized string not found"
-"localizedStrings"
-"mailto:"
-"mainFrameDocument"
-"mainFrameIcon"
-"mainFrameTitle"
-"mainFrameURL"
-"mimeType"
-"net.hmdt-web.Shiira"
-"normal flow list"
-"oleacc.dll"
-"opacity"
-"org.xlife.NewsFire"
-"pluginHostPath"
-"pluginspage"
-"position"
-"privateBrowsingEnabled"
-"public.url"
-"public.url-name"
-"r"
-"r+b"
-"rect:%@ clip:%@ type:%s"
-"redirectURLs"
-"rgb(%.0f,%.0f,%.0f)"
-"rgba(%.0f,%.0f,%.0f,%f)"
-"s"
-"sourceURL"
-"src"
-"sub"
-"sublayerTransform"
-"sublayers"
-"text/calendar"
-"text/directory"
-"text/html"
-"text/ldif"
-"text/pdf"
-"text/plain"
-"text/qif"
-"text/rtf"
-"text/vcalendar"
-"text/vcard"
-"text/x-calendar"
-"text/x-csv"
-"text/x-qif"
-"text/x-vcalendar"
-"text/x-vcard"
-"text/x-vcf"
-"transform"
-"txt"
-"u"
-"uk.co.opencommunity.vienna2"
-"userAgent"
-"userInfo"
-"utf-16"
-"visibleName"
-"visitCount"
-"webkit-fake-url"
-"webplugin"
-"x"
-"x-apple-web-kit/"
-"xml"
-"xsl"
-"{A3676398-4485-4a9d-87DC-CB5A40E6351D}"
-"~/Library/Icons"
-"~/Library/WebKit/Databases"
-WebKit/mac/History/WebHistoryItem.mm:" in \"%@\""
-WebKit/mac/History/WebHistoryItem.mm:"children"
-WebKit/mac/History/WebHistoryItem.mm:"title"
-WebKit/mac/Misc/WebCache.mm:"Images"
-WebKit/mac/Misc/WebKitLogging.h:"<not running on main thread>"
-WebKit/mac/Misc/WebKitVersionChecks.m:"WebKit"
-WebKit/mac/Misc/WebNSNotificationCenterExtras.m:"name"
-WebKit/mac/Misc/WebNSNotificationCenterExtras.m:"object"
-WebKit/mac/Misc/WebNSURLExtras.mm:"file"
-WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm:" OK\n"
-WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm:": "
-WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm:"identity"
-WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm:"localization"
-WebKit/mac/Plugins/Hosted/ProxyInstance.mm
-WebKit/mac/Plugins/WebBaseNetscapePluginView.mm:"basic"
-WebKit/mac/Plugins/WebBaseNetscapePluginView.mm:"digest"
-WebKit/mac/Plugins/WebBaseNetscapePluginView.mm:"true"
-WebKit/mac/Plugins/WebBasePluginPackage.mm:"Java Applet Plugin Enabler"
-WebKit/mac/Plugins/WebNetscapePluginPackage.mm:"RealPlayer Plugin"
-WebKit/mac/Plugins/WebNetscapePluginPackage.mm:"main"
-WebKit/mac/Plugins/WebNetscapePluginStream.mm:" OK\n"
-WebKit/mac/Plugins/WebNetscapePluginStream.mm:": "
-WebKit/mac/Plugins/WebNetscapePluginStream.mm:"identity"
-WebKit/mac/Plugins/WebNetscapePluginView.mm:"height"
-WebKit/mac/Plugins/WebNetscapePluginView.mm:"width"
-WebKit/mac/WebCoreSupport/WebChromeClient.mm:"dialog"
-WebKit/mac/WebCoreSupport/WebChromeClient.mm:"fullscreen"
-WebKit/mac/WebCoreSupport/WebChromeClient.mm:"height"
-WebKit/mac/WebCoreSupport/WebChromeClient.mm:"menuBarVisible"
-WebKit/mac/WebCoreSupport/WebChromeClient.mm:"message"
-WebKit/mac/WebCoreSupport/WebChromeClient.mm:"resizable"
-WebKit/mac/WebCoreSupport/WebChromeClient.mm:"scrollbarsVisible"
-WebKit/mac/WebCoreSupport/WebChromeClient.mm:"statusBarVisible"
-WebKit/mac/WebCoreSupport/WebChromeClient.mm:"toolBarVisible"
-WebKit/mac/WebCoreSupport/WebChromeClient.mm:"width"
-WebKit/mac/WebCoreSupport/WebChromeClient.mm:"y"
-WebKit/mac/WebCoreSupport/WebEditorClient.mm:"Down"
-WebKit/mac/WebCoreSupport/WebEditorClient.mm:"Enter"
-WebKit/mac/WebCoreSupport/WebEditorClient.mm:"Up"
-WebKit/mac/WebCoreSupport/WebEditorClient.mm:"applet"
-WebKit/mac/WebCoreSupport/WebEditorClient.mm:"body"
-WebKit/mac/WebCoreSupport/WebEditorClient.mm:"center"
-WebKit/mac/WebCoreSupport/WebEditorClient.mm:"font"
-WebKit/mac/WebCoreSupport/WebEditorClient.mm:"head"
-WebKit/mac/WebCoreSupport/WebEditorClient.mm:"menu"
-WebKit/mac/WebCoreSupport/WebEditorClient.mm:"object"
-WebKit/mac/WebCoreSupport/WebEditorClient.mm:"strike"
-WebKit/mac/WebCoreSupport/WebEditorClient.mm:"style"
-WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm:"height"
-WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm:"width"
-WebKit/mac/WebCoreSupport/WebInspectorClient.mm:"Menlo"
-WebKit/mac/WebCoreSupport/WebInspectorClient.mm:"Monaco"
-WebKit/mac/WebCoreSupport/WebInspectorClient.mm:"Web Inspector 2"
-WebKit/mac/WebCoreSupport/WebInspectorClient.mm:"inspector"
-WebKit/mac/WebView/WebDashboardRegion.mm:"Circle"
-WebKit/mac/WebView/WebDashboardRegion.mm:"None"
-WebKit/mac/WebView/WebDashboardRegion.mm:"Rectangle"
-WebKit/mac/WebView/WebDashboardRegion.mm:"Unknown"
-WebKit/mac/WebView/WebHTMLView.mm:"'%@'"
-WebKit/mac/WebView/WebHTMLView.mm:"Version:"
-WebKit/mac/WebView/WebHTMLView.mm:"applet"
-WebKit/mac/WebView/WebHTMLView.mm:"baseline"
-WebKit/mac/WebView/WebHTMLView.mm:"black"
-WebKit/mac/WebView/WebHTMLView.mm:"body"
-WebKit/mac/WebView/WebHTMLView.mm:"bold"
-WebKit/mac/WebView/WebHTMLView.mm:"center"
-WebKit/mac/WebView/WebHTMLView.mm:"direction"
-WebKit/mac/WebView/WebHTMLView.mm:"font"
-WebKit/mac/WebView/WebHTMLView.mm:"head"
-WebKit/mac/WebView/WebHTMLView.mm:"italic"
-WebKit/mac/WebView/WebHTMLView.mm:"menu"
-WebKit/mac/WebView/WebHTMLView.mm:"none"
-WebKit/mac/WebView/WebHTMLView.mm:"normal"
-WebKit/mac/WebView/WebHTMLView.mm:"object"
-WebKit/mac/WebView/WebHTMLView.mm:"print"
-WebKit/mac/WebView/WebHTMLView.mm:"screen"
-WebKit/mac/WebView/WebHTMLView.mm:"strike"
-WebKit/mac/WebView/WebHTMLView.mm:"style"
-WebKit/mac/WebView/WebHTMLView.mm:"super"
-WebKit/mac/WebView/WebHTMLView.mm:"transparent"
-WebKit/mac/WebView/WebHTMLView.mm:"underline"
-WebKit/mac/WebView/WebHTMLView.mm:"white"
-WebKit/mac/WebView/WebJSPDFDoc.mm
-WebKit/mac/WebView/WebPDFDocumentExtras.mm
-WebKit/mac/WebView/WebPreferenceKeysPrivate.h
-WebKit/mac/WebView/WebPreferences.mm:"Apple Chancery"
-WebKit/mac/WebView/WebPreferences.mm:"Courier"
-WebKit/mac/WebView/WebPreferences.mm:"ISO-8859-1"
-WebKit/mac/WebView/WebPreferences.mm:"Identifier"
-WebKit/mac/WebView/WebPreferences.mm:"Papyrus"
-WebKit/mac/WebView/WebPreferences.mm:"Values"
-WebKit/mac/WebView/WebRenderLayer.mm:"composited"
-WebKit/mac/WebView/WebVideoFullscreenController.mm:"WebKit playing a video fullscreen."
-WebKit/mac/WebView/WebVideoFullscreenHUDWindowController.mm:"maxValue"
-WebKit/mac/WebView/WebView.mm:"At least one WebView is still open."
-WebKit/mac/WebView/WebView.mm:"At least one WebView was closed with fast teardown."
-WebKit/mac/WebView/WebView.mm:"Preferences"
-WebKit/mac/WebView/WebView.mm:"Search With Google"
-WebKit/mac/WebView/WebView.mm:"control"
-WebKit/mac/WebView/WebView.mm:"data"
-WebKit/mac/WebView/WebView.mm:"decoder"
-WebKit/mac/WebView/WebView.mm:"frame"
-WebKit/mac/WebView/WebView.mm:"return "
-WebKit/win/AccessibleBase.cpp:"Alt+"
-WebKit/win/AccessibleBase.cpp:"Ctrl+"
-WebKit/win/AccessibleBase.cpp:"Shift+"
-WebKit/win/AccessibleBase.cpp:"Win+"
-WebKit/win/ProgIDMacros.h:"OpenSource"
-WebKit/win/ProgIDMacros.h:"WebKit."
-WebKit/win/WebCache.cpp:"images"
-WebKit/win/WebCache.cpp:"scripts"
-WebKit/win/WebCache.cpp:"style sheets"
-WebKit/win/WebCoreSupport/WebInspectorClient.cpp:"Courier New"
-WebKit/win/WebCoreSupport/WebInspectorClient.cpp:"Web Inspector "
-WebKit/win/WebCoreSupport/WebInspectorClient.cpp:"Web Inspector"
-WebKit/win/WebCoreSupport/WebInspectorClient.cpp:"inspector"
-WebKit/win/WebDatabaseManager.cpp:"Databases"
-WebKit/win/WebHistoryItem.cpp:"title"
-WebKit/win/WebKitDLL.cpp
-WebKit/win/WebPreferenceKeysPrivate.h
-WebKit/win/WebPreferences.cpp:"Arial"
-WebKit/win/WebPreferences.cpp:"Comic Sans MS"
-WebKit/win/WebPreferences.cpp:"Courier New"
-WebKit/win/WebPreferences.cpp:"Times New Roman"
-WebKit/win/WebURLResponse.cpp:"Extension"
-WebKit/win/WebView.cpp:")"
-WebKit/win/WebView.cpp:"Cancel"
-WebKit/win/WebView.cpp:"Copy"
-WebKit/win/WebView.cpp:"Cut"
-WebKit/win/WebView.cpp:"Delete"
-WebKit/win/WebView.cpp:"Paste"
-WebKit/win/WebView.cpp:"Redo"
-WebKit/win/WebView.cpp:"Undo"
-WebKit/win/WebView.cpp:"Unknown ("
-WebKit/win/WebView.cpp:"about"
index e0d3ba40d0d92325d30f570650af14f9148aa514..272acf9bcbdf2b380d413aa4529d7bfbdd48b970 100644 (file)
@@ -29,7 +29,7 @@
 #if USE(CFNETWORK)
 
 #if !PLATFORM(WIN)
-#error This code is not needed on platforms other than Windows, because main thread's CFRunLoop can be used.
+#error This code is not needed on platforms other than Windows, because the CFRunLoop from the main thread can be used.
 #endif
 
 typedef struct __CFRunLoop* CFRunLoopRef;
index 82d9e702cb2f8f1306c199e89f34304101a45aa4..d786ce1e27321e7fd579d902669fd149d358edda 100644 (file)
@@ -1,3 +1,13 @@
+2011-03-29  Timothy Hatcher  <timothy@apple.com>
+
+        Update WebKit Localizable.strings to only contain WebKit/win strings.
+
+        https://webkit.org/b/57354
+
+        Reviewed by Sam Weinig.
+
+        * English.lproj/Localizable.strings: Updated.
+
 2011-03-23  Jia Pu  <jpu@apple.com>
 
         Reviewed by Darin Adler.
index ebc6ecf3617b91ab7fb335c3d1c86fe1ba206453..eebf03f9e571d9016fc34cf25eb5464df35f9bc1 100644 (file)
Binary files a/Source/WebKit/English.lproj/Localizable.strings and b/Source/WebKit/English.lproj/Localizable.strings differ
index 6014b43c926a76354f098e6ba24eb9e94cffc94c..9317abfac83f98f433ad26da6d4594ce7dc26bc5 100644 (file)
@@ -1,3 +1,28 @@
+2011-03-29  Timothy Hatcher  <timothy@apple.com>
+
+        Make WebKit2 work with update-webkit-localizable-strings.
+
+        https://webkit.org/b/57354
+
+        Reviewed by Sam Weinig.
+
+        * PluginProcess/mac/PluginProcessMac.mm: Remove UI_STRING macro. Use WebLocalizableStrings.h.
+        * Shared/WebLocalizableStrings.h: Added.
+        * UIProcess/API/mac/WKView.mm: Remove UI_STRING macro. Use WebLocalizableStrings.h.
+        * UIProcess/mac/WebInspectorProxyMac.mm:
+        (WebKit::WebInspectorProxy::platformInspectedURLChanged): Use UI_STRING. Remove FIXME.
+        * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Remove UI_STRING macros.
+        Use WebLocalizableStrings.h.
+        * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
+        (registerErrors): Remove UI_STRING macro. Use WebLocalizableStrings.h.
+        * WebProcess/mac/WebProcessMac.mm:
+        (WebKit::WebProcess::platformInitializeWebProcess): Use UI_STRING. Remove FIXME.
+
+        * GNUmakefile.am: Added Shared/WebLocalizableStrings.h.
+        * WebKit2.pro: Ditto.
+        * WebKit2.xcodeproj/project.pbxproj: Ditto.
+        * win/WebKit2.vcproj: Ditto.
+
 2011-03-29  Jeff Miller  <jeffm@apple.com>
 
         Reviewed by Darin Adler.
index 9b79e5a114f00900c85dc6272dc68635219fbcd8..6161690260940ecbf250bdc63644b4c594e3dfc1 100644 (file)
@@ -261,6 +261,7 @@ libWebKit2_la_SOURCES = \
        Source/WebKit2/Shared/WebImage.cpp \
        Source/WebKit2/Shared/WebImage.h \
        Source/WebKit2/Shared/WebKeyboardEvent.cpp \
+       Source/WebKit2/Shared/WebLocalizableStrings.h \
        Source/WebKit2/Shared/WebMouseEvent.cpp \
        Source/WebKit2/Shared/WebNavigationDataStore.h \
        Source/WebKit2/Shared/WebNumber.h \
index 81e4552f19cfc90a8e04bcf4d63765444bc101ff..cb9f20e13043590cb043d82ac5ec505fd2a99757 100644 (file)
 
 #if ENABLE(PLUGIN_PROCESS)
 
-// FIXME (WebKit2) <rdar://problem/8728860> WebKit2 needs to be localized
-#define UI_STRING(__str, __desc) [NSString stringWithUTF8String:__str]
-
 #import "NetscapePlugin.h"
 #import "PluginProcessShim.h"
 #import "PluginProcessProxyMessages.h"
 #import "PluginProcessCreationParameters.h"
+#import "WebLocalizableStrings.h"
 #import <WebKitSystemInterface.h>
 #import <dlfcn.h>
 #import <wtf/HashSet.h>
diff --git a/Source/WebKit2/Shared/WebLocalizableStrings.h b/Source/WebKit2/Shared/WebLocalizableStrings.h
new file mode 100644 (file)
index 0000000..d7334aa
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2011 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebLocalizableStrings_h
+#define WebLocalizableStrings_h
+
+#include <WebCore/LocalizedStrings.h>
+#include <wtf/text/WTFString.h>
+
+#if PLATFORM(MAC)
+
+#define UI_STRING(string, description) WebCore::localizedString(string)
+#define UI_STRING_KEY(string, key, description) WebCore::localizedString(key)
+
+#else
+
+// FIXME: <rdar://problem/9119405> Win: WebKit2 needs to be made localizable
+
+#define UI_STRING(string, description) WTF::String::fromUTF8(string, strlen(string))
+#define UI_STRING_KEY(string, key, description) WTF::String::fromUTF8(string, strlen(string))
+
+#endif
+
+#endif // WebLocalizableStrings_h
index 636b1d91bf095345bd3323b8d4869ad16970d46f..0239c9f5ecd9b17770214300e46e686533d8b32d 100644 (file)
@@ -51,6 +51,7 @@
 #import "WebContext.h"
 #import "WebEventFactory.h"
 #import "WebFullScreenManagerProxy.h"
+#import "WebLocalizableStrings.h"
 #import "WebPage.h"
 #import "WebPageProxy.h"
 #import "WebProcessProxy.h"
@@ -68,9 +69,6 @@
 #import <wtf/RefPtr.h>
 #import <wtf/RetainPtr.h>
 
-// FIXME (WebKit2) <rdar://problem/8728860> WebKit2 needs to be localized
-#define UI_STRING(__str, __desc) [NSString stringWithUTF8String:__str]
-
 @interface NSApplication (WebNSApplicationDetails)
 - (void)speakString:(NSString *)string;
 - (void)_setCurrentEvent:(NSEvent *)event;
index 67d184c5363d1a20bb66808d3a0516fde4c3ca12..285f25e5a121ffc8c4d2681f09398e7ffc2269d6 100644 (file)
@@ -29,6 +29,7 @@
 #if ENABLE(INSPECTOR)
 
 #import "WKAPICast.h"
+#import "WebLocalizableStrings.h"
 #import "WKView.h"
 #import "WebPageProxy.h"
 #import <WebKitSystemInterface.h>
@@ -134,8 +135,7 @@ void WebInspectorProxy::platformClose()
 
 void WebInspectorProxy::platformInspectedURLChanged(const String& urlString)
 {
-    // FIXME: this should be made localizable once WebKit2 supports it. <rdar://problem/8728860>
-    NSString *title = [NSString stringWithFormat:@"Web Inspector \u2014 %@", (NSString *)urlString];
+    NSString *title = [NSString stringWithFormat:UI_STRING("Web Inspector — %@", "Web Inspector window title"), (NSString *)urlString];
     [m_inspectorWindow.get() setTitle:title];
 }
 
index d3b0814afc92fa634282631517c0f7f4f07321ac..1e0d3dc991d805ebb3b57f5cde9fcb3e8592c73e 100644 (file)
@@ -141,6 +141,7 @@ HEADERS += \
     Shared/WebGeolocationPosition.h \
     Shared/WebGraphicsContext.h \
     Shared/WebImage.h \
+    Shared/WebLocalizableStrings.h \
     Shared/WebNavigationDataStore.h \
     Shared/WebNumber.h \
     Shared/WebOpenPanelParameters.h \
index d54f8f2532172e69f3791366b1344e69fabb0792..8bee8295a4f40a6dedebc4e43b7947bb5a57c35d 100644 (file)
                1CA8B935127C774E00576C2B /* WebInspectorProxyMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebInspectorProxyMac.mm; sourceTree = "<group>"; };
                1CA8B943127C882A00576C2B /* WebInspectorProxyMessageReceiver.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebInspectorProxyMessageReceiver.cpp; sourceTree = "<group>"; };
                1CA8B944127C882A00576C2B /* WebInspectorProxyMessages.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebInspectorProxyMessages.h; sourceTree = "<group>"; };
+               1CE518E81342251D0019E697 /* WebLocalizableStrings.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = WebLocalizableStrings.h; sourceTree = "<group>"; };
                29CD55A8128E294F00133C85 /* AccessibilityWebPageObject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AccessibilityWebPageObject.h; sourceTree = "<group>"; };
                29CD55A9128E294F00133C85 /* AccessibilityWebPageObject.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AccessibilityWebPageObject.mm; sourceTree = "<group>"; };
                32DBCF5E0370ADEE00C91783 /* WebKit2Prefix.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebKit2Prefix.h; sourceTree = "<group>"; };
                                BCCF6ABA12C91EF9008F9C35 /* WebImage.cpp */,
                                BCCF6ABB12C91EF9008F9C35 /* WebImage.h */,
                                C0337DD2127A2A0E008FF4F4 /* WebKeyboardEvent.cpp */,
+                               1CE518E81342251D0019E697 /* WebLocalizableStrings.h */,
                                905620E812BC248B000799B6 /* WebMemorySampler.cpp */,
                                905620E912BC248B000799B6 /* WebMemorySampler.h */,
                                C0337DAF127A28D0008FF4F4 /* WebMouseEvent.cpp */,
index 900631ff6d2c84e485a3a68964786f2b19f2883d..bd59f39d037a5443066d32d9513a97a85190acd8 100644 (file)
@@ -32,8 +32,8 @@
 #include "WebContextMessages.h"
 #include "WebCookieManager.h"
 #include "WebCoreArgumentCoders.h"
+#include "WebLocalizableStrings.h"
 #include "WebProcess.h"
-#include <WebCore/LocalizedStrings.h>
 #include <WebCore/NotImplemented.h>
 #include <WebCore/Page.h>
 #include <WebCore/PageGroup.h>
 #include <wtf/RetainPtr.h>
 #endif
 
-#if PLATFORM(MAC)
-
-#define UI_STRING(string, description) localizedString(string)
-#define UI_STRING_KEY(string, key, description) localizedString(key)
-
-#else
-
-#define UI_STRING(string, description) String::fromUTF8(string, strlen(string))
-#define UI_STRING_KEY(string, key, description) String::fromUTF8(string, strlen(string))
-
-#endif
-
 using namespace WebCore;
 
 namespace WebKit {
index 677c537071095803774edab1a82cf81537bc005b..9931dc424d459f042822c4bd291b5300d1aa6064 100644 (file)
@@ -28,6 +28,7 @@
 
 #import "WKError.h"
 #import "WebError.h"
+#import "WebLocalizableStrings.h"
 #import <WebCore/ResourceRequest.h>
 #import <WebCore/ResourceResponse.h>
 #import <pthread.h>
@@ -41,9 +42,6 @@ static NSString * const WebKitErrorMIMETypeKey =               @"WebKitErrorMIME
 static NSString * const WebKitErrorPlugInNameKey =             @"WebKitErrorPlugInNameKey";
 static NSString * const WebKitErrorPlugInPageURLStringKey =    @"WebKitErrorPlugInPageURLStringKey";
 
-// FIXME (WebKit2) <rdar://problem/8728860> WebKit2 needs to be localized
-#define UI_STRING(__str, __desc) [NSString stringWithUTF8String:__str]
-
 // Policy errors
 #define WebKitErrorDescriptionCannotShowMIMEType UI_STRING("Content with specified MIME type can’t be shown", "WebKitErrorCannotShowMIMEType description")
 #define WebKitErrorDescriptionCannotShowURL UI_STRING("The URL can’t be shown", "WebKitErrorCannotShowURL description")
@@ -119,17 +117,17 @@ static void registerErrors()
 
     NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
         // Policy errors
-        WebKitErrorDescriptionCannotShowMIMEType,                   [NSNumber numberWithInt: kWKErrorCodeCannotShowMIMEType],
-        WebKitErrorDescriptionCannotShowURL,                        [NSNumber numberWithInt: kWKErrorCodeCannotShowURL],
-        WebKitErrorDescriptionFrameLoadInterruptedByPolicyChange,   [NSNumber numberWithInt: kWKErrorCodeFrameLoadInterruptedByPolicyChange],
-        WebKitErrorDescriptionCannotUseRestrictedPort,              [NSNumber numberWithInt: kWKErrorCodeCannotUseRestrictedPort],
+        (NSString *)WebKitErrorDescriptionCannotShowMIMEType,                   [NSNumber numberWithInt: kWKErrorCodeCannotShowMIMEType],
+        (NSString *)WebKitErrorDescriptionCannotShowURL,                        [NSNumber numberWithInt: kWKErrorCodeCannotShowURL],
+        (NSString *)WebKitErrorDescriptionFrameLoadInterruptedByPolicyChange,   [NSNumber numberWithInt: kWKErrorCodeFrameLoadInterruptedByPolicyChange],
+        (NSString *)WebKitErrorDescriptionCannotUseRestrictedPort,              [NSNumber numberWithInt: kWKErrorCodeCannotUseRestrictedPort],
         
         // Plug-in and java errors
-        WebKitErrorDescriptionCannotFindPlugin,                     [NSNumber numberWithInt: kWKErrorCodeCannotFindPlugIn],
-        WebKitErrorDescriptionCannotLoadPlugin,                     [NSNumber numberWithInt: kWKErrorCodeCannotLoadPlugIn],
-        WebKitErrorDescriptionJavaUnavailable,                      [NSNumber numberWithInt: kWKErrorCodeJavaUnavailable],
-        WebKitErrorDescriptionPlugInCancelledConnection,            [NSNumber numberWithInt: kWKErrorCodePlugInCancelledConnection],
-        WebKitErrorDescriptionPlugInWillHandleLoad,                 [NSNumber numberWithInt: kWKErrorCodePlugInWillHandleLoad],
+        (NSString *)WebKitErrorDescriptionCannotFindPlugin,                     [NSNumber numberWithInt: kWKErrorCodeCannotFindPlugIn],
+        (NSString *)WebKitErrorDescriptionCannotLoadPlugin,                     [NSNumber numberWithInt: kWKErrorCodeCannotLoadPlugIn],
+        (NSString *)WebKitErrorDescriptionJavaUnavailable,                      [NSNumber numberWithInt: kWKErrorCodeJavaUnavailable],
+        (NSString *)WebKitErrorDescriptionPlugInCancelledConnection,            [NSNumber numberWithInt: kWKErrorCodePlugInCancelledConnection],
+        (NSString *)WebKitErrorDescriptionPlugInWillHandleLoad,                 [NSNumber numberWithInt: kWKErrorCodePlugInWillHandleLoad],
         nil];
 
     [NSError _webkit_addErrorsWithCodesAndDescriptions:dict inDomain:WebError::webKitErrorDomain()];
index e535aeab20edc3554e6828f1751ca6c25f26549f..50a56999e0ff3a603007157b3d934a87dc687165 100644 (file)
@@ -28,6 +28,7 @@
 
 #import "FullKeyboardAccessWatcher.h"
 #import "SandboxExtension.h"
+#import "WebLocalizableStrings.h"
 #import "WebPage.h"
 #import "WebProcessCreationParameters.h"
 #import <WebCore/MemoryCache.h>
@@ -190,8 +191,7 @@ void WebProcess::platformInitializeWebProcess(const WebProcessCreationParameters
     initializeSandbox(parameters);
 
     if (!parameters.parentProcessName.isNull()) {
-        // FIXME (WebKit2) <rdar://problem/8728860> WebKit2 needs to be localized
-        NSString *applicationName = [NSString stringWithFormat:@"%@ Web Content", (NSString *)parameters.parentProcessName];
+        NSString *applicationName = [NSString stringWithFormat:UI_STRING("%@ Web Content", "Visible name of the web process. The argument is the application name."), (NSString *)parameters.parentProcessName];
         WKSetVisibleApplicationName((CFStringRef)applicationName);
     }
 
index 86d3773e533b2c46fd8c288ad8d3ed00121093be..fb7dd1d2efcf5a89e18c290e9e3354ce9d92df1d 100755 (executable)
                                RelativePath="..\Shared\WebKeyboardEvent.cpp"
                                >
                        </File>
+                       <File
+                               RelativePath="..\Shared\WebLocalizableStrings.h"
+                               >
+                       </File>
                        <File
                                RelativePath="..\Shared\WebMouseEvent.cpp"
                                >
index 8d1da3a973c0ee0611eeb3630b8d65ab77c2f0ad..6aab4728e7d894832ea1ee6d1727bab8e3067cb0 100644 (file)
@@ -1,3 +1,19 @@
+2011-03-29  Timothy Hatcher  <timothy@apple.com>
+
+        Update update-webkit-localizable-strings to understand that WebKit and
+        WebKit2 strings go in WebCore.
+
+        Also make extract-localizable-strings optionally use an exclude file. No individual
+        warnings are produced about unlocalized strings when there is no exclude file. This
+        is needed for WebCore, since there are too many bare strings.
+
+        https://webkit.org/b/57354
+
+        Reviewed by Sam Weinig.
+
+        * Scripts/extract-localizable-strings: Support "-" to mean no exclude file.
+        * Scripts/update-webkit-localizable-strings: Update paths to scan WebCore and WebKit2.
+
 2011-03-29  Darin Adler  <darin@apple.com>
 
         Reviewed by Adam Roben.
index b31550ab516f8191ffca15de08aceaf127638cc6..116f11fbe93d7993a6ce968cae839e1423addc23 100755 (executable)
@@ -51,11 +51,13 @@ my %isDebugMacro = ( ASSERT_WITH_MESSAGE => 1, LOG_ERROR => 1, ERROR => 1, NSURL
 @ARGV >= 2 or die "Usage: extract-localizable-strings <exceptions file> <file to update> [ directory... ]\nDid you mean to run update-webkit-localizable-strings instead?\n";
 
 my $exceptionsFile = shift @ARGV;
--f $exceptionsFile or die "Couldn't find exceptions file $exceptionsFile\n";
+-f $exceptionsFile or die "Couldn't find exceptions file $exceptionsFile\n" unless $exceptionsFile eq "-";
 
 my $fileToUpdate = shift @ARGV;
 -f $fileToUpdate or die "Couldn't find file to update $fileToUpdate\n";
 
+my $warnAboutUnlocalizedStrings = $exceptionsFile ne "-";
+
 my @directories = ();
 my @directoriesToSkip = ();
 if (@ARGV < 1) {
@@ -80,7 +82,7 @@ my $NSLocalizeCount = 0;
 my %exception;
 my %usedException;
 
-if (open EXCEPTIONS, $exceptionsFile) {
+if ($exceptionsFile ne "-" && open EXCEPTIONS, $exceptionsFile) {
     while (<EXCEPTIONS>) {
         chomp;
         if (/^"([^\\"]|\\.)*"$/ or /^[-_\/\w.]+.(h|m|mm|c|cpp)$/ or /^[-_\/\w.]+.(h|m|mm|c|cpp):"([^\\"]|\\.)*"$/) {
@@ -105,7 +107,7 @@ for my $dir (@directoriesToSkip) {
 my @files = ( split "\n", `find $quotedDirectoriesString \\( -name "*.h" -o -name "*.m" -o -name "*.mm" -o -name "*.c" -o -name "*.cpp" \\)` );
 
 for my $file (sort @files) {
-    next if $file =~ /\/\w+LocalizableStrings\.h$/;
+    next if $file =~ /\/\w+LocalizableStrings\w*\.h$/;
 
     $file =~ s-^./--;
 
@@ -167,7 +169,7 @@ handleString:
                         # FIXME: Validate UTF-8 here?
                         $UIString = $string;
                         $expected = ",";
-                    } elsif (($macro =~ /UI_STRING_KEY$/) and !defined $key) {
+                    } elsif (($macro =~ /UI_STRING_KEY(_INTERNAL)?$/) and !defined $key) {
                         # FIXME: Validate UTF-8 here?
                         $key = $string;
                         $expected = ",";
@@ -192,7 +194,7 @@ handleString:
                     } elsif ($exception{"$file:\"$string\""}) {
                         $usedException{"$file:\"$string\""} = 1;
                     } else {
-                        print "$file:$stringLine:\"$string\" is not marked for localization\n";
+                        print "$file:$stringLine:\"$string\" is not marked for localization\n" if $warnAboutUnlocalizedStrings;
                         $notLocalizedCount++;
                     }
                 }
@@ -226,7 +228,7 @@ handleString:
                     $sawError = 1;
                     $expected = "";
                 }
-                if ($token =~ /UI_STRING(_KEY)?$/) {
+                if ($token =~ /UI_STRING(_KEY)?(_INTERNAL)?$/) {
                     $expected = "(";
                     $macro = $token;
                     $UIString = undef;
index 4baa8d637d4fb059e9a2602e2069e0fef491af72..0a0ada99ab079842d3779cb38a17c05696557f78 100755 (executable)
@@ -34,13 +34,18 @@ use FindBin;
 use lib $FindBin::Bin;
 use webkitdirs;
 
-my @directoriesToScan = ("Source/WebKit/mac", "Source/WebKit/win", "-Source/WebCore/icu", "-Source/WebKit/mac/icu");
-my $fileToUpdate = "Source/WebKit/English.lproj/Localizable.strings";
-my $exceptionsFile = "Source/WebKit/StringsNotToBeLocalized.txt";
+# WebKit and WebKit2 strings go into WebCore's Localizable.strings.
+my @directoriesToScan = ("Source/WebCore", "Source/WebKit/mac", "Source/WebKit2", "-Source/WebCore/icu", "-Source/WebKit/mac/icu");
+my $fileToUpdate = "Source/WebCore/English.lproj/Localizable.strings";
 
 @ARGV == 0 or die "Usage: " . basename($0) . "\n";
 
 chdirWebKit();
 
-system "sort -u $exceptionsFile -o $exceptionsFile";
-exec "./Tools/Scripts/extract-localizable-strings", $exceptionsFile, $fileToUpdate, @directoriesToScan;
+system "Tools/Scripts/extract-localizable-strings", "-", $fileToUpdate, @directoriesToScan;
+
+# FIXME: the following can be removed and "Source/WebKit/win" added above once Windows uses WebCore's Localizable.strings. <rdar://problem/9119405>
+my @webKitDirectoriesToScan = ("Source/WebKit/win");
+my $webKitFileToUpdate = "Source/WebKit/English.lproj/Localizable.strings";
+
+system "Tools/Scripts/extract-localizable-strings", "-", $webKitFileToUpdate, @webKitDirectoriesToScan;