Bug 1653798 - Add Primary Password SUMO link and text about the name change. r=preferences-reviewers,fluent-reviewers,flod,ntim
authorMatthew Noorenberghe <mozilla@noorenberghe.ca>
Wed, 22 Jul 2020 07:16:29 +0000
changeset 541658 9520e660ca99d532276fb6b574bf3617e6250fe3
parent 541657 6e2a6477bbf63745f1cf3e813d07aa0869687b19
child 541659 ed8f27f64e2d7688b7ac4d7ca50da9315e293db9
push id122394
push usermozilla@noorenberghe.ca
push dateWed, 22 Jul 2020 18:57:46 +0000
treeherderautoland@9520e660ca99 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerspreferences-reviewers, fluent-reviewers, flod, ntim
bugs1653798
milestone80.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 1653798 - Add Primary Password SUMO link and text about the name change. r=preferences-reviewers,fluent-reviewers,flod,ntim `forms-primary-pw-former-name = {""}` is used when this term didn't change for a locale. Differential Revision: https://phabricator.services.mozilla.com/D84291
browser/components/preferences/privacy.inc.xhtml
browser/components/preferences/privacy.js
browser/locales/en-US/browser/preferences/preferences.ftl
--- a/browser/components/preferences/privacy.inc.xhtml
+++ b/browser/components/preferences/privacy.inc.xhtml
@@ -452,29 +452,39 @@
                     search-l10n-ids="breach-alerts.label"
                     preference="signon.management.page.breach-alerts.enabled"/>
           <label id="breachAlertsLearnMoreLink" class="learnMore" is="text-link"
                  data-l10n-id="forms-breach-alerts-learn-more-link"/>
         </hbox>
       </vbox>
     </hbox>
   </vbox>
-  <hbox id="masterPasswordRow">
-    <checkbox id="useMasterPassword"
-              data-l10n-id="forms-primary-pw-use"
-              flex="1"/>
-    <!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
-    <hbox>
-      <button id="changeMasterPassword"
-              is="highlightable-button"
-              class="accessory-button"
-              search-l10n-ids="forms-master-pw-change.label"
-              data-l10n-id="forms-primary-pw-change"/>
+  <vbox>
+    <hbox id="masterPasswordRow" align="center">
+      <checkbox id="useMasterPassword"
+                data-l10n-id="forms-primary-pw-use"
+                class="tail-with-learn-more"/>
+      <label id="primaryPasswordLearnMoreLink" class="learnMore" is="text-link"
+             flex="1"
+             data-l10n-id="forms-primary-pw-learn-more-link"/>
+      <spacer flex="1"/>
+      <!-- Please don't remove the wrapping hbox/vbox/box for these elements. It's used to properly compute the search tooltip position. -->
+      <hbox>
+        <button id="changeMasterPassword"
+                is="highlightable-button"
+                class="accessory-button"
+                search-l10n-ids="forms-master-pw-change.label"
+                data-l10n-id="forms-primary-pw-change"/>
+      </hbox>
     </hbox>
-  </hbox>
+    <description class="indent tip-caption"
+                 data-l10n-id="forms-primary-pw-former-name"
+                 data-l10n-attrs="hidden"
+                 flex="1"/>
+  </vbox>
   <!--
     Those two strings are meant to be invisible and will be used exclusively to provide
     localization for an alert window.
   -->
   <label id="fips-title" hidden="true" data-l10n-id="forms-primary-pw-fips-title"></label>
   <label id="fips-desc" hidden="true" data-l10n-id="forms-master-pw-fips-desc"></label>
 </groupbox>
 
--- a/browser/components/preferences/privacy.js
+++ b/browser/components/preferences/privacy.js
@@ -1981,16 +1981,22 @@ var gPrivacyPane = {
     var button = document.getElementById("changeMasterPassword");
     button.disabled = noMP;
 
     var checkbox = document.getElementById("useMasterPassword");
     checkbox.checked = !noMP;
     checkbox.disabled =
       (noMP && !Services.policies.isAllowed("createMasterPassword")) ||
       (!noMP && !Services.policies.isAllowed("removeMasterPassword"));
+
+    let learnMoreLink = document.getElementById("primaryPasswordLearnMoreLink");
+    let learnMoreURL =
+      Services.urlFormatter.formatURLPref("app.support.baseURL") +
+      "primary-password-stored-logins";
+    learnMoreLink.setAttribute("href", learnMoreURL);
   },
 
   /**
    * Enables/disables the master password button depending on the state of the
    * "use master password" checkbox, and prompts for master password removal if
    * one is set.
    */
   async updateMasterPasswordButton() {
--- a/browser/locales/en-US/browser/preferences/preferences.ftl
+++ b/browser/locales/en-US/browser/preferences/preferences.ftl
@@ -933,25 +933,30 @@ forms-fill-logins-and-passwords =
     .label = Autofill logins and passwords
     .accesskey = i
 forms-saved-logins =
     .label = Saved Logins…
     .accesskey = L
 forms-primary-pw-use =
     .label = Use a Primary Password
     .accesskey = U
+forms-primary-pw-learn-more-link = Learn more
 # This string uses the former name of the Primary Password feature
 # ("Master Password" in English) so that the preferences can be found
 # when searching for the old name. The accesskey is unused.
 forms-master-pw-change =
     .label = Change Master Password…
     .accesskey = M
 forms-primary-pw-change =
     .label = Change Primary Password…
     .accesskey = P
+# Leave this message empty if the translation for "Primary Password" matches
+# "Master Password" in your language. If you're editing the FTL file directly,
+# use { "" } as the value.
+forms-primary-pw-former-name = Formerly known as Master Password
 
 forms-primary-pw-fips-title = You are currently in FIPS mode. FIPS requires a non-empty Primary Password.
 forms-master-pw-fips-desc = Password Change Failed
 
 ## OS Authentication dialog
 
 # This message can be seen by trying to add a Primary Password.
 primary-password-os-auth-dialog-message-win = To create a Primary Password, enter your Windows login credentials. This helps protect the security of your accounts.