Bug 1491676 - Moves cloudstorage string r=flod,Gijs
authorJack Smith <jack@jackdeansmith.com>
Fri, 26 Oct 2018 14:57:45 +0000
changeset 443136 6a448725f676cd7b438897804939c05b802ed02f
parent 443135 cde1c74945a22fc553e7893db1c8845b6263d2c3
child 443137 4bf59f00f700b25a3c6d983ed01af60b9ff6d9cc
push id34942
push usercsabou@mozilla.com
push dateFri, 26 Oct 2018 21:55:19 +0000
treeherdermozilla-central@cffa05ba11d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersflod, Gijs
bugs1491676
milestone65.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 1491676 - Moves cloudstorage string r=flod,Gijs Differential Revision: https://phabricator.services.mozilla.com/D8552
browser/components/preferences/in-content/main.js
browser/locales/en-US/browser/preferences/preferences.ftl
toolkit/components/cloudstorage/content/preferences.properties
--- a/browser/components/preferences/in-content/main.js
+++ b/browser/components/preferences/in-content/main.js
@@ -2109,19 +2109,19 @@ var gMainPane = {
    *
    */
   async readCloudStorage() {
     // Get preferred provider in use display name
     let providerDisplayName = await CloudStorage.getProviderIfInUse();
     if (providerDisplayName) {
       // Show cloud storage radio button with provider name in label
       let saveToCloudRadio = document.getElementById("saveToCloud");
-      let cloudStrings = Services.strings.createBundle("resource://cloudstorage/preferences.properties");
-      saveToCloudRadio.label = cloudStrings.formatStringFromName("saveFilesToCloudStorage",
-        [providerDisplayName], 1);
+      document.l10n.setAttributes(saveToCloudRadio, "save-files-to-cloud-storage", {
+        "service-name": providerDisplayName,
+      });
       saveToCloudRadio.hidden = false;
 
       let useDownloadDirPref = Preferences.get("browser.download.useDownloadDir");
       let folderListPref = Preferences.get("browser.download.folderList");
 
       // Check if useDownloadDir is true and folderListPref is set to Cloud Storage value 3
       // before selecting cloudStorageradio button. Disable folder field and Browse button if
       // 'Save to Cloud Storage Provider' radio option is selected
--- a/browser/locales/en-US/browser/preferences/preferences.ftl
+++ b/browser/locales/en-US/browser/preferences/preferences.ftl
@@ -1022,8 +1022,13 @@ certs-enable-ocsp =
 
 certs-view =
     .label = View Certificates…
     .accesskey = C
 
 certs-devices =
     .label = Security Devices…
     .accesskey = D
+
+# Variables:
+#   $service-name (String) - Name of a cloud storage provider like Dropbox, Google Drive, etc...
+save-files-to-cloud-storage =
+    .label = Save files to { $service-name }
deleted file mode 100644
--- a/toolkit/components/cloudstorage/content/preferences.properties
+++ /dev/null
@@ -1,9 +0,0 @@
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0. If a copy of the MPL was not distributed with this
-# file, You can obtain one at http://mozilla.org/MPL/2.0/.
-
-#### Cloud Storage Downloads
-
-# NOTE (saveFilesToCloudStorage): %S is replaced by a service name (Dropbox, Google Drive)
-# String below is hardcoded for en-US and not localized
-saveFilesToCloudStorage=Save files to %S