Bug 1550087 - Set l10n-id statically on the dismiss-breach-alert button. r=MattN
authorJared Wein <jwein@mozilla.com>
Thu, 03 Oct 2019 15:32:20 +0000
changeset 496181 c3082c1a8f7b97248aa9b5161e22a987b7c66a10
parent 496180 ff09f16f5b3d5310a96675f53671b622a5aa1e5e
child 496182 ea553ba219cd9a631c562bd743e0eeaf857b02f9
push id36646
push usernerli@mozilla.com
push dateThu, 03 Oct 2019 21:48:01 +0000
treeherdermozilla-central@2e1bfb7458de [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersMattN
bugs1550087
milestone71.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 1550087 - Set l10n-id statically on the dismiss-breach-alert button. r=MattN Differential Revision: https://phabricator.services.mozilla.com/D47303
browser/components/aboutlogins/content/aboutLogins.html
browser/components/aboutlogins/content/components/login-item.js
--- a/browser/components/aboutlogins/content/aboutLogins.html
+++ b/browser/components/aboutlogins/content/aboutLogins.html
@@ -145,17 +145,17 @@
       <link rel="stylesheet" href="chrome://browser/content/aboutlogins/common.css">
       <link rel="stylesheet" href="chrome://browser/content/aboutlogins/components/login-item.css">
       <div class="error-message">
         <span class="error-message-text"></span>
       </div>
       <div class="breach-alert">
         <span class="breach-alert-text" data-l10n-id="breach-alert-text"></span>
         <a class="breach-alert-link" data-l10n-id="breach-alert-link" href="#" rel="noreferrer" target="_blank"></a>
-        <button class="dismiss-breach-alert"></button>
+        <button class="dismiss-breach-alert" data-l10n-id="breach-alert-dismiss"></button>
       </div>
       <div class="header">
         <div class="login-item-favicon-wrapper">
           <img class="login-item-favicon" src="" alt=""/>
         </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
@@ -113,20 +113,16 @@ export default class LoginItem extends H
 
   async render() {
     [this._errorMessage, this._breachAlert].forEach(el => {
       el.hidden = true;
     });
     if (this._breachesMap && this._breachesMap.has(this._login.guid)) {
       const breachDetails = this._breachesMap.get(this._login.guid);
       this._breachAlertLink.href = breachDetails.breachAlertURL;
-      document.l10n.setAttributes(
-        this._dismissBreachAlert,
-        "breach-alert-dismiss"
-      );
       this._breachAlert.hidden = false;
     }
     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 || "",
     });