diff --git a/toolkit/content/aboutTelemetry.js b/toolkit/content/aboutTelemetry.js index 7d11d161e152..15f01d3de150 100644 --- a/toolkit/content/aboutTelemetry.js +++ b/toolkit/content/aboutTelemetry.js @@ -13,11 +13,14 @@ Cu.import("resource://gre/modules/Services.jsm"); const Telemetry = Services.telemetry; const bundle = Services.strings.createBundle( "chrome://global/locale/aboutTelemetry.properties"); +const brandBundle = Services.strings.createBundle( + "chrome://branding/locale/brand.properties"); const TelemetryPing = Cc["@mozilla.org/base/telemetry-ping;1"]. getService(Ci.nsIObserver); // Maximum height of a histogram bar (in em) const MAX_BAR_HEIGHT = 18; +const PREF_TELEMETRY_SERVER_OWNER = "toolkit.telemetry.server_owner"; const PREF_TELEMETRY_ENABLED = "toolkit.telemetry.enabled"; const PREF_DEBUG_SLOW_SQL = "toolkit.telemetry.debugSlowSql"; const PREF_SYMBOL_SERVER_URI = "profiler.symbolicationUrl"; @@ -598,6 +601,19 @@ function toggleSection(aEvent) { toggleLinks[1].classList.toggle("hidden"); } +/** + * Sets the text of the page header based on a config pref + bundle strings + */ +function setupPageHeader() +{ + let serverOwner = getPref(PREF_TELEMETRY_SERVER_OWNER, "Mozilla"); + let brandName = brandBundle.GetStringFromName("brandFullName"); + let subtitleText = bundle.formatStringFromName( + "pageSubtitle", [serverOwner, brandName], 2); + + let subtitleElement = document.getElementById("page-subtitle"); + subtitleElement.appendChild(document.createTextNode(subtitleText)); +} /** * Initializes load/unload, pref change and mouse-click listeners @@ -645,6 +661,9 @@ function setupListeners() { function onLoad() { window.removeEventListener("load", onLoad); + // Set the text in the page header + setupPageHeader(); + // Set up event listeners setupListeners(); diff --git a/toolkit/content/aboutTelemetry.xhtml b/toolkit/content/aboutTelemetry.xhtml index d3969ef292d7..3a93494f79ac 100644 --- a/toolkit/content/aboutTelemetry.xhtml +++ b/toolkit/content/aboutTelemetry.xhtml @@ -28,7 +28,7 @@

&aboutTelemetry.pageTitle;

-

&aboutTelemetry.pageSubtitle;

+

&aboutTelemetry.telemetryEnabled;

&aboutTelemetry.telemetryDisabled;

diff --git a/toolkit/locales/en-US/chrome/global/aboutTelemetry.dtd b/toolkit/locales/en-US/chrome/global/aboutTelemetry.dtd index 0a484d213a7b..8233a499fb18 100644 --- a/toolkit/locales/en-US/chrome/global/aboutTelemetry.dtd +++ b/toolkit/locales/en-US/chrome/global/aboutTelemetry.dtd @@ -4,11 +4,6 @@ - - enabled. "> diff --git a/toolkit/locales/en-US/chrome/global/aboutTelemetry.properties b/toolkit/locales/en-US/chrome/global/aboutTelemetry.properties index f259350ae336..3386dcb8c468 100644 --- a/toolkit/locales/en-US/chrome/global/aboutTelemetry.properties +++ b/toolkit/locales/en-US/chrome/global/aboutTelemetry.properties @@ -2,6 +2,11 @@ # 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/. +# Note to translators: +# - %1$S will be replaced by brandFullName +# - %2$S will be replaced with the value of the toolkit.telemetry.server_owner preference +pageSubtitle = This page shows the information about performance, hardware, usage and customizations collected by Telemetry. This information is submitted to %1$S to help improve %2$S. + slowSqlMain = Slow SQL Statements on Main Thread slowSqlOther = Slow SQL Statements on Helper Threads @@ -12,11 +17,10 @@ slowSqlAverage = Avg. Time (ms) slowSqlStatement = Statement -# Note to translators: Please leave the %S specifiers in the translated string. -# They will be replaced with values programmaticaly, e.g. "Hang Report #3 (5 seconds)" -# - The first %S will be replaced with the number of the hang -# - The second %S will be replaced with the duration of the hang -hangTitle = Hang Report #%S (%S seconds) +# Note to translators: +# - The %1$S will be replaced with the number of the hang +# - The %2$S will be replaced with the duration of the hang +hangTitle = Hang Report #%1$S (%2$S seconds) stackTitle = Stack: