Bug 1378072 - Update entity name of the warning note and its string as the meaning is slightly changed in the latest UX spec. r=lchang draft
authorRay Lin <ralin@mozilla.com>
Mon, 17 Jul 2017 10:28:18 +0800
changeset 609600 2290d3866a0aee8a8bae2920f013926d2b4153f2
parent 609596 aff336ac161daa3ea350e59a288963edbd58ed39
child 637586 e65d09d9382c09c066a775596d8459078182c0e3
push id68595
push userbmo:ralin@mozilla.com
push dateMon, 17 Jul 2017 02:35:57 +0000
reviewerslchang
bugs1378072
milestone56.0a1
Bug 1378072 - Update entity name of the warning note and its string as the meaning is slightly changed in the latest UX spec. r=lchang MozReview-Commit-ID: JVITqjQXBxJ
browser/extensions/formautofill/content/formautofill.xml
browser/extensions/formautofill/locale/en-US/formautofill.properties
browser/extensions/formautofill/test/browser/browser_autocomplete_footer.js
--- a/browser/extensions/formautofill/content/formautofill.xml
+++ b/browser/extensions/formautofill/content/formautofill.xml
@@ -177,17 +177,17 @@
            * @private
            * @param {string|string[]} categories
            *        A list of categories that used to generate the message.
            * @param {boolean} hasExtraCategories
            *        Used to determine if it has the extra categories other than the focued category. If
            *        the value is true, we show "Also fill ...", otherwise, show "Fill ..." only.
            */
           this._updateText = (categories = allFieldCategories, hasExtraCategories = true) => {
-            let warningTextTmplKey = hasExtraCategories ? "phishingWarningMessage" : "phishingWarningMessage2";
+            let warningTextTmplKey = hasExtraCategories ? "phishingWarningMessageDefault" : "phishingWarningMessage";
             let sep = this._stringBundle.GetStringFromName("fieldNameSeparator");
             // Show the categories in certain order to conform with the spec.
             let orderedCategoryList = ["address", "name", "organization", "tel", "email"];
             let showCategories = hasExtraCategories ?
               orderedCategoryList.filter(category => categories.includes(category) && category != focusedCategory) :
               [focusedCategory];
             let categoriesText = showCategories.map(this._stringBundle.GetStringFromName).join(sep);
 
--- a/browser/extensions/formautofill/locale/en-US/formautofill.properties
+++ b/browser/extensions/formautofill/locale/en-US/formautofill.properties
@@ -20,14 +20,14 @@ autocompleteFooterOptionOSX = Form Autof
 autocompleteFooterOptionOSXShort = Preferences
 address = address
 name = name
 organization = company
 tel = phone
 email = email
 # LOCALIZATION NOTE (fieldNameSeparator): This is used as a separator between categories.
 fieldNameSeparator = ,\u0020
-# LOCALIZATION NOTE (phishingWarningMessage, phishingWarningMessage2): The warning
+# LOCALIZATION NOTE (phishingWarningMessageDefault, phishingWarningMessage): The warning
 # text that is displayed for informing users what categories are about to be filled.
 # "%S" will be replaced with a list generated from the pre-defined categories.
 # The text would be e.g. Also fill company, phone, email
-phishingWarningMessage = Also fill %S
-phishingWarningMessage2 = Fill %S
+phishingWarningMessageDefault = Also autofills %S
+phishingWarningMessage = Autofills %S
--- a/browser/extensions/formautofill/test/browser/browser_autocomplete_footer.js
+++ b/browser/extensions/formautofill/test/browser/browser_autocomplete_footer.js
@@ -64,24 +64,24 @@ add_task(async function test_press_enter
 
 add_task(async function test_phishing_warning() {
   await BrowserTestUtils.withNewTab({gBrowser, url: URL}, async function(browser) {
     const {autoCompletePopup, autoCompletePopup: {richlistbox: itemsBox}} = browser;
 
     await openPopupOn(browser, "#street-address");
     const warningBox = itemsBox.querySelector(".autocomplete-richlistitem:last-child")._warningTextBox;
     ok(warningBox, "Got phishing warning box");
-    await expectWarningText(browser, "Also fill company, phone, email");
+    await expectWarningText(browser, "Also autofills company, phone, email");
     await BrowserTestUtils.synthesizeKey("VK_DOWN", {}, browser);
-    await expectWarningText(browser, "Also fill company, phone, email");
+    await expectWarningText(browser, "Also autofills company, phone, email");
     await BrowserTestUtils.synthesizeKey("VK_DOWN", {}, browser);
-    await expectWarningText(browser, "Fill address");
+    await expectWarningText(browser, "Autofills address");
     await BrowserTestUtils.synthesizeKey("VK_DOWN", {}, browser);
     await BrowserTestUtils.synthesizeKey("VK_DOWN", {}, browser);
-    await expectWarningText(browser, "Also fill company, phone, email");
+    await expectWarningText(browser, "Also autofills company, phone, email");
 
     // Ensure the popup is closed before entering the next test.
     await ContentTask.spawn(browser, {}, async function() {
       content.document.getElementById("street-address").blur();
     });
     await BrowserTestUtils.waitForCondition(() => !autoCompletePopup.popupOpen);
   });
 });