Diff
Modified: branches/safari-600.3-branch/Source/WebCore/ChangeLog (176050 => 176051)
--- branches/safari-600.3-branch/Source/WebCore/ChangeLog 2014-11-13 01:23:15 UTC (rev 176050)
+++ branches/safari-600.3-branch/Source/WebCore/ChangeLog 2014-11-13 01:45:56 UTC (rev 176051)
@@ -1,3 +1,19 @@
+2014-11-12 Matthew Hanson <[email protected]>
+
+ Merge r175962. <rdar://problem/18815343>
+
+ 2014-11-11 Tim Horton <[email protected]>
+
+ Localize strings for action menus
+ https://bugs.webkit.org/show_bug.cgi?id=138591
+ <rdar://problem/18815343>
+
+ Reviewed by Dan Bates.
+
+ * English.lproj/Localizable.strings:
+ Add a bunch of localizable strings.
+
+
2014-11-10 Beth Dakin <[email protected]>
WK1: Support default actions for editable text with misspelled word
Modified: branches/safari-600.3-branch/Source/WebCore/English.lproj/Localizable.strings (176050 => 176051)
--- branches/safari-600.3-branch/Source/WebCore/English.lproj/Localizable.strings 2014-11-13 01:23:15 UTC (rev 176050)
+++ branches/safari-600.3-branch/Source/WebCore/English.lproj/Localizable.strings 2014-11-13 01:45:56 UTC (rev 176051)
@@ -1072,3 +1072,44 @@
/* accessibility label for video element controller */
"video playback" = "video playback";
+/* "Open Link in Default Browser" action menu item */
+"Open (action menu item)" = "Open";
+
+/* "Preview Link" action menu item */
+"Preview (action menu item)" = "Preview";
+
+/* "Add to Reading List" action menu item */
+"Add to Reading List (action menu item)" = "Add to Reading List";
+
+/* "Copy" action menu item in image menu */
+"Copy (image action menu item)" = "Copy";
+
+/* "Add to Photos" action menu item */
+"Add to Photos (action menu item)" = "Add to Photos";
+
+/* "Save to Downloads" action menu item in image menu */
+"Save to Downloads (image action menu item)" = "Save to Downloads";
+
+/* "Share" action menu item in image menu */
+"Share (image action menu item)" = "Share";
+
+/* "Copy" action menu item in text menu */
+"Copy (text action menu item)" = "Copy";
+
+/* "Look Up" action menu item */
+"Look Up (action menu item)" = "Look Up";
+
+/* "Paste" action menu item */
+"Paste (action menu item)" = "Paste";
+
+/* "Suggestions" action menu item */
+"Suggestions (action menu item)" = "Suggestions";
+
+/* "Copy" action menu item in video menu */
+"Copy (video action menu item)" = "Copy";
+
+/* "Share" action menu item in video menu */
+"Share (video action menu item)" = "Share";
+
+/* "Save to Downloads" action menu item in video menu */
+"Save to Downloads (video action menu item)" = "Save to Downloads";
Modified: branches/safari-600.3-branch/Source/WebKit/mac/ChangeLog (176050 => 176051)
--- branches/safari-600.3-branch/Source/WebKit/mac/ChangeLog 2014-11-13 01:23:15 UTC (rev 176050)
+++ branches/safari-600.3-branch/Source/WebKit/mac/ChangeLog 2014-11-13 01:45:56 UTC (rev 176051)
@@ -1,3 +1,20 @@
+2014-11-12 Matthew Hanson <[email protected]>
+
+ Merge r175962. <rdar://problem/18815343>
+
+ 2014-11-11 Tim Horton <[email protected]>
+
+ Localize strings for action menus
+ https://bugs.webkit.org/show_bug.cgi?id=138591
+ <rdar://problem/18815343>
+
+ Reviewed by Dan Bates.
+
+ * WebView/WebActionMenuController.mm:
+ (-[WebActionMenuController _createActionMenuItemForTag:withHitTestResult:]):
+ Make use of the new strings.
+
+
2014-11-11 Babak Shafiei <[email protected]>
Merge r175996.
Modified: branches/safari-600.3-branch/Source/WebKit/mac/WebView/WebActionMenuController.mm (176050 => 176051)
--- branches/safari-600.3-branch/Source/WebKit/mac/WebView/WebActionMenuController.mm 2014-11-13 01:23:15 UTC (rev 176050)
+++ branches/safari-600.3-branch/Source/WebKit/mac/WebView/WebActionMenuController.mm 2014-11-13 01:45:56 UTC (rev 176051)
@@ -42,6 +42,7 @@
#import <WebCore/Frame.h>
#import <WebCore/FrameView.h>
#import <WebCore/HTMLConverter.h>
+#import <WebCore/LocalizedStrings.h>
#import <WebCore/NSViewSPI.h>
#import <WebCore/Page.h>
#import <WebCore/Range.h>
@@ -440,49 +441,48 @@
NSImage *image = nil;
id representedObject = nil;
- // FIXME: We should localize these strings.
switch (tag) {
case WebActionMenuItemTagOpenLinkInDefaultBrowser:
selector = @selector(_openURLFromActionMenu:);
- title = @"Open";
+ title = WEB_UI_STRING_KEY("Open", "Open (action menu item)", "action menu item");
image = webKitBundleImageNamed(@"OpenInNewWindowTemplate");
representedObject = [hitTestResult objectForKey:WebElementLinkURLKey];
break;
case WebActionMenuItemTagPreviewLink:
selector = @selector(_quickLookURLFromActionMenu:);
- title = @"Preview";
+ title = WEB_UI_STRING_KEY("Preview", "Preview (action menu item)", "action menu item");
image = [NSImage imageNamed:@"NSActionMenuQuickLook"];
representedObject = hitTestResult;
break;
case WebActionMenuItemTagAddLinkToSafariReadingList:
selector = @selector(_addToReadingListFromActionMenu:);
- title = @"Add to Safari Reading List";
+ title = WEB_UI_STRING_KEY("Add to Reading List", "Add to Reading List (action menu item)", "action menu item");
image = [NSImage imageNamed:NSImageNameBookmarksTemplate];
representedObject = [hitTestResult objectForKey:WebElementLinkURLKey];
break;
case WebActionMenuItemTagCopyText:
selector = @selector(_copySelection:);
- title = @"Copy";
+ title = WEB_UI_STRING_KEY("Copy", "Copy (text action menu item)", "text action menu item");
image = [NSImage imageNamed:@"NSActionMenuCopy"];
break;
case WebActionMenuItemTagLookupText:
selector = @selector(_lookupText:);
- title = @"Look Up";
+ title = WEB_UI_STRING_KEY("Look Up", "Look Up (action menu item)", "action menu item");
image = [NSImage imageNamed:@"NSActionMenuLookup"];
break;
case WebActionMenuItemTagPaste:
selector = @selector(_paste:);
- title = @"Paste";
+ title = WEB_UI_STRING_KEY("Paste", "Paste (action menu item)", "action menu item");
image = [NSImage imageNamed:@"NSActionMenuPaste"];
break;
case WebActionMenuItemTagTextSuggestions:
- title = @"Suggestions";
+ title = WEB_UI_STRING_KEY("Suggestions", "Suggestions (action menu item)", "action menu item");
image = [NSImage imageNamed:@"NSActionMenuSpelling"];
break;
Modified: branches/safari-600.3-branch/Source/WebKit2/ChangeLog (176050 => 176051)
--- branches/safari-600.3-branch/Source/WebKit2/ChangeLog 2014-11-13 01:23:15 UTC (rev 176050)
+++ branches/safari-600.3-branch/Source/WebKit2/ChangeLog 2014-11-13 01:45:56 UTC (rev 176051)
@@ -1,3 +1,22 @@
+2014-11-12 Matthew Hanson <[email protected]>
+
+ Merge r175962. <rdar://problem/18815343>
+
+ 2014-11-11 Tim Horton <[email protected]>
+
+ Localize strings for action menus
+ https://bugs.webkit.org/show_bug.cgi?id=138591
+ <rdar://problem/18815343>
+
+ Reviewed by Dan Bates.
+
+ * UIProcess/mac/WKActionMenuController.mm:
+ (-[WKActionMenuController _showTextIndicator]):
+ (-[WKActionMenuController _hideTextIndicator]):
+ (-[WKActionMenuController _createActionMenuItemForTag:]):
+ Make use of the new strings.
+
+
2014-11-07 Tim Horton <[email protected]>
Popovers do not dismiss when navigating back and forth using gestures
Modified: branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm (176050 => 176051)
--- branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm 2014-11-13 01:23:15 UTC (rev 176050)
+++ branches/safari-600.3-branch/Source/WebKit2/UIProcess/mac/WKActionMenuController.mm 2014-11-13 01:45:56 UTC (rev 176051)
@@ -44,6 +44,7 @@
#import <ImageKit/ImageKit.h>
#import <WebCore/DataDetectorsSPI.h>
#import <WebCore/GeometryUtilities.h>
+#import <WebCore/LocalizedStrings.h>
#import <WebCore/NSSharingServiceSPI.h>
#import <WebCore/NSSharingServicePickerSPI.h>
#import <WebCore/NSViewSPI.h>
@@ -723,88 +724,87 @@
NSString *title = nil;
NSImage *image = nil;
- // FIXME: These titles need to be localized.
switch (tag) {
case kWKContextActionItemTagOpenLinkInDefaultBrowser:
selector = @selector(_openURLFromActionMenu:);
- title = @"Open";
+ title = WEB_UI_STRING_KEY("Open", "Open (action menu item)", "action menu item");
image = webKitBundleImageNamed(@"OpenInNewWindowTemplate");
break;
#if WK_API_ENABLED
case kWKContextActionItemTagPreviewLink:
selector = @selector(_keepPreviewOpenFromActionMenu:);
- title = @"Preview";
+ title = WEB_UI_STRING_KEY("Preview", "Preview (action menu item)", "action menu item");
image = [NSImage imageNamed:@"NSActionMenuQuickLook"];
break;
#endif
case kWKContextActionItemTagAddLinkToSafariReadingList:
selector = @selector(_addToReadingListFromActionMenu:);
- title = @"Add to Safari Reading List";
+ title = WEB_UI_STRING_KEY("Add to Reading List", "Add to Reading List (action menu item)", "action menu item");
image = [NSImage imageNamed:NSImageNameBookmarksTemplate];
break;
case kWKContextActionItemTagCopyImage:
selector = @selector(_copyImage:);
- title = @"Copy";
+ title = WEB_UI_STRING_KEY("Copy", "Copy (image action menu item)", "image action menu item");
image = [NSImage imageNamed:@"NSActionMenuCopy"];
break;
case kWKContextActionItemTagAddImageToPhotos:
selector = @selector(_addImageToPhotos:);
- title = @"Add to Photos";
+ title = WEB_UI_STRING_KEY("Add to Photos", "Add to Photos (action menu item)", "action menu item");
image = [NSImage imageNamed:@"NSActionMenuAddToPhotos"];
break;
case kWKContextActionItemTagSaveImageToDownloads:
selector = @selector(_saveImageToDownloads:);
- title = @"Save to Downloads";
+ title = WEB_UI_STRING_KEY("Save to Downloads", "Save to Downloads (image action menu item)", "image action menu item");
image = [NSImage imageNamed:@"NSActionMenuSaveToDownloads"];
break;
case kWKContextActionItemTagShareImage:
- title = @"Share";
+ title = WEB_UI_STRING_KEY("Share (image action menu item)", "Share (image action menu item)", "image action menu item");
image = [NSImage imageNamed:@"NSActionMenuShare"];
break;
case kWKContextActionItemTagCopyText:
selector = @selector(_copySelection:);
- title = @"Copy";
+ title = WEB_UI_STRING_KEY("Copy", "Copy (text action menu item)", "text action menu item");
image = [NSImage imageNamed:@"NSActionMenuCopy"];
break;
case kWKContextActionItemTagLookupText:
selector = @selector(_lookupText:);
- title = @"Look Up";
+ title = WEB_UI_STRING_KEY("Look Up", "Look Up (action menu item)", "action menu item");
image = [NSImage imageNamed:@"NSActionMenuLookup"];
break;
case kWKContextActionItemTagPaste:
selector = @selector(_paste:);
- title = @"Paste";
+ title = WEB_UI_STRING_KEY("Paste", "Paste (action menu item)", "action menu item");
image = [NSImage imageNamed:@"NSActionMenuPaste"];
break;
case kWKContextActionItemTagTextSuggestions:
- title = @"Suggestions";
+ title = WEB_UI_STRING_KEY("Suggestions", "Suggestions (action menu item)", "action menu item");
image = [NSImage imageNamed:@"NSActionMenuSpelling"];
break;
case kWKContextActionItemTagCopyVideoURL:
selector = @selector(_copyVideoURL:);
- title = @"Copy";
+ title = WEB_UI_STRING_KEY("Copy", "Copy (video action menu item)", "video action menu item");
image = [NSImage imageNamed:@"NSActionMenuCopy"];
break;
case kWKContextActionItemTagSaveVideoToDownloads:
selector = @selector(_saveVideoToDownloads:);
- title = @"Save to Downloads";
+ title = WEB_UI_STRING_KEY("Share", "Share (video action menu item)", "video action menu item");
image = [NSImage imageNamed:@"NSActionMenuSaveToDownloads"];
break;
case kWKContextActionItemTagShareVideo:
- title = @"Share";
+ title = WEB_UI_STRING_KEY("Save to Downloads", "Save to Downloads (video action menu item)", "video action menu item");
image = [NSImage imageNamed:@"NSActionMenuShare"];
break;