Bug 1253556 - Remove unnecessary netmonitor.status.* strings. r=vporof
authorAlexandre Poirot <poirot.alex@gmail.com>
Tue, 29 Mar 2016 06:28:17 -0700
changeset 290925 369755dd7d41e76cb409514debb8e62be71ee205
parent 290924 b4941d71b4df56c6f49c6f176cd65bf8af4b0e32
child 290926 c1f0341f9055edd241c8de6663aab14209a766b5
push id74432
push userkwierso@gmail.com
push dateThu, 31 Mar 2016 20:08:46 +0000
treeherdermozilla-inbound@bccb11375f2a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersvporof
bugs1253556
milestone48.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 1253556 - Remove unnecessary netmonitor.status.* strings. r=vporof
devtools/client/locales/en-US/netmonitor.properties
devtools/client/netmonitor/netmonitor-view.js
--- a/devtools/client/locales/en-US/netmonitor.properties
+++ b/devtools/client/locales/en-US/netmonitor.properties
@@ -69,26 +69,16 @@ netmonitor.security.hostHeader=Host %S:
 
 # LOCALIZATION NOTE (netmonitor.security.notAvailable):
 # This string is used to indicate that a certain piece of information is not
 # available to be displayd. For example a certificate that has no organization
 # defined:
 #   Organization: <Not Available>
 netmonitor.security.notAvailable=<Not Available>
 
-# LOCALIZATION NOTE (netmonitor.status.cached):
-# This string is used as tooltip text over the status icon when a request is
-# served from cached.
-netmonitor.status.cached=cached
-
-# LOCALIZATION NOTE (netmonitor.status.serviceWorker):
-# This string is used as tooltip text over the status icon when a request is
-# served from a service worker.
-netmonitor.status.serviceWorker=service worker
-
 # LOCALIZATION NOTE (collapseDetailsPane): This is the tooltip for the button
 # that collapses the network details pane in the UI.
 collapseDetailsPane=Hide request details
 
 # LOCALIZATION NOTE (expandDetailsPane): This is the tooltip for the button
 # that expands the network details pane in the UI.
 expandDetailsPane=Show request details
 
--- a/devtools/client/netmonitor/netmonitor-view.js
+++ b/devtools/client/netmonitor/netmonitor-view.js
@@ -1844,22 +1844,22 @@ RequestsMenuView.prototype = Heritage.ex
 
         let tooltip2 = L10N.getStr("netmonitor.security.state." + value);
         icon.classList.add("security-state-" + value);
         icon.setAttribute("tooltiptext", tooltip2);
         break;
       }
       case "status": {
         let node = $(".requests-menu-status-icon", target);
+        // "code" attribute is only used by css to determine the icon color
         let code;
         if (value.cached) {
-          code = L10N.getStr("netmonitor.status.cached");
           code = "cached";
         } else if (value.serviceWorker) {
-          code = L10N.getStr("netmonitor.status.serviceWorker");
+          code = "service worker";
         } else {
           code = value.status;
         }
         node.setAttribute("code", code);
         let codeNode = $(".requests-menu-status-code", target);
         codeNode.setAttribute("value", value.status);
         break;
       }
@@ -2910,21 +2910,22 @@ NetworkDetailsView.prototype = {
       $("#headers-summary-address-value").setAttribute("value", address);
       $("#headers-summary-address-value").setAttribute("tooltiptext", address);
       $("#headers-summary-address").removeAttribute("hidden");
     } else {
       $("#headers-summary-address").setAttribute("hidden", "true");
     }
 
     if (data.status) {
+      // "code" attribute is only used by css to determine the icon color
       let code;
       if (data.fromCache) {
-        code = L10N.getStr("netmonitor.status.cached");
+        code = "cached";
       } else if (data.fromServiceWorker) {
-        code = L10N.getStr("netmonitor.status.serviceWorker");
+        code = "service worker";
       } else {
         code = data.status;
       }
       $("#headers-summary-status-circle").setAttribute("code", code);
       $("#headers-summary-status-value").setAttribute("value",
         data.status + " " + data.statusText);
       $("#headers-summary-status").removeAttribute("hidden");
     } else {