Bug 1592467 - Add strings for vulnerable password banner. r=sfoster,fluent-reviewers,flod
☠☠ backed out by 62b434d3602a ☠ ☠
authorJared Wein <jwein@mozilla.com>
Fri, 27 Mar 2020 02:28:33 +0000
changeset 520685 464d4a60bb1da1d6be9e6bc73970be2dc320dcb3
parent 520684 b25a1f80fe1d7d17885cf15b02fb30622b4d6bc0
child 520686 242b4157658fb75206075a8fe522fab70e857d44
push id111253
push userjwein@mozilla.com
push dateFri, 27 Mar 2020 02:31:31 +0000
treeherderautoland@7f78c8fb5c6e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfoster, fluent-reviewers, flod
bugs1592467
milestone76.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 1592467 - Add strings for vulnerable password banner. r=sfoster,fluent-reviewers,flod Differential Revision: https://phabricator.services.mozilla.com/D68104
browser/components/aboutlogins/content/aboutLogins.html
browser/components/aboutlogins/content/components/login-item.js
browser/locales/en-US/browser/aboutLogins.ftl
--- a/browser/components/aboutlogins/content/aboutLogins.html
+++ b/browser/components/aboutlogins/content/aboutLogins.html
@@ -155,27 +155,30 @@
         <div class="column">
           <div class="error-message">
             <span class="error-message-text" data-l10n-id="about-logins-error-message-default"></span>
             <span class="error-message-link">
               <a data-l10n-name="duplicate-link" href=""></a>
             </span>
           </div>
           <div class="breach-alert">
+            <h3 class="alert-title" data-l10n-id="about-logins-breach-alert-title"></h3>
             <img class="alert-icon" src="chrome://global/skin/icons/warning.svg"/>
+            <span class="alert-date" data-l10n-id="about-logins-breach-alert-date" data-l10n-args='{"date": 0}'></span>
             <span class="alert-text" data-l10n-id="breach-alert-text"></span>
             <a class="alert-link" data-l10n-id="breach-alert-link" href="#" rel="noreferrer" target="_blank"></a>
             <button class="dismiss-alert" data-l10n-id="breach-alert-dismiss">
               <img class="dismiss-alert-icon" src="chrome://global/skin/icons/close.svg"/>
             </button>
           </div>
           <div class="vulnerable-alert">
+            <h3 class="alert-title" data-l10n-id="about-logins-vulnerable-alert-title"></h3>
             <img class="alert-icon" src="chrome://browser/content/aboutlogins/icons/vulnerable-password.svg"/>
             <span class="alert-text" data-l10n-id="about-logins-vulnerable-alert-text"></span>
-            <a class="alert-link" data-l10n-id="about-logins-vulnerable-alert-link" href="#" rel="noreferrer" target="_blank"></a>
+            <a class="alert-link" data-l10n-id="about-logins-vulnerable-alert-link" data-l10n-args='{"hostname": ""}' href="#" rel="noreferrer" target="_blank"></a>
           </div>
           <div class="header">
             <div class="login-item-favicon-wrapper">
               <img class="login-item-favicon" src=""/>
             </div>
             <h2 class="title">
               <span class="login-item-title"></span>
               <span class="new-login-title" data-l10n-id="login-item-new-login-title"></span>
--- a/browser/components/aboutlogins/content/components/login-item.js
+++ b/browser/components/aboutlogins/content/components/login-item.js
@@ -156,17 +156,24 @@ export default class LoginItem extends H
       const breachDetails = this._breachesMap.get(this._login.guid);
       this._breachAlertLink.href = breachDetails.breachAlertURL;
     }
     this._vulnerableAlert.hidden =
       !this._vulnerableLoginsMap ||
       !this._vulnerableLoginsMap.has(this._login.guid) ||
       !this._breachAlert.hidden;
     if (!this._vulnerableAlert.hidden) {
-      // TODO
+      this._vulnerableAlertLink.href = this._login.origin;
+      document.l10n.setAttributes(
+        this._vulnerableAlertLink,
+        "about-logins-vulnerable-alert-link",
+        {
+          hostname: this._login.displayOrigin,
+        }
+      );
     }
     document.l10n.setAttributes(this._timeCreated, "login-item-time-created", {
       timeCreated: this._login.timeCreated || "",
     });
     document.l10n.setAttributes(this._timeChanged, "login-item-time-changed", {
       timeChanged: this._login.timePasswordChanged || "",
     });
     document.l10n.setAttributes(this._timeUsed, "login-item-time-used", {
--- a/browser/locales/en-US/browser/aboutLogins.ftl
+++ b/browser/locales/en-US/browser/aboutLogins.ftl
@@ -162,21 +162,30 @@ confirm-delete-dialog-message = This act
 about-logins-confirm-remove-dialog-confirm-button = Remove
 
 confirm-discard-changes-dialog-title = Discard unsaved changes?
 confirm-discard-changes-dialog-message = All unsaved changes will be lost.
 confirm-discard-changes-dialog-confirm-button = Discard
 
 ## Breach Alert notification
 
+about-logins-breach-alert-title = Website Breach
 breach-alert-text = Passwords were leaked or stolen from this website since you last updated your login details. Change your password to protect your account.
 breach-alert-link = Learn more about this breach.
 breach-alert-dismiss =
     .title = Close this alert
 
+## Vulnerable Password notification
+
+about-logins-vulnerable-alert-title = Vulnerable Password
+about-logins-vulnerable-alert-text = This password was leaked or stolen in another company’s data breach. Reusing credentials puts all of your accounts at risk. To improve your online security, change this password.
+# Variables:
+#   $hostname (String) - The hostname of the website associated with the login, e.g. "example.com"
+about-logins-vulnerable-alert-link = Go to { $hostname }
+
 ## Error Messages
 
 # This is an error message that appears when a user attempts to save
 # a new login that is identical to an existing saved login.
 # Variables:
 #   $loginTitle (String) - The title of the website associated with the login.
 about-logins-error-message-duplicate-login-with-link = An entry for { $loginTitle } with that username already exists. <a data-l10n-name="duplicate-link">Go to existing entry?</a>