Bug 1535035 - Port bug 1534336: pass fluent IDs directly and pass text nodes in cases where we pass literal strings. r=jorgk DONTBUILD
authorRichard Marti <richard.marti@gmail.com>
Wed, 13 Mar 2019 17:05:20 +0100
changeset 26091 56b74566e302a51dad959f73bf3e9abb26b690fc
parent 26090 1fa6d6d6dd6c1582d0842caf256d0ea011021147
child 26092 0926693124ee59b7f9e252332e42b9dc1469b8c1
push id15663
push usermozilla@jorgk.com
push dateThu, 14 Mar 2019 09:09:39 +0000
treeherdercomm-central@56b74566e302 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjorgk
bugs1535035, 1534336
Bug 1535035 - Port bug 1534336: pass fluent IDs directly and pass text nodes in cases where we pass literal strings. r=jorgk DONTBUILD
mail/components/about-support/content/aboutSupport.js
--- a/mail/components/about-support/content/aboutSupport.js
+++ b/mail/components/about-support/content/aboutSupport.js
@@ -337,17 +337,17 @@ var snapshotFormatters = {
       }
 
       return out;
     };
 
     // Create a <tr> element with key and value columns.
     //
     // @key      Text in the key column. Localized automatically, unless starts with "#".
-    // @value    Text in the value column. Not localized.
+    // @value    Fluent ID for text in the value column, or array of children.
     function buildRow(key, value) {
       let title = key[0] == "#" ? key.substr(1) : key;
       let keyStrId = toFluentID(key);
       let valueStrId = Array.isArray(value) ? null : toFluentID(value);
       let td = $.new("td", value);
       td.style["white-space"] = "pre-wrap";
       if (valueStrId) {
         document.l10n.setAttributes(td, valueStrId);
@@ -495,18 +495,18 @@ var snapshotFormatters = {
     delete data.windowLayerManagerType;
     delete data.numTotalWindows;
     delete data.numAcceleratedWindows;
     delete data.numAcceleratedWindowsMessage;
     delete data.windowUsingAdvancedLayers;
 
     addRow("features", "asyncPanZoom",
            apzInfo.length
-           ? (await document.l10n.formatValues(apzInfo.map(id => { return {id}; }))).join("; ")
-           : await localizedMsg("apz-none"));
+           ? [new Text((await document.l10n.formatValues(apzInfo.map(id => { return {id}; }))).join("; "))]
+           : "apz-none");
     let featureKeys = [
       "webgl1WSIInfo",
       "webgl1Renderer",
       "webgl1Version",
       "webgl1DriverExtensions",
       "webgl1Extensions",
       "webgl2WSIInfo",
       "webgl2Renderer",
@@ -635,17 +635,17 @@ var snapshotFormatters = {
         addRow("decisions", "#" + feature.name, [$.new("table", trs)]);
       }
     } else {
       $("graphics-decisions-tbody").style.display = "none";
     }
 
     if (featureLog.fallbacks.length) {
       for (let fallback of featureLog.fallbacks) {
-        addRow("workarounds", fallback.name, fallback.message);
+        addRow("workarounds", fallback.name, [new Text(fallback.message)]);
       }
     } else {
       $("graphics-workarounds-tbody").style.display = "none";
     }
 
     let crashGuards = data.crashGuards;
     delete data.crashGuards;
 
@@ -666,17 +666,17 @@ var snapshotFormatters = {
     } else {
       $("graphics-crashguards-tbody").style.display = "none";
     }
 
     // Now that we're done, grab any remaining keys in data and drop them into
     // the diagnostics section.
     for (let key in data) {
       let value = data[key];
-      addRow("diagnostics", key, value);
+      addRow("diagnostics", key, [new Text(value)]);
     }
   },
   /* eslint-enable complexity */
 
   media(data) {
     function insertBasicInfo(key, value) {
       function createRow(key, value) {
         let th = $.new("th", null, "column");