Bug 1210347 - Don't automatically uppercase the first character of the connection types in about:webrtc. r=mikedeboer
authorSebastian Hengst <archaeopteryx@coole-files.de>
Thu, 08 Oct 2015 12:55:57 +0200
changeset 266919 ea8b6281c4f4404e185d0beb361fc1855d2330ba
parent 266918 8c65c587460e5ae18c7cd06448707a133810e0e0
child 266920 4359a7f156274a4baca386c5338ef7320601d893
push id66331
push userkwierso@gmail.com
push dateThu, 08 Oct 2015 21:35:51 +0000
treeherdermozilla-inbound@1a5167cd7688 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmikedeboer
bugs1210347
milestone44.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 1210347 - Don't automatically uppercase the first character of the connection types in about:webrtc. r=mikedeboer
toolkit/content/aboutwebrtc/aboutWebrtc.js
toolkit/locales/en-US/chrome/global/aboutWebrtc.properties
--- a/toolkit/content/aboutwebrtc/aboutWebrtc.js
+++ b/toolkit/content/aboutwebrtc/aboutWebrtc.js
@@ -519,20 +519,19 @@ RTPStats.prototype = {
       statsString = label + statsString;
     }
 
     let line = document.createElement("p");
     line.textContent = statsString;
     return line;
   },
 
-  renderTransportStats: function(stats, type) {
-    let label = this.labelize(type);
+  renderTransportStats: function(stats, typeLabel) {
     let time  = new Date(stats.timestamp).toTimeString();
-    let statsString = `${label}: ${time} ${stats.type} SSRC: ${stats.ssrc}`;
+    let statsString = `${typeLabel}: ${time} ${stats.type} SSRC: ${stats.ssrc}`;
 
     if (stats.packetsReceived) {
       statsString += ` ${getString("received_label")}: ${stats.packetsReceived} ${getString("packets")}`;
 
       if (stats.bytesReceived) {
         statsString += ` (${(stats.bytesReceived / 1024).toFixed(2)} Kb)`;
       }
 
@@ -560,28 +559,24 @@ RTPStats.prototype = {
     heading.textContent = stats.id;
     div.appendChild(heading);
 
     if (stats.MozAvSyncDelay || stats.mozJitterBufferDelay) {
       div.appendChild(this.renderAvStats(stats));
     }
 
     div.appendChild(this.renderCoderStats(stats));
-    div.appendChild(this.renderTransportStats(stats, getString("local")));
+    div.appendChild(this.renderTransportStats(stats, getString("typeLocal")));
 
     if (stats.remoteId && stats.remoteRtpStats) {
-      div.appendChild(this.renderTransportStats(stats.remoteRtpStats, getString("remote")));
+      div.appendChild(this.renderTransportStats(stats.remoteRtpStats, getString("typeRemote")));
     }
 
     return div;
   },
-
-  labelize: function(label) {
-    return `${label.charAt(0).toUpperCase()}${label.slice(1)}`;
-  }
 };
 
 function ICEStats(report) {
   this._report = report;
 }
 
 ICEStats.prototype = {
   render: function() {
--- a/toolkit/locales/en-US/chrome/global/aboutWebrtc.properties
+++ b/toolkit/locales/en-US/chrome/global/aboutWebrtc.properties
@@ -71,21 +71,21 @@ av_sync_label = A/V sync
 # This is used as a data label.
 jitter_buffer_delay_label = Jitter-buffer delay
 
 # LOCALIZATION NOTE (avg_bitrate_label, avg_framerate_label): "Avg." is an abbreviation
 # for Average. These are used as data labels.
 avg_bitrate_label = Avg. bitrate
 avg_framerate_label = Avg. framerate
 
-# LOCALIZATION NOTE (local, remote): These adjectives are used to label a
+# LOCALIZATION NOTE (typeLocal, typeRemote): These adjectives are used to label a
 # line of statistics collected for a peer connection. The data represents
 # either the local or remote end of the connection.
-local = local
-remote = remote
+typeLocal = Local
+typeRemote = Remote
 
 # LOCALIZATION NOTE (nominated): This adjective is used to label a table column.
 # Cells in this column contain the localized javascript string representation of "true"
 # or are left blank.
 nominated = Nominated
 
 # LOCALIZATION NOTE (selected): This adjective is used to label a table column.
 # Cells in this column contain the localized javascript string representation of "true"