Changeset 80014 in webkit
- Timestamp:
- Mar 1, 2011 11:41:03 AM (13 years ago)
- Location:
- trunk/Source
- Files:
-
- 1 added
- 13 edited
- 1 copied
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r80012 r80014 1 2011-02-23 Joseph Pecoraro <joepeck@webkit.org> 1 2011-03-01 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Timothy Hatcher. 4 5 WebKit2 needs to be made localizable 6 https://bugs.webkit.org/show_bug.cgi?id=55483 7 8 * English.lproj/Localizable.strings: Copied from Source/WebKit/English.lproj/Localizable.strings. 9 * WebCore.xcodeproj/project.pbxproj: 10 Move Localizable.strings to WebCore. 11 12 * WebCore.exp.in: 13 Add export for localizedString function. 14 15 * platform/LocalizedStrings.h: 16 * platform/mac/LocalizedStringsMac.mm: Added. 17 Add function to get localized version of a string from the WebCore bundle. 18 19 2011-03-01 Joseph Pecoraro <joepeck@webkit.org> 2 20 3 21 Reviewed by Kenneth Rohde Christiansen. -
trunk/Source/WebCore/English.lproj/Localizable.strings
r79896 r80014 17 17 "%@ %d×%d pixels" = "%@ %d×%d pixels"; 18 18 19 /* window title for a standalone image (uses multiplication symbol, not x) */ 20 "<filename> %d×%d pixels" = "<filename> %d×%d pixels"; 21 19 22 /* visible name of the plug-in host process. The first argument is the plug-in name and the second argument is the application name. */ 20 23 "%@ (%@ Internet plug-in)" = "%@ (%@ Internet plug-in)"; -
trunk/Source/WebCore/WebCore.exp.in
r79953 r80014 413 413 __ZN7WebCore15VisiblePositionC1ERKNS_8PositionENS_9EAffinityE 414 414 __ZN7WebCore15defaultLanguageEv 415 __ZN7WebCore15localizedStringEPKc 415 416 __ZN7WebCore15reportExceptionEPN3JSC9ExecStateENS0_7JSValueE 416 417 __ZN7WebCore15visitedLinkHashEPKtj -
trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj
r79985 r80014 4818 4818 BC23F0DB0DAFF4A4009FDC91 /* GeneratedImage.h in Headers */ = {isa = PBXBuildFile; fileRef = BC23F0DA0DAFF4A4009FDC91 /* GeneratedImage.h */; }; 4819 4819 BC2441C40E8B65D00055320F /* ScrollView.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC2441C30E8B65D00055320F /* ScrollView.cpp */; }; 4820 BC25B52A131C6D3900180E10 /* LocalizedStringsMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = BC25B528131C6D3900180E10 /* LocalizedStringsMac.mm */; }; 4820 4821 BC275B7911C5D1C300C9206C /* JSWebKitPointCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC275B7811C5D1C300C9206C /* JSWebKitPointCustom.cpp */; }; 4821 4822 BC275B7D11C5D23500C9206C /* JSWebKitCSSMatrixCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BC275B7C11C5D23500C9206C /* JSWebKitCSSMatrixCustom.cpp */; }; … … 5086 5087 BCACF3BC1072921A00C0C8A3 /* UserContentURLPattern.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BCACF3BA1072921A00C0C8A3 /* UserContentURLPattern.cpp */; }; 5087 5088 BCACF3BD1072921A00C0C8A3 /* UserContentURLPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = BCACF3BB1072921A00C0C8A3 /* UserContentURLPattern.h */; settings = {ATTRIBUTES = (Private, ); }; }; 5089 BCAD180A131C7A0D00990406 /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = BCAD1808131C7A0D00990406 /* Localizable.strings */; }; 5088 5090 BCAE1FA712939DB7004CB026 /* ScrollAnimatorMac.h in Headers */ = {isa = PBXBuildFile; fileRef = BCAE1FA512939DB7004CB026 /* ScrollAnimatorMac.h */; }; 5089 5091 BCAEFCAE1016CE4A0040D34E /* DOMRGBColor.mm in Sources */ = {isa = PBXBuildFile; fileRef = BCAEFCAD1016CE4A0040D34E /* DOMRGBColor.mm */; }; … … 11159 11161 BC23F0DA0DAFF4A4009FDC91 /* GeneratedImage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeneratedImage.h; sourceTree = "<group>"; }; 11160 11162 BC2441C30E8B65D00055320F /* ScrollView.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScrollView.cpp; sourceTree = "<group>"; }; 11163 BC25B528131C6D3900180E10 /* LocalizedStringsMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = LocalizedStringsMac.mm; sourceTree = "<group>"; }; 11161 11164 BC275B7811C5D1C300C9206C /* JSWebKitPointCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebKitPointCustom.cpp; sourceTree = "<group>"; }; 11162 11165 BC275B7C11C5D23500C9206C /* JSWebKitCSSMatrixCustom.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSWebKitCSSMatrixCustom.cpp; sourceTree = "<group>"; }; … … 11447 11450 BCACF3BA1072921A00C0C8A3 /* UserContentURLPattern.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = UserContentURLPattern.cpp; sourceTree = "<group>"; }; 11448 11451 BCACF3BB1072921A00C0C8A3 /* UserContentURLPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserContentURLPattern.h; sourceTree = "<group>"; }; 11452 BCAD1809131C7A0D00990406 /* English */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = SOURCE_ROOT; }; 11449 11453 BCAE1FA512939DB7004CB026 /* ScrollAnimatorMac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScrollAnimatorMac.h; sourceTree = "<group>"; }; 11450 11454 BCAEFCAD1016CE4A0040D34E /* DOMRGBColor.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DOMRGBColor.mm; sourceTree = "<group>"; }; … … 12576 12580 isa = PBXGroup; 12577 12581 children = ( 12582 BCAD1808131C7A0D00990406 /* Localizable.strings */, 12578 12583 46F9D5DA0B0D60170028EE36 /* aliasCursor.png */, 12579 12584 46D4F2460AF97E810035385A /* cellCursor.png */, … … 13907 13912 06E81ED60AB5D5E900C87837 /* LocalCurrentGraphicsContext.h */, 13908 13913 06E81EEB0AB5DA9700C87837 /* LocalCurrentGraphicsContext.mm */, 13914 BC25B528131C6D3900180E10 /* LocalizedStringsMac.mm */, 13909 13915 1402645D0AFDC19B005919E2 /* LoggingMac.mm */, 13910 13916 BC772C5D0C4EB3440083285F /* MIMETypeRegistryMac.mm */, … … 22576 22582 files = ( 22577 22583 46F9D5DD0B0D60170028EE36 /* aliasCursor.png in Resources */, 22584 BCAD180A131C7A0D00990406 /* Localizable.strings in Resources */, 22578 22585 46D4F2490AF97E810035385A /* cellCursor.png in Resources */, 22579 22586 46D4F24A0AF97E810035385A /* contextMenuCursor.png in Resources */, … … 25131 25138 E1BE512D0CF6C512002EA959 /* XSLTUnicodeSort.cpp in Sources */, 25132 25139 977E2E0E12F0FC9C00C13379 /* XSSFilter.cpp in Sources */, 25140 BC25B52A131C6D3900180E10 /* LocalizedStringsMac.mm in Sources */, 25133 25141 ); 25134 25142 runOnlyForDeploymentPostprocessing = 0; … … 25155 25163 25156 25164 /* Begin PBXVariantGroup section */ 25165 BCAD1808131C7A0D00990406 /* Localizable.strings */ = { 25166 isa = PBXVariantGroup; 25167 children = ( 25168 BCAD1809131C7A0D00990406 /* English */, 25169 ); 25170 name = Localizable.strings; 25171 sourceTree = "<group>"; 25172 }; 25157 25173 BCC64F5F0DCFB84E0081EF3B /* localizedStrings.js */ = { 25158 25174 isa = PBXVariantGroup; -
trunk/Source/WebCore/platform/LocalizedStrings.h
r78842 r80014 1 1 /* 2 * Copyright (C) 2003, 2006, 2009 Apple Computer,Inc. All rights reserved.2 * Copyright (C) 2003, 2006, 2009, 2011 Apple Inc. All rights reserved. 3 3 * Copyright (C) 2010 Igalia S.L 4 4 * … … 188 188 String validationMessageStepMismatchText(const String& base, const String& step); 189 189 190 } 190 #if PLATFORM(MAC) 191 String localizedString(const char* key); 192 #endif 191 193 192 #endif 194 } // namespace WebCore 195 196 #endif // LocalizedStrings_h -
trunk/Source/WebKit/ChangeLog
r79589 r80014 1 2011-03-01 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Timothy Hatcher. 4 5 WebKit2 needs to be made localizable 6 https://bugs.webkit.org/show_bug.cgi?id=55483 7 8 * StringsNotToBeLocalized.txt: Removed. 9 * WebKit.xcodeproj/project.pbxproj: 10 Copied Localizable.strings to WebCore, it can't be removed entirely 11 yet since Windows is still using it. 12 1 13 2011-02-24 Peter Kasting <pkasting@google.com> 2 14 -
trunk/Source/WebKit/WebKit.xcodeproj/project.pbxproj
r76478 r80014 121 121 5D7BF8150C2A1D90008CE06D /* WebInspector.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5D7BF8130C2A1D90008CE06D /* WebInspector.mm */; }; 122 122 5DE83A7A0D0F7F9400CAD12A /* WebJavaScriptTextInputPanel.nib in Resources */ = {isa = PBXBuildFile; fileRef = 5DE83A740D0F7F9400CAD12A /* WebJavaScriptTextInputPanel.nib */; }; 123 5DE83A7F0D0F7FAD00CAD12A /* Localizable.strings in Resources */ = {isa = PBXBuildFile; fileRef = 5DE83A7D0D0F7FAD00CAD12A /* Localizable.strings */; };124 123 5DE92FEF0BD7017E0059A5FD /* WebAssertions.h in Headers */ = {isa = PBXBuildFile; fileRef = 5DE92FEE0BD7017E0059A5FD /* WebAssertions.h */; settings = {ATTRIBUTES = (Private, ); }; }; 125 124 65488DA1084FBCCB00831AD0 /* WebNSDictionaryExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 65488D9F084FBCCB00831AD0 /* WebNSDictionaryExtras.h */; }; … … 543 542 5D7BF8130C2A1D90008CE06D /* WebInspector.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = WebInspector.mm; sourceTree = "<group>"; }; 544 543 5DE83A750D0F7F9400CAD12A /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/WebJavaScriptTextInputPanel.nib; sourceTree = SOURCE_ROOT; }; 545 5DE83A7E0D0F7FAD00CAD12A /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/Localizable.strings; sourceTree = SOURCE_ROOT; };546 544 5DE92FEE0BD7017E0059A5FD /* WebAssertions.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebAssertions.h; sourceTree = "<group>"; }; 547 545 65488D9F084FBCCB00831AD0 /* WebNSDictionaryExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebNSDictionaryExtras.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; … … 695 693 ED2B2474033A2DA800C1A526 /* WebNSPasteboardExtras.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebNSPasteboardExtras.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 696 694 ED2B2475033A2DA800C1A526 /* WebNSPasteboardExtras.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebNSPasteboardExtras.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; 697 ED3B48DE0CC51F7E00DFF1EB /* StringsNotToBeLocalized.txt */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = text; path = StringsNotToBeLocalized.txt; sourceTree = SOURCE_ROOT; };698 695 ED5B9523111B725A00472298 /* WebLocalizableStrings.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebLocalizableStrings.mm; sourceTree = "<group>"; }; 699 696 ED6BE2E5088C32B50044DEDC /* WebNSAttributedStringExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebNSAttributedStringExtras.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; }; … … 841 838 9325FBDC07D829AE00159862 /* IDNScriptWhiteList.txt */, 842 839 939811320824BF01008DF038 /* Info.plist */, 843 5DE83A7D0D0F7FAD00CAD12A /* Localizable.strings */,844 ED3B48DE0CC51F7E00DFF1EB /* StringsNotToBeLocalized.txt */,845 840 F5B67130023EDF8901C1A525 /* url_icon.tiff */, 846 841 5DE83A740D0F7F9400CAD12A /* WebJavaScriptTextInputPanel.nib */, … … 1695 1690 A864B3F6123ED9FA00C2A612 /* MailQuirksUserScript.js in Resources */, 1696 1691 939810BA0824BF01008DF038 /* IDNScriptWhiteList.txt in Resources */, 1697 5DE83A7F0D0F7FAD00CAD12A /* Localizable.strings in Resources */,1698 1692 939810B70824BF01008DF038 /* url_icon.tiff in Resources */, 1699 1693 939810B50824BF01008DF038 /* WebAuthenticationPanel.nib in Resources */, … … 2009 2003 sourceTree = SOURCE_ROOT; 2010 2004 }; 2011 5DE83A7D0D0F7FAD00CAD12A /* Localizable.strings */ = {2012 isa = PBXVariantGroup;2013 children = (2014 5DE83A7E0D0F7FAD00CAD12A /* English */,2015 );2016 name = Localizable.strings;2017 path = mac/Resources;2018 sourceTree = SOURCE_ROOT;2019 };2020 2005 9345D17B0365BF35008635CE /* WebAuthenticationPanel.nib */ = { 2021 2006 isa = PBXVariantGroup; -
trunk/Source/WebKit/mac/ChangeLog
r79988 r80014 1 2011-03-01 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Timothy Hatcher. 4 5 WebKit2 needs to be made localizable 6 https://bugs.webkit.org/show_bug.cgi?id=55483 7 8 * WebCoreSupport/WebPlatformStrategies.mm: 9 Use WebCore's localizedString function instead of WebLocalizableStrings 10 since WebCore is now responsible for localization. 11 1 12 2011-02-25 Steve Block <steveblock@google.com> 2 13 -
trunk/Source/WebKit/mac/WebCoreSupport/WebPlatformStrategies.mm
r78842 r80014 26 26 #import "WebPlatformStrategies.h" 27 27 28 #import "WebLocalizableStrings.h"29 28 #import "WebPluginDatabase.h" 30 29 #import "WebPluginPackage.h" 31 30 #import <WebCore/BlockExceptions.h> 32 31 #import <WebCore/IntSize.h> 32 #import <WebCore/LocalizedStrings.h> 33 33 #import <WebCore/Page.h> 34 34 #import <WebCore/PageGroup.h> 35 35 #import <wtf/StdLibExtras.h> 36 36 37 #ifdef BUILDING_ON_TIGER 38 typedef unsigned NSUInteger; 39 #endif 37 #define UI_STRING(string, description) localizedString(string) 38 #define UI_STRING_KEY(string, key, description) localizedString(key) 40 39 41 40 using namespace WebCore; -
trunk/Source/WebKit2/ChangeLog
r80007 r80014 1 2011-03-01 Sam Weinig <sam@webkit.org> 2 3 Reviewed by Timothy Hatcher. 4 5 WebKit2 needs to be made localizable 6 https://bugs.webkit.org/show_bug.cgi?id=55483 7 8 * PluginProcess/mac/PluginProcessMainMac.mm: 9 * WebProcess/mac/WebProcessMainMac.mm: 10 Set the default localization from the passed in parameter. 11 12 * UIProcess/Launcher/mac/ProcessLauncherMac.mm: 13 Add the preferred localization as a parameter when launching processes 14 so that they can set their localization to match the launching app. 15 16 * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: 17 Use WebCore's localizedString function on the mac, to actually localize 18 these strings. 19 20 (WebKit::WebPlatformStrategies::imageTitle): 21 Switch to using replace, instead of concatenation, to give localizers a chance 22 to rearrange the wording. 23 1 24 2011-03-01 Balazs Kelemen <kbalazs@webkit.org> 2 25 -
trunk/Source/WebKit2/PluginProcess/mac/PluginProcessMainMac.mm
r77981 r80014 1 1 /* 2 * Copyright (C) 2010 Apple Inc. All rights reserved.2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 32 32 #import "PluginProcess.h" 33 33 #import "RunLoop.h" 34 #import <WebKitSystemInterface.h> 34 35 #import <runtime/InitializeThreading.h> 35 36 #import <servers/bootstrap.h> 37 #import <wtf/RetainPtr.h> 36 38 #import <wtf/text/CString.h> 37 39 #import <wtf/text/WTFString.h> 38 #import <WebKitSystemInterface.h>39 40 40 41 // FIXME: We should be doing this another way. … … 65 66 return EXIT_FAILURE; 66 67 } 67 68 69 String localization = commandLine["localization"]; 70 RetainPtr<CFStringRef> cfLocalization(AdoptCF, CFStringCreateWithCharacters(0, reinterpret_cast<const UniChar*>(localization.characters()), localization.length())); 71 if (cfLocalization) 72 WKSetDefaultLocalization(cfLocalization.get()); 73 68 74 #if !SHOW_CRASH_REPORTER 69 75 // Installs signal handlers that exit on a crash so that CrashReporter does not show up. -
trunk/Source/WebKit2/UIProcess/Launcher/mac/ProcessLauncherMac.mm
r79752 r80014 204 204 NSString *webProcessAppExecutablePath = [[NSBundle bundleWithPath:webProcessAppPath] executablePath]; 205 205 206 RetainPtr<CFStringRef> cfLocalization(AdoptCF, WKCopyCFLocalizationPreferredName(NULL)); 207 CString localization = String(cfLocalization.get()).utf8(); 208 206 209 // Make a unique, per pid, per process launcher web process service name. 207 210 CString serviceName = String::format("com.apple.WebKit.WebProcess-%d-%p", getpid(), this).utf8(); 208 211 209 const char* args[] = { [webProcessAppExecutablePath fileSystemRepresentation], frameworkExecutablePath, "-type", processTypeAsString(m_launchOptions.processType), "-servicename", serviceName.data(), 0 };212 const char* args[] = { [webProcessAppExecutablePath fileSystemRepresentation], frameworkExecutablePath, "-type", processTypeAsString(m_launchOptions.processType), "-servicename", serviceName.data(), "-localization", localization.data(), 0 }; 210 213 211 214 // Register ourselves. -
trunk/Source/WebKit2/WebProcess/WebCoreSupport/WebPlatformStrategies.cpp
r79434 r80014 1 1 /* 2 * Copyright (C) 2010 Apple Inc. All rights reserved.2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 33 33 #include "WebCoreArgumentCoders.h" 34 34 #include "WebProcess.h" 35 #include <WebCore/LocalizedStrings.h> 35 36 #include <WebCore/NotImplemented.h> 36 37 #include <WebCore/Page.h> … … 43 44 #endif 44 45 45 // FIXME (WebKit2) <rdar://problem/8728860> WebKit2 needs to be localized 46 #if PLATFORM(MAC) 47 48 #define UI_STRING(string, description) localizedString(string) 49 #define UI_STRING_KEY(string, key, description) localizedString(key) 50 51 #else 52 46 53 #define UI_STRING(string, description) String::fromUTF8(string, strlen(string)) 47 54 #define UI_STRING_KEY(string, key, description) String::fromUTF8(string, strlen(string)) 55 56 #endif 48 57 49 58 using namespace WebCore; … … 754 763 String WebPlatformStrategies::imageTitle(const String& filename, const IntSize& size) 755 764 { 756 // FIXME: It would be nice to have the filename inside the format string, but it's not easy to do that in a way that works with non-ASCII characters in the filename.757 return f ilename + formatLocalizedString(UI_STRING(" %d×%d pixels", "window title suffix for a standalone image (uses multiplication symbol, not x)"), size.width(), size.height());765 // FIXME: This should format the numbers correctly. In Mac WebKit, we used +[NSNumberFormatter localizedStringFromNumber:numberStyle:]. 766 return formatLocalizedString(UI_STRING("<filename> %d×%d pixels", "window title suffix for a standalone image (uses multiplication symbol, not x)"), size.width(), size.height()).replace("<filename>", filename); 758 767 } 759 768 -
trunk/Source/WebKit2/WebProcess/mac/WebProcessMainMac.mm
r77452 r80014 1 1 /* 2 * Copyright (C) 2010 Apple Inc. All rights reserved.2 * Copyright (C) 2010, 2011 Apple Inc. All rights reserved. 3 3 * 4 4 * Redistribution and use in source and binary forms, with or without … … 73 73 } 74 74 75 String localization = commandLine["localization"]; 76 RetainPtr<CFStringRef> cfLocalization(AdoptCF, CFStringCreateWithCharacters(0, reinterpret_cast<const UniChar*>(localization.characters()), localization.length())); 77 if (cfLocalization) 78 WKSetDefaultLocalization(cfLocalization.get()); 79 75 80 #if !SHOW_CRASH_REPORTER 76 81 // Installs signal handlers that exit on a crash so that CrashReporter does not show up.
Note: See TracChangeset
for help on using the changeset viewer.