Bug 1417775 - Always use short version preferences string on form autofill dropdown footer. r=lchang draft
authorRay Lin <ralin@mozilla.com>
Tue, 21 Nov 2017 16:03:30 +0800
changeset 701770 214cc59935ce32bd85d56c1be1875c27c9fd62dc
parent 701610 b96f009478987d44a68a8d7cad40c6a3d6626235
child 741268 714bebb72eb0a5baa1f4150a6785d4be27fd1a5c
push id90273
push userbmo:ralin@mozilla.com
push dateWed, 22 Nov 2017 08:05:32 +0000
reviewerslchang
bugs1417775
milestone59.0a1
Bug 1417775 - Always use short version preferences string on form autofill dropdown footer. r=lchang MozReview-Commit-ID: 2PTkU8xveoU
browser/extensions/formautofill/content/formautofill.xml
browser/extensions/formautofill/locales/en-US/formautofill.properties
--- a/browser/extensions/formautofill/content/formautofill.xml
+++ b/browser/extensions/formautofill/content/formautofill.xml
@@ -241,23 +241,20 @@
       <method name="_adjustAcItem">
         <body>
         <![CDATA[
           /* global Cu */
           this._adjustAutofillItemLayout();
           this.setAttribute("formautofillattached", "true");
 
           let {AppConstants} = Cu.import("resource://gre/modules/AppConstants.jsm", {});
+          // TODO: The "Short" suffix is pointless now as normal version string is no longer needed,
+          // we should consider removing the suffix if possible when the next time locale change.
           let buttonTextBundleKey = AppConstants.platform == "macosx" ?
-            "autocompleteFooterOptionOSX" : "autocompleteFooterOption";
-          // If the popup shows up with small layout, we should use short string to
-          // have a better fit in the box.
-          if (this._itemBox.getAttribute("size") == "small") {
-            buttonTextBundleKey += "Short";
-          }
+            "autocompleteFooterOptionOSXShort" : "autocompleteFooterOptionShort";
           let buttonText = this._stringBundle.GetStringFromName(buttonTextBundleKey);
           this._optionButton.textContent = buttonText;
 
           let value = JSON.parse(this.getAttribute("ac-value"));
 
           this._allFieldCategories = value.categories;
           this._focusedCategory = value.focusedCategory;
           this.showWarningText = this._allFieldCategories && this._focusedCategory;
--- a/browser/extensions/formautofill/locales/en-US/formautofill.properties
+++ b/browser/extensions/formautofill/locales/en-US/formautofill.properties
@@ -46,23 +46,18 @@ neverSaveCreditCardAccessKey = N
 updateCreditCardMessage = Would you like to update your credit card with this new information?
 createCreditCardLabel = Create New Credit Card
 createCreditCardAccessKey = C
 updateCreditCardLabel = Update Credit Card
 updateCreditCardAccessKey = U
 # LOCALIZATION NOTE (openAutofillMessagePanel): Tooltip label for Form Autofill doorhanger icon on address bar.
 openAutofillMessagePanel = Open Form Autofill message panel
 
-# LOCALIZATION NOTE (autocompleteFooterOption, autocompleteFooterOptionOSX): Used as a label for the button,
-# displayed at the bottom of the drop down suggestion, to open Form Autofill browser preferences.
-autocompleteFooterOption = Form Autofill Options
-autocompleteFooterOptionOSX = Form Autofill Preferences
-# LOCALIZATION NOTE (autocompleteFooterOptionShort, autocompleteFooterOptionOSXShort): Used as a label for the button,
-# displayed at the bottom of the drop down suggestion, to open Form Autofill browser preferences. This version is used
-# instead of autocompleteFooterOption* when the menu width is below 185px.
+# LOCALIZATION NOTE ( (autocompleteFooterOptionShort, autocompleteFooterOptionOSXShort): Used as a label for the button,
+# displayed at the bottom of the dropdown suggestion, to open Form Autofill browser preferences.
 autocompleteFooterOptionShort = More Options
 autocompleteFooterOptionOSXShort = Preferences
 # LOCALIZATION NOTE (category.address, category.name, category.organization2, category.tel, category.email):
 # Used in autofill drop down suggestion to indicate what other categories Form Autofill will attempt to fill.
 category.address = address
 category.name = name
 category.organization2 = organization
 category.tel = phone