зеркало из https://github.com/mozilla/gecko-dev.git
Bug 813216: Make about:telemetry description consistent with other Telemetry descriptions. r=ttaubert
This commit is contained in:
Родитель
ce6c454a93
Коммит
dcd17e367e
|
@ -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();
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
<header id="page-description">
|
||||
<h1>&aboutTelemetry.pageTitle;</h1>
|
||||
|
||||
<h2>&aboutTelemetry.pageSubtitle;</h2>
|
||||
<h2 id="page-subtitle"></h2>
|
||||
|
||||
<p id="description-enabled">&aboutTelemetry.telemetryEnabled;</p>
|
||||
<p id="description-disabled">&aboutTelemetry.telemetryDisabled;</p>
|
||||
|
|
|
@ -4,11 +4,6 @@
|
|||
|
||||
<!ENTITY aboutTelemetry.pageTitle "Telemetry Data">
|
||||
|
||||
<!ENTITY aboutTelemetry.pageSubtitle "
|
||||
This page shows the performance and feature-use data collected by Telemetry.
|
||||
This information is submitted anonymously to Mozilla to help improve &brandShortName;.
|
||||
">
|
||||
|
||||
<!ENTITY aboutTelemetry.telemetryEnabled "
|
||||
Telemetry is <span>enabled</span>.
|
||||
">
|
||||
|
|
|
@ -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:
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче