Bug 1262098 - Use shorter string for "Add as search engine" to avoid UI bug. r=grisha
authorSebastian Kaspari <s.kaspari@gmail.com>
Wed, 13 Apr 2016 14:41:50 +0200
changeset 331314 4646acc6df79b29e504d0fe43fef4e014b9164cb
parent 331313 7b9c723526fff7835105a1155387fd5b0b96d6a1
child 331315 8f7045b63b07c01309ab451ad120eacfdaa420d1
push id6048
push userkmoir@mozilla.com
push dateMon, 06 Jun 2016 19:02:08 +0000
treeherdermozilla-beta@46d72a56c57d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgrisha
bugs1262098
milestone48.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1262098 - Use shorter string for "Add as search engine" to avoid UI bug. r=grisha MozReview-Commit-ID: 3G4sk0H0aKM
mobile/android/chrome/content/ActionBarHandler.js
mobile/android/chrome/content/SelectionHandler.js
mobile/android/chrome/content/browser.js
mobile/android/locales/en-US/chrome/browser.properties
--- a/mobile/android/chrome/content/ActionBarHandler.js
+++ b/mobile/android/chrome/content/ActionBarHandler.js
@@ -504,17 +504,17 @@ var ActionBarHandler = {
         );
 
         UITelemetry.addEvent("action.1", "actionbar", null, "search");
       },
     },
 
     SEARCH_ADD: {
       id: "search_add_action",
-      label: Strings.browser.GetStringFromName("contextmenu.addSearchEngine2"),
+      label: Strings.browser.GetStringFromName("contextmenu.addSearchEngine3"),
       icon: "drawable://ab_add_search_engine",
       order: 0,
       floatingOrder: 8,
 
       selector: {
         matches: function(element, win) {
           if(!(element instanceof HTMLInputElement)) {
             return false;
--- a/mobile/android/chrome/content/SelectionHandler.js
+++ b/mobile/android/chrome/content/SelectionHandler.js
@@ -789,17 +789,17 @@ var SelectionHandler = {
 
           return SelectionHandler.isSelectionActive();
         }
       }
     },
 
     SEARCH_ADD: {
       id: "search_add_action",
-      label: Strings.browser.GetStringFromName("contextmenu.addSearchEngine2"),
+      label: Strings.browser.GetStringFromName("contextmenu.addSearchEngine3"),
       icon: "drawable://ab_add_search_engine",
 
       selector: {
         matches: function(element) {
           if(!(element instanceof HTMLInputElement)) {
             return false;
           }
           let form = element.form;
--- a/mobile/android/chrome/content/browser.js
+++ b/mobile/android/chrome/content/browser.js
@@ -6673,17 +6673,17 @@ var SearchEngines = {
               formData.push({ name: escapedName, value: escapedValue });
               break;
             }
           }
       }
     }
 
     // prompt user for name of search engine
-    let promptTitle = Strings.browser.GetStringFromName("contextmenu.addSearchEngine2");
+    let promptTitle = Strings.browser.GetStringFromName("contextmenu.addSearchEngine3");
     let title = { value: (aElement.ownerDocument.title || docURI.host) };
     if (!Services.prompt.prompt(null, promptTitle, null, title, null, {}))
       return;
 
     // fetch the favicon for this page
     let dbFile = FileUtils.getFile("ProfD", ["browser.db"]);
     let mDBConn = Services.storage.openDatabase(dbFile);
     let stmts = [];
--- a/mobile/android/locales/en-US/chrome/browser.properties
+++ b/mobile/android/locales/en-US/chrome/browser.properties
@@ -257,17 +257,23 @@ contextmenu.copyImageLocation=Copy Image
 contextmenu.shareImage=Share Image
 # LOCALIZATION NOTE (contextmenu.search):
 # The label of the contextmenu item which allows you to search with your default search engine for
 # the text you have selected. %S is the name of the search engine. For example, "Google".
 contextmenu.search=%S Search
 contextmenu.saveImage=Save Image
 contextmenu.showImage=Show Image
 contextmenu.setImageAs=Set Image As
-contextmenu.addSearchEngine2=Add as Search Engine
+# LOCALIZATION NOTE (contextmenu.addSearchEngine3): This string should be rather short. If it is
+# significantly longer than the translation for the "Paste" action then this might trigger an
+# Android bug positioning the floating text selection partially off the screen. This issue heavily
+# depends on the screen size and the specific translations. For English "Paste" / "Add search engine"
+# is working while "Paste" / "Add as search engine" triggers the bug. See bug 1262098 for more details.
+# Manual testing the scenario described in bug 1262098 is highly recommended.
+contextmenu.addSearchEngine3=Add Search Engine
 contextmenu.playMedia=Play
 contextmenu.pauseMedia=Pause
 contextmenu.shareMedia=Share Video
 contextmenu.showControls2=Show Controls
 contextmenu.mute=Mute
 contextmenu.unmute=Unmute
 contextmenu.saveVideo=Save Video
 contextmenu.saveAudio=Save Audio