Commit 84f317e9 authored by Robert Helmer's avatar Robert Helmer
Browse files

Bug 1665957 - rename Pioneer to Ion r=maxxcrawford,fluent-reviewers,flod

Differential Revision:
parent 3d53187b
...@@ -57,7 +57,7 @@ var gIdentityHandler = { ...@@ -57,7 +57,7 @@ var gIdentityHandler = {
* RegExp used to decide if an about url should be shown as being part of * RegExp used to decide if an about url should be shown as being part of
* the browser UI. * the browser UI.
*/ */
_secureInternalPages: /^(?:accounts|addons|cache|certificate|config|crashes|downloads|license|logins|preferences|protections|rights|sessionrestore|support|welcomeback|pioneer)(?:[?#]|$)/i, _secureInternalPages: /^(?:accounts|addons|cache|certificate|config|crashes|downloads|license|logins|preferences|protections|rights|sessionrestore|support|welcomeback|ion)(?:[?#]|$)/i,
/** /**
* Whether the established HTTPS connection is considered "broken". * Whether the established HTTPS connection is considered "broken".
...@@ -277,7 +277,7 @@ toolbar[customizing] > .overflow-button { ...@@ -277,7 +277,7 @@ toolbar[customizing] > .overflow-button {
display: none; display: none;
} }
toolbar[customizing] #pioneer-button, toolbar[customizing] #ion-button,
toolbar[customizing] #whats-new-menu-button { toolbar[customizing] #whats-new-menu-button {
display: none; display: none;
} }
...@@ -2001,12 +2001,12 @@ ...@@ -2001,12 +2001,12 @@
<toolbaritem id="PanelUI-button" <toolbaritem id="PanelUI-button"
removable="false"> removable="false">
<toolbarbutton id="pioneer-button" <toolbarbutton id="ion-button"
class="toolbarbutton-1" class="toolbarbutton-1"
hidden="true" hidden="true"
badged="true" badged="true"
onmousedown="switchToTabHavingURI('about:pioneer', true);" onmousedown="switchToTabHavingURI('about:ion', true);"
onkeypress="switchToTabHavingURI('about:pioneer', true);"/> onkeypress="switchToTabHavingURI('about:ion', true);"/>
<toolbarbutton id="whats-new-menu-button" <toolbarbutton id="whats-new-menu-button"
class="toolbarbutton-1" class="toolbarbutton-1"
hidden="true" hidden="true"
...@@ -2193,14 +2193,14 @@ BrowserGlue.prototype = { ...@@ -2193,14 +2193,14 @@ BrowserGlue.prototype = {
_checkHTTPSOnlyPBMPref(); _checkHTTPSOnlyPBMPref();
}, },
_monitorPioneerPref() { _monitorIonPref() {
const PREF_PIONEER_ID = "toolkit.telemetry.pioneerId"; const PREF_ION_ID = "toolkit.telemetry.pioneerId";
const _checkPioneerPref = async () => { const _checkIonPref = async () => {
for (let win of Services.wm.getEnumerator("navigator:browser")) { for (let win of Services.wm.getEnumerator("navigator:browser")) {
win.document.getElementById( win.document.getElementById(
"pioneer-button" "ion-button"
).hidden = !Services.prefs.getStringPref(PREF_PIONEER_ID, null); ).hidden = !Services.prefs.getStringPref(PREF_ION_ID, null);
} }
}; };
...@@ -2208,32 +2208,29 @@ BrowserGlue.prototype = { ...@@ -2208,32 +2208,29 @@ BrowserGlue.prototype = {
onOpenWindow(xulWindow) { onOpenWindow(xulWindow) {
const win = xulWindow.docShell.domWindow; const win = xulWindow.docShell.domWindow;
win.addEventListener("load", () => { win.addEventListener("load", () => {
const pioneerButton = win.document.getElementById("pioneer-button"); const ionButton = win.document.getElementById("ion-button");
if (pioneerButton) { if (ionButton) {
pioneerButton.hidden = !Services.prefs.getStringPref( ionButton.hidden = !Services.prefs.getStringPref(PREF_ION_ID, null);
} }
}); });
}, },
onCloseWindow() {}, onCloseWindow() {},
}; };
Services.prefs.addObserver(PREF_PIONEER_ID, _checkPioneerPref); Services.prefs.addObserver(PREF_ION_ID, _checkIonPref);
Services.wm.addListener(windowListener); Services.wm.addListener(windowListener);
_checkPioneerPref(); _checkIonPref();
}, },
_monitorPioneerStudies() { _monitorIonStudies() {
const STUDY_ADDON_COLLECTION_KEY = "pioneer-study-addons-v1"; const STUDY_ADDON_COLLECTION_KEY = "pioneer-study-addons-v1";
""; "";
const _badgeIcon = async () => { const _badgeIcon = async () => {
for (let win of Services.wm.getEnumerator("navigator:browser")) { for (let win of Services.wm.getEnumerator("navigator:browser")) {
win.document win.document
.getElementById("pioneer-button") .getElementById("ion-button")
.querySelector(".toolbarbutton-badge") .querySelector(".toolbarbutton-badge")
.classList.add("feature-callout"); .classList.add("feature-callout");
} }
...@@ -2243,14 +2240,11 @@ BrowserGlue.prototype = { ...@@ -2243,14 +2240,11 @@ BrowserGlue.prototype = {
onOpenWindow(xulWindow) { onOpenWindow(xulWindow) {
const win = xulWindow.docShell.domWindow; const win = xulWindow.docShell.domWindow;
win.addEventListener("load", () => { win.addEventListener("load", () => {
const pioneerButton = win.document.getElementById("pioneer-button"); const ionButton = win.document.getElementById("ion-button");
if (pioneerButton) { if (ionButton) {
const badge = pioneerButton.querySelector(".toolbarbutton-badge"); const badge = ionButton.querySelector(".toolbarbutton-badge");
if ( if (
Services.prefs.getBoolPref( Services.prefs.getBoolPref(PREF_ION_NEW_STUDIES_AVAILABLE, false)
) { ) {
badge.classList.add("feature-callout"); badge.classList.add("feature-callout");
} else { } else {
...@@ -2263,15 +2257,15 @@ BrowserGlue.prototype = { ...@@ -2263,15 +2257,15 @@ BrowserGlue.prototype = {
}; };
// Update all open windows if the pref changes. // Update all open windows if the pref changes.
Services.prefs.addObserver(PREF_PIONEER_NEW_STUDIES_AVAILABLE, _badgeIcon); Services.prefs.addObserver(PREF_ION_NEW_STUDIES_AVAILABLE, _badgeIcon);
// Badge any currently-open windows. // Badge any currently-open windows.
if (Services.prefs.getBoolPref(PREF_PIONEER_NEW_STUDIES_AVAILABLE, false)) { if (Services.prefs.getBoolPref(PREF_ION_NEW_STUDIES_AVAILABLE, false)) {
_badgeIcon(); _badgeIcon();
} }
RemoteSettings(STUDY_ADDON_COLLECTION_KEY).on("sync", async event => { RemoteSettings(STUDY_ADDON_COLLECTION_KEY).on("sync", async event => {
Services.prefs.setBoolPref(PREF_PIONEER_NEW_STUDIES_AVAILABLE, true); Services.prefs.setBoolPref(PREF_ION_NEW_STUDIES_AVAILABLE, true);
}); });
// When a new window opens, check if we need to badge the icon. // When a new window opens, check if we need to badge the icon.
...@@ -2368,8 +2362,8 @@ BrowserGlue.prototype = { ...@@ -2368,8 +2362,8 @@ BrowserGlue.prototype = {
this._monitorScreenshotsPref(); this._monitorScreenshotsPref();
this._monitorWebcompatReporterPref(); this._monitorWebcompatReporterPref();
this._monitorHTTPSOnlyPref(); this._monitorHTTPSOnlyPref();
this._monitorPioneerPref(); this._monitorIonPref();
this._monitorPioneerStudies(); this._monitorIonStudies();
let pService = Cc[";1"].getService( let pService = Cc[";1"].getService(
Ci.nsIToolkitProfileService Ci.nsIToolkitProfileService
...@@ -118,7 +118,7 @@ static const RedirEntry kRedirMap[] = { ...@@ -118,7 +118,7 @@ static const RedirEntry kRedirMap[] = {
nsIAboutModule::URI_MUST_LOAD_IN_CHILD | nsIAboutModule::ALLOW_SCRIPT | nsIAboutModule::URI_MUST_LOAD_IN_CHILD | nsIAboutModule::ALLOW_SCRIPT |
{"pioneer", "chrome://browser/content/pioneer.html", {"ion", "chrome://browser/content/ion.html",
}; };
...@@ -14,7 +14,7 @@ pages = [ ...@@ -14,7 +14,7 @@ pages = [
'logins', 'logins',
'newinstall', 'newinstall',
'newtab', 'newtab',
'pioneer', 'ion',
'pocket-saved', 'pocket-saved',
'pocket-signup', 'pocket-signup',
'policies', 'policies',
...@@ -143,7 +143,7 @@ details > summary { ...@@ -143,7 +143,7 @@ details > summary {
display: none !important; display: none !important;
} }
#pioneer-icon { #ion-icon {
-moz-context-properties: fill; -moz-context-properties: fill;
fill: currentColor; fill: currentColor;
} }
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at
### This file is not in a locales directory to prevent it from
### being translated as the feature is still in heavy development
### and strings are likely to change often.
-ion-brand-short-name = Ion
ion = { -ion-brand-short-name }
ion-document-title = Put your data to work for a better internet
ion-summary = { -ion-brand-short-name } puts your data to work to address some of today’s most pressing technology concerns, like misinformation, data privacy, and ethical AI. The data you agree to share with Mozilla (the makers of Firefox) helps create tools for better internet transparency and design products that give control back to the people who use them. As a { -ion-brand-short-name } participant, you’ll also have the option to contribute your data to studies sponsored by research institutions and other organizations.
ion-study-prompt = Join to enroll
ion-join-study = Join Study
ion-leave-study = Leave Study
ion-enrollment-button = Join { -ion-brand-short-name }
ion-unenrollment-button = Leave { -ion-brand-short-name }
ion-current-studies = Current Studies
ion-no-current-studies = No current studies, please check back later.
ion-end-study = End Study
ion-ended-study = Study Ended
ion-accept-participate = Accept and Participate
ion-accept-leave = Accept and Leave
ion-cancel = Cancel
ion-consent-notice = { -ion-brand-short-name } Privacy Notice
ion-consent-study-notice = { -ion-brand-short-name } Study Privacy Consent Notice
ion-leave = Leaving { -ion-brand-short-name }
ion-consent-study-title = Leaving Study
ion-consent-study-join = Accept and Join Study
ion-consent-study-leave = Accept and Leave Study
ion-program-consent-intro = When you enroll in { -ion-brand-short-name }, you are sharing personal information. Keeping that information safe is important to us and to the integrity of { -ion-brand-short-name }. Here is how we safeguard your data and protect your identity.
ion-program-study-intro = When you enroll in this study, you are sharing personal information. Keeping that information safe is important to us and to the integrity of { -ion-brand-short-name }. Here is how we safeguard your data and protect your identity.
ion-works-title = How it works:
ion-works-bullet-get-started-title = Get started.
ion-works-bullet-get-started-content = Select the { ion-enrollment-button } button, review and agree to our Privacy Notice, and answer a few (optional) demographic questions. Note that { -ion-brand-short-name } is currently open to participants in the US who are 19 or older.
ion-works-bullet-enroll-title = Enroll in studies.
ion-works-bullet-enroll-content = Share your data with studies run by { -vendor-short-name } and our { -ion-brand-short-name } research partners. You’ll have the opportunity to learn about a study’s goals, the data it collects, and its research team before you enroll.
ion-works-bullet-control-title = Stay in control.
ion-works-bullet-control-content = The { -ion-brand-short-name } icon will appear on the { -brand-product-name } toolbar. Select the icon any time you want to return to this page to update your settings, enroll in a study, or leave a study or the { -ion-brand-short-name } program.
ion-your-data-title = Your data: why it matters and how we protect it
ion-your-data-summary = { -ion-brand-short-name } puts your data to work for a better internet. Our goal is to better understand topics like internet usage, online privacy, algorithmic bias, discrimination, and misinformation. This in turn can lead to new products that fundamentally change the tech landscape and hand more power and control back to users.
ion-your-data-bullet-know = You’ll know the information we plan to collect before we collect it. We publish our data collection documentation, so you can confirm this for yourself. Read each privacy notice for detailed information.
ion-your-data-bullet-lengths = We prioritize securing your data and protecting your privacy.
ion-your-data-bullet-leave = You can leave the { -ion-brand-short-name } program at any time, and we’ll stop collecting data when you do.
ion-your-data-learn-more = Learn more about <a data-l10n-name="privacy-policy">managing the data you share</a> with { -ion-brand-short-name }.
ion-us-only = Sorry, { -ion-brand-short-name } is currently only open to participants in the US.
ion-enroll-effective-date = Effective September 1, 2020
ion-enroll-summary = { -ion-brand-short-name } is an experimental initiative led by Mozilla to better understand how our users use and navigate the internet. { -ion-brand-short-name } is available to Firefox users in the United States who are 19 or older.
ion-enroll-demographic = When you join { -ion-brand-short-name }, we’ll ask you to provide optional demographic data. We’ll also collect basic technical and interaction data as long as you’re participating in { -ion-brand-short-name }. Once you’ve enrolled, you’ll have the opportunity to join available studies—each study will have a specific research purpose and unique privacy notice for you to review before you join it.
ion-enroll-privacy-notice = In this Privacy Notice, we detail what data the { -ion-brand-short-name } program collects and discloses, and why. Read each study’s privacy notice for information about how data is collected and handled in that particular study. We also adhere to the <a data-l10n-name="privacy-notice">Mozilla Privacy Policy</a> for how we receive, handle, and share information.
ion-enroll-data-disclosure = To see a full list of the data we collect, click <a data-l10n-name="privacy-policy">here</a>.
ion-enroll-what-we-collect = What Information We Collect:
ion-enroll-collect-demographic = <strong>Demographic data:</strong> We collect optional, self-reported demographic data from { -ion-brand-short-name } participants, including their age, gender, race/ethnicity, education level, household income, and zip code.
ion-enroll-technical-data = <strong>Technical data:</strong> We collect basic information about your device’s operating system. When Firefox sends data to us, your IP address is temporarily collected as part of our server logs.
ion-enroll-interaction-data = <strong>Interaction data:</strong> We collect data about your interactions with Firefox, like number and type of installed Firefox Add-ons and your active browsing session duration.
ion-enroll-location-data = <strong>Location data:</strong> We will use your IP address to approximate your country location, in addition to collecting your self-reported zip code (if you provide it).
ion-enroll-how-we-use = How We Use Your Information:
ion-enroll-r-and-d = We use the information we collect for for <strong>research and development</strong>, including:
ion-enroll-bullet-criteria = To determine which participants meet the criteria to be available to participate in particular research studies
ion-enroll-bullet-representative = To ensure our data sets are representative of the many users of Firefox
ion-enroll-bullet-improve-existing = To improve our existing products and services
ion-enroll-bullet-create = To create and develop new products
ion-enroll-who-we-disclose-to = Who We May Disclose Information To:
ion-enroll-who-we-disclose-bullet-gcp = <strong>Google Cloud Platform (GCP):</strong> We use GCP as our cloud-storage service. Mozilla has contracted with GCP requiring them to handle the data in ways that are approved by us.
ion-enroll-who-we-disclose-bullet-third-party = <strong>Third-party researchers:</strong> As part of being part of the { -ion-brand-short-name } program, we will offer you the ability to join studies. If necessary for the study, we may ask you to share all or some of the data collected under this Privacy Notice with the third party researcher(s) administering a study. Mozilla will contractually obligate the third party researchers to ensure that your data is handled in ways that are approved by us.
ion-enroll-who-we-disclose-bullet-public = <strong>General public:</strong> To advance our <a data-l10n-name="mozilla-manifesto">mission of being open</a>, we may release data sets to the general public. When we do so, we will aggregate the data and remove identifying information, so the data won’t reveal the behaviors or characteristics of individual users.
ion-enroll-data-management = Data Management:
ion-enroll-data-management-learn-more = You can learn more about managing your { -ion-brand-short-name } and individual study data <a data-l10n-name="privacy-policy">here</a>. If you have any other questions regarding our privacy practices, please contact us at <a data-l10n-name="compliance-email"></a>.
...@@ -10,108 +10,108 @@ ...@@ -10,108 +10,108 @@
<link rel="localization" href="browser/branding/brandings.ftl"> <link rel="localization" href="browser/branding/brandings.ftl">
<link rel="localization" href="branding/brand.ftl"> <link rel="localization" href="branding/brand.ftl">
<!-- Temporary "en-US"-only l10n strings --> <!-- Temporary "en-US"-only l10n strings -->
<link rel="localization" href="preview/pioneer.ftl"> <link rel="localization" href="preview/ion.ftl">
<link rel="stylesheet" href="chrome://global/skin/in-content/common.css"> <link rel="stylesheet" href="chrome://global/skin/in-content/common.css">
<link rel="stylesheet" href="chrome://browser/content/pioneer.css"> <link rel="stylesheet" href="chrome://browser/content/ion.css">
<script src="chrome://browser/content/pioneer.js"></script> <script src="chrome://browser/content/ion.js"></script>
<link rel="icon" href="chrome://browser/skin/pioneer.svg"> <link rel="icon" href="chrome://browser/skin/ion.svg">
<title data-l10n-id="pioneer"></title> <title data-l10n-id="ion"></title>
</head> </head>
<body> <body>
<div id="locale-notification" data-l10n-id="pioneer-us-only"></div> <div id="locale-notification" data-l10n-id="ion-us-only"></div>
<div id="report-content"> <div id="report-content">
<header> <header>
<h1 id="title" data-l10n-id="pioneer-document-title"></h1> <h1 id="title" data-l10n-id="ion-document-title"></h1>
<button id="enrollment-button" class="primary"></button> <button id="enrollment-button" class="primary"></button>
</header> </header>
<div id="summary" data-l10n-id="pioneer-summary"></div> <div id="summary" data-l10n-id="ion-summary"></div>
<div id="details"> <div id="details">
<h2 data-l10n-id="pioneer-works-title"></h2> <h2 data-l10n-id="ion-works-title"></h2>
<p><strong data-l10n-id="pioneer-works-bullet-get-started-title" ></strong> <span data-l10n-id="pioneer-works-bullet-get-started-content"></span></p> <p><strong data-l10n-id="ion-works-bullet-get-started-title" ></strong> <span data-l10n-id="ion-works-bullet-get-started-content"></span></p>
<p><strong data-l10n-id="pioneer-works-bullet-enroll-title" ></strong> <span data-l10n-id="pioneer-works-bullet-enroll-content"></span></p> <p><strong data-l10n-id="ion-works-bullet-enroll-title" ></strong> <span data-l10n-id="ion-works-bullet-enroll-content"></span></p>
<p><strong data-l10n-id="pioneer-works-bullet-control-title" ></strong> <span data-l10n-id="pioneer-works-bullet-control-content"></span></p> <p><strong data-l10n-id="ion-works-bullet-control-title" ></strong> <span data-l10n-id="ion-works-bullet-control-content"></span></p>
</div> </div>
<div id="data"> <div id="data">
<h2 data-l10n-id="pioneer-your-data-title"></h2> <h2 data-l10n-id="ion-your-data-title"></h2>
<p data-l10n-id="pioneer-your-data-summary"></p> <p data-l10n-id="ion-your-data-summary"></p>
<ul> <ul>
<li data-l10n-id="pioneer-your-data-bullet-know"></li> <li data-l10n-id="ion-your-data-bullet-know"></li>
<li data-l10n-id="pioneer-your-data-bullet-lengths"></li> <li data-l10n-id="ion-your-data-bullet-lengths"></li>
<li data-l10n-id="pioneer-your-data-bullet-leave"></li> <li data-l10n-id="ion-your-data-bullet-leave"></li>
</ul> </ul>
<p data-l10n-id="pioneer-your-data-learn-more"> <p data-l10n-id="ion-your-data-learn-more">
<a data-l10n-name="privacy-policy" class="privacy-policy" href="" target="_blank"></a> <a data-l10n-name="privacy-policy" class="privacy-policy" href="" target="_blank"></a>
</p> </p>
</div> </div>
<h2 id="header-available-studies"></h2> <h2 id="header-available-studies"></h2>
<div id="available-studies"></div> <div id="available-studies"></div>
<dialog id="join-pioneer-consent-dialog" class="modal" is="trapped-dialog"> <dialog id="join-ion-consent-dialog" class="modal" is="trapped-dialog">
<h3 data-l10n-id="pioneer-consent-notice"></h3> <h3 data-l10n-id="ion-consent-notice"></h3>
<p data-l10n-id="pioneer-program-consent-intro"></p> <p data-l10n-id="ion-program-consent-intro"></p>
<ul id="join-pioneer-consent" class="consent-list"> <ul id="join-ion-consent" class="consent-list">
<p data-l10n-id="pioneer-enroll-effective-date"></p> <p data-l10n-id="ion-enroll-effective-date"></p>
<p data-l10n-id="pioneer-enroll-summary"></p> <p data-l10n-id="ion-enroll-summary"></p>
<p data-l10n-id="pioneer-enroll-demographic"></p> <p data-l10n-id="ion-enroll-demographic"></p>
<p data-l10n-id="pioneer-enroll-privacy-notice"> <p data-l10n-id="ion-enroll-privacy-notice">
<a data-l10n-name="privacy-notice" class="privacy-notice" href="" target="_blank"></a> <a data-l10n-name="privacy-notice" class="privacy-notice" href="" target="_blank"></a>
</p> </p>
<h2 data-l10n-id="pioneer-enroll-what-we-collect"></h2> <h2 data-l10n-id="ion-enroll-what-we-collect"></h2>
<p data-l10n-id="pioneer-enroll-collect-demographic"></p> <p data-l10n-id="ion-enroll-collect-demographic"></p>
<p data-l10n-id="pioneer-enroll-technical-data"></p> <p data-l10n-id="ion-enroll-technical-data"></p>
<p data-l10n-id="pioneer-enroll-interaction-data"></p> <p data-l10n-id="ion-enroll-interaction-data"></p>
<p data-l10n-id="pioneer-enroll-location-data"></p> <p data-l10n-id="ion-enroll-location-data"></p>
<p data-l10n-id="pioneer-enroll-data-disclosure"> <p data-l10n-id="ion-enroll-data-disclosure">
<a data-l10n-name="privacy-policy" class="privacy-policy" href="" target="_blank"></a> <a data-l10n-name="privacy-policy" class="privacy-policy" href="" target="_blank"></a>
</p> </p>
<h2 data-l10n-id="pioneer-enroll-how-we-use"></h2> <h2 data-l10n-id="ion-enroll-how-we-use"></h2>
<p data-l10n-id="pioneer-enroll-r-and-d"></p> <p data-l10n-id="ion-enroll-r-and-d"></p>
<ul> <ul>
<li data-l10n-id="pioneer-enroll-bullet-criteria"></li> <li data-l10n-id="ion-enroll-bullet-criteria"></li>
<li data-l10n-id="pioneer-enroll-bullet-representative"></li> <li data-l10n-id="ion-enroll-bullet-representative"></li>
<li data-l10n-id="pioneer-enroll-bullet-improve-existing"></li> <li data-l10n-id="ion-enroll-bullet-improve-existing"></li>
<li data-l10n-id="pioneer-enroll-bullet-create"></li> <li data-l10n-id="ion-enroll-bullet-create"></li>
</ul> </ul>
<h2 data-l10n-id="pioneer-enroll-who-we-disclose-to"></h2> <h2 data-l10n-id="ion-enroll-who-we-disclose-to"></h2>
<p data-l10n-id="pioneer-enroll-who-we-disclose-bullet-gcp"></p> <p data-l10n-id="ion-enroll-who-we-disclose-bullet-gcp"></p>
<p data-l10n-id="pioneer-enroll-who-we-disclose-bullet-third-party"></p> <p data-l10n-id="ion-enroll-who-we-disclose-bullet-third-party"></p>
<p data-l10n-id="pioneer-enroll-who-we-disclose-bullet-public"> <p data-l10n-id="ion-enroll-who-we-disclose-bullet-public">
<a data-l10n-name="mozilla-manifesto" href="" target="_blank"></a> <a data-l10n-name="mozilla-manifesto" href="" target="_blank"></a>
</p> </p>
<h2 data-l10n-id="pioneer-enroll-data-management"></h2> <h2 data-l10n-id="ion-enroll-data-management"></h2>
<p data-l10n-id="pioneer-enroll-data-management-learn-more"> <p data-l10n-id="ion-enroll-data-management-learn-more">
<a data-l10n-name="privacy-policy" class="privacy-policy" href="" target="_blank"></a> <a data-l10n-name="privacy-policy" class="privacy-policy" href="" target="_blank"></a>
<a data-l10n-name="compliance-email" href=""></a> <a data-l10n-name="compliance-email" href=""></a>
</p> </p>
</ul> </ul>
<footer> <footer>
<button id="join-pioneer-accept-dialog-button" class="primary" data-l10n-id="pioneer-accept-participate" ></button> <button id="join-ion-accept-dialog-button" class="primary" data-l10n-id="ion-accept-participate" ></button>
<button id="join-pioneer-cancel-dialog-button" data-l10n-id="pioneer-cancel" ></button> <button id="join-ion-cancel-dialog-button" data-l10n-id="ion-cancel" ></button>
</footer> </footer>
</dialog> </dialog>
<dialog id="leave-pioneer-consent-dialog" class="modal" is="trapped-dialog"> <dialog id="leave-ion-consent-dialog" class="modal" is="trapped-dialog">
<h3 data-l10n-id="pioneer-leave"></h3> <h3 data-l10n-id="ion-leave"></h3>
<ul id="leave-pioneer-consent" class="consent-list"></ul> <ul id="leave-ion-consent" class="consent-list"></ul>
<footer> <footer>
<button id="leave-pioneer-cancel-dialog-button" class="primary" data-l10n-id="pioneer-cancel"></button> <button id="leave-ion-cancel-dialog-button" class="primary" data-l10n-id="ion-cancel"></button>
<button id="leave-pioneer-accept-dialog-button" data-l10n-id="pioneer-accept-leave" ></button> <button id="leave-ion-accept-dialog-button" data-l10n-id="ion-accept-leave" ></button>
</footer> </footer>
</dialog> </dialog>
<dialog id="join-study-consent-dialog" class="modal" is="trapped-dialog"> <dialog id="join-study-consent-dialog" class="modal" is="trapped-dialog">
<h3 data-l10n-id="pioneer-consent-study-notice"></h3> <h3 data-l10n-id="ion-consent-study-notice"></h3>
<p data-l10n-id="pioneer-program-study-intro"></p> <p data-l10n-id="ion-program-study-intro"></p>
<ul id="join-study-consent" class="consent-list"></ul> <ul id="join-study-consent" class="consent-list"></ul>
<footer> <footer>
<button id="join-study-accept-dialog-button" class="primary" data-l10n-id="pioneer-consent-study-join"></button> <button id="join-study-accept-dialog-button" class="primary" data-l10n-id="ion-consent-study-join"></button>
<button id="join-study-cancel-dialog-button" data-l10n-id="pioneer-cancel" ></button> <button id="join-study-cancel-dialog-button" data-l10n-id="ion-cancel" ></button>
</footer> </footer>
</dialog> </dialog>
<dialog id="leave-study-consent-dialog" class="modal" is="trapped-dialog"> <dialog id="leave-study-consent-dialog" class="modal" is="trapped-dialog">
<h3 data-l10n-id="pioneer-consent-study-title"></h3> <h3 data-l10n-id="ion-consent-study-title"></h3>
<ul id="leave-study-consent" class="consent-list"></ul> <ul id="leave-study-consent" class="consent-list"></ul>
<footer> <footer>
<button id="leave-study-cancel-dialog-button" class="primary" data-l10n-id="pioneer-cancel" ></button> <button id="leave-study-cancel-dialog-button" class="primary" data-l10n-id="ion-cancel" ></button>
<button id="leave-study-accept-dialog-button" data-l10n-id="pioneer-consent-study-leave"></button> <button id="leave-study-accept-dialog-button" data-l10n-id="ion-consent-study-leave"></button>
</footer> </footer>
</dialog> </dialog>
</div> </div>
...@@ -2,6 +2,15 @@ ...@@ -2,6 +2,15 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this * License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at */ * file, You can obtain one at */
* Control panel for the Ion project, formerly known as Pioneer.
* This lives in `about:ion` and provides a UI for users to un/enroll in the
* overall program, and to un/enroll from individual studies.
* NOTE - prefs and Telemetry both still mention Pioneer for backwards-compatibility,
* this may change in the future.
const { AddonManager } = ChromeUtils.import( const { AddonManager } = ChromeUtils.import(
"resource://gre/modules/AddonManager.jsm" "resource://gre/modules/AddonManager.jsm"
); );
...@@ -16,10 +25,10 @@ const { TelemetryController } = ChromeUtils.import( ...@@ -16,10 +25,10 @@ const { TelemetryController } = ChromeUtils.import(
const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm"); const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
const PREF_PIONEER_ID = "toolkit.telemetry.pioneerId"; const PREF_ION_ID = "toolkit.telemetry.pioneerId";
""; "";
""; "";
/** /**
...@@ -38,15 +47,15 @@ const PREF_TEST_CACHED_ADDONS = ""; ...@@ -38,15 +47,15 @@ const PREF_TEST_CACHED_ADDONS = "";
const PREF_TEST_ADDONS = ""; const PREF_TEST_ADDONS = "";
function showEnrollmentStatus() { function showEnrollmentStatus() {
const pioneerId = Services.prefs.getStringPref(PREF_PIONEER_ID, null); const ionId = Services.prefs.getStringPref(PREF_ION_ID, null);
const enrollmentButton = document.getElementById("enrollment-button"); const enrollmentButton = document.getElementById("enrollment-button");
document.l10n.setAttributes( document.l10n.setAttributes(
enrollmentButton, enrollmentButton,
`pioneer-${pioneerId ? "un" : ""}enrollment-button` `ion-${ionId ? "un" : ""}enrollment-button`
); );
enrollmentButton.classList.toggle("primary", !pioneerId); enrollmentButton.classList.toggle("primary", !ionId);
} }