Bug 1581426 - Update Lockwise connected devices string. r=fluent-reviewers,nhnt11,flod
authorErica Wright <ewright@mozilla.com>
Mon, 18 Nov 2019 19:08:58 +0000
changeset 502460 320e0eac589ddda1bb228d6ae3ebd359b9b29639
parent 502459 b39ba65e2071c2e8f84b166ad367f7fd8c40f7d4
child 502461 855640e1c096c294c882261ee141b6ce4689d0b8
push id114172
push userdluca@mozilla.com
push dateTue, 19 Nov 2019 11:31:10 +0000
treeherdermozilla-inbound@b5c5ba07d3db [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersfluent-reviewers, nhnt11, flod
bugs1581426
milestone72.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 1581426 - Update Lockwise connected devices string. r=fluent-reviewers,nhnt11,flod Differential Revision: https://phabricator.services.mozilla.com/D53080
browser/components/protections/content/lockwise-card.js
browser/components/protections/content/protections.html
browser/components/protections/test/browser/browser_protections_lockwise.js
browser/locales/en-US/browser/protections.ftl
--- a/browser/components/protections/content/lockwise-card.js
+++ b/browser/components/protections/content/lockwise-card.js
@@ -135,25 +135,20 @@ export default class LockwiseCard {
     // Set the text for the number of synced devices.
     const syncedDevicesBlock = container.querySelector(
       ".number-of-synced-devices.block"
     );
     syncedDevicesBlock.textContent = syncedDevices;
 
     const syncedDevicesText = container.querySelector(".synced-devices-text");
     const textEl = syncedDevicesText.querySelector("span");
-    if (syncedDevices) {
-      textEl.setAttribute(
-        "data-l10n-args",
-        JSON.stringify({ count: syncedDevices })
-      );
-      textEl.setAttribute("data-l10n-id", "lockwise-sync-status");
-    } else {
-      textEl.setAttribute("data-l10n-id", "lockwise-sync-not-syncing-devices");
-    }
+    document.l10n.setAttributes(textEl, "lockwise-connected-device-status", {
+      count: syncedDevices,
+    });
+
     // Display the link for enabling sync if no synced devices are detected.
     if (syncedDevices === 0) {
       const syncLink = this.doc.getElementById("turn-on-sync");
       syncLink.classList.remove("hidden");
     } else {
       const manageDevicesLink = this.doc.getElementById("manage-devices");
       manageDevicesLink.href = MANAGE_DEVICES_URL;
       manageDevicesLink.classList.remove("hidden");
--- a/browser/components/protections/content/protections.html
+++ b/browser/components/protections/content/protections.html
@@ -222,17 +222,17 @@
                 <!-- Display number of synced devices here. -->
               </span>
               <span class="synced-devices-text">
                 <img class="icon-small" src="chrome://browser/skin/sync.svg"/>
                 <span>
                   <!-- Display message for status of synced devices here. -->
                 </span>
                 <a id="turn-on-sync" tabindex="0" class="hidden" href="" data-l10n-id="turn-on-sync"></a>
-                <a id="manage-devices" target="_blank" class="hidden" href="" data-l10n-id="manage-devices"></a>
+                <a id="manage-devices" target="_blank" class="hidden" href="" data-l10n-id="manage-connected-devices"></a>
               </span>
             </div>
           </div>
         </div>
       </section>
       <!-- Markup for Proxy card -->
       <section class="card card-no-hover proxy-card hidden">
         <div class="card-header">
--- a/browser/components/protections/test/browser/browser_protections_lockwise.js
+++ b/browser/components/protections/test/browser/browser_protections_lockwise.js
@@ -119,17 +119,17 @@ add_task(async function() {
     info("Also check that content for no synced devices is correct.");
     is(
       numberOfSyncedDevices.textContent,
       0,
       "Zero synced devices are displayed."
     );
     is(
       syncedDevicesStatusText.getAttribute("data-l10n-id"),
-      "lockwise-sync-not-syncing-devices",
+      "lockwise-connected-device-status",
       "Not syncing to other devices."
     );
 
     info("Check that the link to turn on sync is visible.");
     ok(ContentTaskUtils.is_visible(syncLink), "Sync link is visible.");
   });
 
   info(
--- a/browser/locales/en-US/browser/protections.ftl
+++ b/browser/locales/en-US/browser/protections.ftl
@@ -74,26 +74,25 @@ lockwise-passwords-stored =
   { $count ->
      [one] Password stored securely <a data-l10n-name="lockwise-how-it-works">How it works</a>
     *[other] Passwords stored securely <a data-l10n-name="lockwise-how-it-works">How it works</a>
   }
 
 turn-on-sync = Turn on { -sync-brand-short-name }…
   .title = Go to sync preferences
 
-manage-devices = Manage devices
+manage-connected-devices = Manage devices…
 
 # Variables:
 #   $count (Number) - Number of devices connected with sync.
-lockwise-sync-status =
+lockwise-connected-device-status =
   { $count ->
-     [one] Syncing to { $count } other device
-    *[other] Syncing to { $count } other devices
+     [one] Connected to { $count } device
+    *[other] Connected to { $count } devices
   }
-lockwise-sync-not-syncing-devices = Not syncing to other devices
 
 monitor-title = Look out for data breaches
 monitor-link = How it works
 monitor-header-content-no-account = Check { -monitor-brand-name } to see if you’ve been part of a known data breach, and get alerts about new breaches.
 monitor-header-content-signed-in = { -monitor-brand-name } warns you if your info has appeared in a known data breach.
 monitor-sign-up = Sign Up for Breach Alerts
 auto-scan = Automatically scanned today