diff options
Diffstat (limited to 'application')
12 files changed, 189 insertions, 856 deletions
diff --git a/application/basilisk/base/content/browser.css b/application/basilisk/base/content/browser.css index 517c1c5eb..a2c2559d6 100644 --- a/application/basilisk/base/content/browser.css +++ b/application/basilisk/base/content/browser.css @@ -687,6 +687,18 @@ window[chromehidden~="toolbar"] toolbar:not(#nav-bar):not(#TabsToolbar):not(#pri min-width: 1px; } +%ifdef MOZ_SERVICES_SYNC +/* Sync notification UI */ +#sync-notifications { + -moz-binding: url("chrome://browser/content/sync/notification.xml#notificationbox"); + overflow-y: visible !important; +} + +#sync-notifications notification { + -moz-binding: url("chrome://browser/content/sync/notification.xml#notification"); +} +%endif + /* History Swipe Animation */ #historySwipeAnimationContainer { diff --git a/application/basilisk/base/content/browser.js b/application/basilisk/base/content/browser.js index d22316834..49ee14848 100644 --- a/application/basilisk/base/content/browser.js +++ b/application/basilisk/base/content/browser.js @@ -102,6 +102,12 @@ XPCOMUtils.defineLazyGetter(this, "PageMenuParent", function() { return new tmp.PageMenuParent(); }); +#ifdef MOZ_SERVICES_SYNC +XPCOMUtils.defineLazyModuleGetter(this, "Weave", + "resource://services-sync/main.js"); +#endif + + XPCOMUtils.defineLazyGetter(this, "PopupNotifications", function () { let tmp = {}; Cu.import("resource://gre/modules/PopupNotifications.jsm", tmp); @@ -207,6 +213,10 @@ var gInitialPages = [ "about:logopage" ]; +#ifdef MOZ_SERVICES_SYNC +#include browser-syncui.js +#endif + function* browserWindows() { let windows = Services.wm.getEnumerator("navigator:browser"); while (windows.hasMoreElements()) @@ -1307,6 +1317,11 @@ var gBrowserInit = { if (AppConstants.MOZ_DATA_REPORTING) gDataNotificationInfoBar.init(); +#ifdef MOZ_SERVICES_SYNC + // initialize the sync UI + gSyncUI.init(); +#endif + gBrowserThumbnails.init(); gMenuButtonBadgeManager.init(); @@ -1599,6 +1614,11 @@ if (AppConstants.platform == "macosx") { // initialize the private browsing UI gPrivateBrowsingUI.init(); + +#ifdef MOZ_SERVICES_SYNC + // initialize the sync UI + gSyncUI.init(); +#endif }; gBrowserInit.nonBrowserWindowShutdown = function() { @@ -3171,12 +3191,14 @@ var PrintPreviewListener = { this._chromeState.globalNotificationsOpen = !globalNotificationBox.notificationsHidden; globalNotificationBox.notificationsHidden = true; +#ifdef MOZ_SERVICES_SYNC this._chromeState.syncNotificationsOpen = false; var syncNotifications = document.getElementById("sync-notifications"); if (syncNotifications) { this._chromeState.syncNotificationsOpen = !syncNotifications.notificationsHidden; syncNotifications.notificationsHidden = true; } +#endif }, _showChrome: function () { if (this._chromeState.notificationsOpen) @@ -3188,8 +3210,10 @@ var PrintPreviewListener = { if (this._chromeState.globalNotificationsOpen) document.getElementById("global-notificationbox").notificationsHidden = false; +#ifdef MOZ_SERVICES_SYNC if (this._chromeState.syncNotificationsOpen) document.getElementById("sync-notifications").notificationsHidden = false; +#endif if (this._chromeState.sidebarOpen) SidebarUI.show(this._sidebarCommand); @@ -6228,9 +6252,11 @@ function checkEmptyPageOrigin(browser = gBrowser.selectedBrowser, return ssm.isSystemPrincipal(contentPrincipal); } +#ifdef MOZ_SERVICES_SYNC function BrowserOpenSyncTabs() { switchToTabHavingURI("about:sync-tabs", true); } +#endif /** * Format a URL diff --git a/application/basilisk/components/moz.build b/application/basilisk/components/moz.build index 03a211e62..6c6cca9df 100644 --- a/application/basilisk/components/moz.build +++ b/application/basilisk/components/moz.build @@ -19,6 +19,7 @@ DIRS += [ 'sessionstore', 'shell', 'selfsupport', + 'sync', 'translation', ] @@ -34,6 +35,9 @@ XPIDL_MODULE = 'browsercompsbase' EXTRA_COMPONENTS += [ 'BrowserComponents.manifest', 'nsBrowserContentHandler.js', +] + +EXTRA_PP_COMPONENTS += [ 'nsBrowserGlue.js', ] diff --git a/application/basilisk/components/nsBrowserGlue.js b/application/basilisk/components/nsBrowserGlue.js index d77e97f87..82de33240 100644 --- a/application/basilisk/components/nsBrowserGlue.js +++ b/application/basilisk/components/nsBrowserGlue.js @@ -143,6 +143,7 @@ BrowserGlue.prototype = { Services.prefs.savePrefFile(null); }, +#ifdef MOZ_SERVICES_SYNC _setSyncAutoconnectDelay: function BG__setSyncAutoconnectDelay() { // Assume that a non-zero value for services.sync.autoconnectDelay should override if (Services.prefs.prefHasUserValue("services.sync.autoconnectDelay")) { @@ -164,6 +165,7 @@ BrowserGlue.prototype = { Cu.import("resource://services-sync/main.js"); Weave.Service.scheduler.delayedAutoConnect(delay); }, +#endif // nsIObserver implementation observe: function BG_observe(subject, topic, data) { @@ -210,18 +212,14 @@ BrowserGlue.prototype = { this._setPrefToSaveSession(); } break; +#ifdef MOZ_SERVICES_SYNC case "weave:service:ready": this._setSyncAutoconnectDelay(); break; - case "fxaccounts:onverified": - this._showSyncStartedDoorhanger(); - break; - case "fxaccounts:device_disconnected": - this._onDeviceDisconnected(); - break; - case "weave:engine:clients:display-uris": - this._onDisplaySyncURIs(subject); - break; + case "weave:engine:clients:display-uri": + this._onDisplaySyncURI(subject); + break; +#endif case "session-save": this._setPrefToSaveSession(true); subject.QueryInterface(Ci.nsISupportsPRBool); @@ -428,10 +426,10 @@ BrowserGlue.prototype = { os.addObserver(this, "browser-lastwindow-close-requested", false); os.addObserver(this, "browser-lastwindow-close-granted", false); } +#ifdef MOZ_SERVICES_SYNC os.addObserver(this, "weave:service:ready", false); - os.addObserver(this, "fxaccounts:onverified", false); - os.addObserver(this, "fxaccounts:device_disconnected", false); - os.addObserver(this, "weave:engine:clients:display-uris", false); + os.addObserver(this, "weave:engine:clients:display-uri", false); +#endif os.addObserver(this, "session-save", false); os.addObserver(this, "places-init-complete", false); this._isPlacesInitObserver = true; @@ -479,10 +477,10 @@ BrowserGlue.prototype = { os.removeObserver(this, "browser-lastwindow-close-requested"); os.removeObserver(this, "browser-lastwindow-close-granted"); } +#ifdef MOZ_SERVICES_SYNC os.removeObserver(this, "weave:service:ready"); - os.removeObserver(this, "fxaccounts:onverified"); - os.removeObserver(this, "fxaccounts:device_disconnected"); - os.removeObserver(this, "weave:engine:clients:display-uris"); + os.removeObserver(this, "weave:engine:clients:display-uri"); +#endif os.removeObserver(this, "session-save"); if (this._bookmarksBackupIdleTime) { this._idleService.removeIdleObserver(this, this._bookmarksBackupIdleTime); @@ -2274,90 +2272,29 @@ BrowserGlue.prototype = { chromeWindow.openPreferences(...args); }, +#ifdef MOZ_SERVICES_SYNC /** - * Called as an observer when Sync's "display URIs" notification is fired. + * Called as an observer when Sync's "display URI" notification is fired. + * + * We open the received URI in a background tab. * - * We open the received URIs in background tabs. + * Eventually, this will likely be replaced by a more robust tab syncing + * feature. This functionality is considered somewhat evil by UX because it + * opens a new tab automatically without any prompting. However, it is a + * lesser evil than sending a tab to a specific device (from e.g. Fennec) + * and having nothing happen on the receiving end. */ - _onDisplaySyncURIs: function _onDisplaySyncURIs(data) { + _onDisplaySyncURI: function _onDisplaySyncURI(data) { try { - // The payload is wrapped weirdly because of how Sync does notifications. - const URIs = data.wrappedJSObject.object; - - const findWindow = () => RecentWindow.getMostRecentBrowserWindow({private: false}); - - // win can be null, but it's ok, we'll assign it later in openTab() - let win = findWindow(); + let tabbrowser = RecentWindow.getMostRecentBrowserWindow({private: false}).gBrowser; - const openTab = URI => { - let tab; - if (!win) { - Services.appShell.hiddenDOMWindow.open(URI.uri); - win = findWindow(); - tab = win.gBrowser.tabs[0]; - } else { - tab = win.gBrowser.addTab(URI.uri); - } - tab.setAttribute("attention", true); - return tab; - }; - - const firstTab = openTab(URIs[0]); - URIs.slice(1).forEach(URI => openTab(URI)); - - let title, body; - const deviceName = Weave.Service.clientsEngine.getClientName(URIs[0].clientId); - const bundle = Services.strings.createBundle("chrome://browser/locale/accounts.properties"); - if (URIs.length == 1) { - // Due to bug 1305895, tabs from iOS may not have device information, so - // we have separate strings to handle those cases. (See Also - // unnamedTabsArrivingNotificationNoDevice.body below) - if (deviceName) { - title = bundle.formatStringFromName("tabArrivingNotificationWithDevice.title", [deviceName], 1); - } else { - title = bundle.GetStringFromName("tabArrivingNotification.title"); - } - // Use the page URL as the body. We strip the fragment and query to - // reduce size, and also format it the same way that the url bar would. - body = URIs[0].uri.replace(/[?#].*$/, ""); - if (win.gURLBar) { - body = win.gURLBar.trimValue(body); - } - } else { - title = bundle.GetStringFromName("tabsArrivingNotification.title"); - const allSameDevice = URIs.every(URI => URI.clientId == URIs[0].clientId); - const unknownDevice = allSameDevice && !deviceName; - let tabArrivingBody; - if (unknownDevice) { - tabArrivingBody = "unnamedTabsArrivingNotificationNoDevice.body"; - } else if (allSameDevice) { - tabArrivingBody = "unnamedTabsArrivingNotification2.body"; - } else { - tabArrivingBody = "unnamedTabsArrivingNotificationMultiple2.body" - } - - body = bundle.GetStringFromName(tabArrivingBody); - body = PluralForm.get(URIs.length, body); - body = body.replace("#1", URIs.length); - body = body.replace("#2", deviceName); - } - - const clickCallback = (subject, topic, data) => { - if (topic == "alertclickcallback") { - win.gBrowser.selectedTab = firstTab; - } - } - - // Specify an icon because on Windows no icon is shown at the moment - let imageURL; - if (AppConstants.platform == "win") { - imageURL = "chrome://branding/content/icon64.png"; - } - AlertsService.showAlertNotification(imageURL, title, body, true, null, clickCallback); + // The payload is wrapped weirdly because of how Sync does notifications. + tabbrowser.addTab(data.wrappedJSObject.object.uri); } catch (ex) { - Cu.reportError("Error displaying tab(s) received by Sync: " + ex); + Cu.reportError("Error displaying tab received by Sync: " + ex); } }, +#endif _onDeviceDisconnected() { let bundle = Services.strings.createBundle("chrome://browser/locale/accounts.properties"); diff --git a/application/basilisk/components/preferences/in-content/sync.js b/application/basilisk/components/preferences/in-content/sync.js index 32b94de86..917b5f123 100644 --- a/application/basilisk/components/preferences/in-content/sync.js +++ b/application/basilisk/components/preferences/in-content/sync.js @@ -1,32 +1,16 @@ /* 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 http://mozilla.org/MPL/2.0/. */ + * 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/. */ Components.utils.import("resource://services-sync/main.js"); Components.utils.import("resource://gre/modules/Services.jsm"); -XPCOMUtils.defineLazyGetter(this, "FxAccountsCommon", function () { - return Components.utils.import("resource://gre/modules/FxAccountsCommon.js", {}); -}); - -XPCOMUtils.defineLazyModuleGetter(this, "fxAccounts", - "resource://gre/modules/FxAccounts.jsm"); - const PAGE_NO_ACCOUNT = 0; const PAGE_HAS_ACCOUNT = 1; const PAGE_NEEDS_UPDATE = 2; -const FXA_PAGE_LOGGED_OUT = 3; -const FXA_PAGE_LOGGED_IN = 4; - -// Indexes into the "login status" deck. -// We are in a successful verified state - everything should work! -const FXA_LOGIN_VERIFIED = 0; -// We have logged in to an unverified account. -const FXA_LOGIN_UNVERIFIED = 1; -// We are logged in locally, but the server rejected our credentials. -const FXA_LOGIN_FAILED = 2; var gSyncPane = { + _stringBundle: null, prefArray: ["engine.bookmarks", "engine.passwords", "engine.prefs", "engine.tabs", "engine.history"], @@ -45,13 +29,11 @@ var gSyncPane = { needsUpdate: function () { this.page = PAGE_NEEDS_UPDATE; let label = document.getElementById("loginError"); - label.textContent = Weave.Utils.getErrorString(Weave.Status.login); + label.value = Weave.Utils.getErrorString(Weave.Status.login); label.className = "error"; }, init: function () { - this._setupEventListeners(); - // If the Service hasn't finished initializing, wait for it. let xps = Components.classes["@mozilla.org/weave/service;1"] .getService(Components.interfaces.nsISupports) @@ -62,10 +44,6 @@ var gSyncPane = { return; } - // it may take some time before we can determine what provider to use - // and the state of that provider, so show the "please wait" page. - this._showLoadPage(xps); - let onUnload = function () { window.removeEventListener("unload", onUnload, false); try { @@ -85,235 +63,50 @@ var gSyncPane = { xps.ensureLoaded(); }, - _showLoadPage: function (xps) { - let username; - try { - username = Services.prefs.getCharPref("services.sync.username"); - } catch (e) {} - if (!username) { - this.page = FXA_PAGE_LOGGED_OUT; - } else { - this.page = PAGE_HAS_ACCOUNT; - } - }, - _init: function () { let topics = ["weave:service:login:error", "weave:service:login:finish", - "weave:service:start-over:finish", + "weave:service:start-over", "weave:service:setup-complete", - "weave:service:logout:finish", - FxAccountsCommon.ONVERIFIED_NOTIFICATION, - FxAccountsCommon.ONLOGIN_NOTIFICATION, - FxAccountsCommon.ON_PROFILE_CHANGE_NOTIFICATION, - ]; + "weave:service:logout:finish"]; + // Add the observers now and remove them on unload - // XXXzpao This should use Services.obs.* but Weave's Obs does nice handling + //XXXzpao This should use Services.obs.* but Weave's Obs does nice handling // of `this`. Fix in a followup. (bug 583347) topics.forEach(function (topic) { Weave.Svc.Obs.add(topic, this.updateWeavePrefs, this); }, this); - window.addEventListener("unload", function() { topics.forEach(function (topic) { Weave.Svc.Obs.remove(topic, this.updateWeavePrefs, this); }, gSyncPane); }, false); - XPCOMUtils.defineLazyGetter(this, '_stringBundle', () => { - return Services.strings.createBundle("chrome://browser/locale/preferences/preferences.properties"); - }); - - XPCOMUtils.defineLazyGetter(this, '_accountsStringBundle', () => { - return Services.strings.createBundle("chrome://browser/locale/accounts.properties"); - }); - - let url = Services.prefs.getCharPref("identity.mobilepromo.android") + "sync-preferences"; - document.getElementById("fxaMobilePromo-android").setAttribute("href", url); - document.getElementById("fxaMobilePromo-android-hasFxaAccount").setAttribute("href", url); - url = Services.prefs.getCharPref("identity.mobilepromo.ios") + "sync-preferences"; - document.getElementById("fxaMobilePromo-ios").setAttribute("href", url); - document.getElementById("fxaMobilePromo-ios-hasFxaAccount").setAttribute("href", url); - - document.getElementById("tosPP-small-ToS").setAttribute("href", gSyncUtils.tosURL); - document.getElementById("tosPP-normal-ToS").setAttribute("href", gSyncUtils.tosURL); - document.getElementById("tosPP-small-PP").setAttribute("href", gSyncUtils.privacyPolicyURL); - document.getElementById("tosPP-normal-PP").setAttribute("href", gSyncUtils.privacyPolicyURL); - - fxAccounts.promiseAccountsManageURI(this._getEntryPoint()).then(url => { - document.getElementById("verifiedManage").setAttribute("href", url); - }); - + this._stringBundle = + Services.strings.createBundle("chrome://browser/locale/preferences/preferences.properties"); this.updateWeavePrefs(); - - this._initProfileImageUI(); - }, - - _toggleComputerNameControls: function(editMode) { - let textbox = document.getElementById("fxaSyncComputerName"); - textbox.disabled = !editMode; - document.getElementById("fxaChangeDeviceName").hidden = editMode; - document.getElementById("fxaCancelChangeDeviceName").hidden = !editMode; - document.getElementById("fxaSaveChangeDeviceName").hidden = !editMode; - }, - - _focusComputerNameTextbox: function() { - let textbox = document.getElementById("fxaSyncComputerName"); - let valLength = textbox.value.length; - textbox.focus(); - textbox.setSelectionRange(valLength, valLength); - }, - - _blurComputerNameTextbox: function() { - document.getElementById("fxaSyncComputerName").blur(); - }, - - _focusAfterComputerNameTextbox: function() { - // Focus the most appropriate element that's *not* the "computer name" box. - Services.focus.moveFocus(window, - document.getElementById("fxaSyncComputerName"), - Services.focus.MOVEFOCUS_FORWARD, 0); - }, - - _updateComputerNameValue: function(save) { - if (save) { - let textbox = document.getElementById("fxaSyncComputerName"); - Weave.Service.clientsEngine.localName = textbox.value; - } - this._populateComputerName(Weave.Service.clientsEngine.localName); - }, - - _setupEventListeners: function() { - function setEventListener(aId, aEventType, aCallback) - { - document.getElementById(aId) - .addEventListener(aEventType, aCallback.bind(gSyncPane)); - } - - setEventListener("noAccountSetup", "click", function (aEvent) { - aEvent.stopPropagation(); - gSyncPane.openSetup(null); - }); - setEventListener("noAccountPair", "click", function (aEvent) { - aEvent.stopPropagation(); - gSyncPane.openSetup('pair'); - }); - setEventListener("syncChangePassword", "command", - () => gSyncUtils.changePassword()); - setEventListener("syncResetPassphrase", "command", - () => gSyncUtils.resetPassphrase()); - setEventListener("syncReset", "command", gSyncPane.resetSync); - setEventListener("syncAddDeviceLabel", "click", function () { - gSyncPane.openAddDevice(); - return false; - }); - setEventListener("syncEnginesList", "select", function () { - if (this.selectedCount) - this.clearSelection(); - }); - setEventListener("syncComputerName", "change", function (e) { - gSyncUtils.changeName(e.target); - }); - setEventListener("fxaChangeDeviceName", "command", function () { - this._toggleComputerNameControls(true); - this._focusComputerNameTextbox(); - }); - setEventListener("fxaCancelChangeDeviceName", "command", function () { - // We explicitly blur the textbox because of bug 75324, then after - // changing the state of the buttons, force focus to whatever the focus - // manager thinks should be next (which on the mac, depends on an OSX - // keyboard access preference) - this._blurComputerNameTextbox(); - this._toggleComputerNameControls(false); - this._updateComputerNameValue(false); - this._focusAfterComputerNameTextbox(); - }); - setEventListener("fxaSaveChangeDeviceName", "command", function () { - // Work around bug 75324 - see above. - this._blurComputerNameTextbox(); - this._toggleComputerNameControls(false); - this._updateComputerNameValue(true); - this._focusAfterComputerNameTextbox(); - }); - setEventListener("unlinkDevice", "click", function () { - gSyncPane.startOver(true); - return false; - }); - setEventListener("loginErrorUpdatePass", "click", function () { - gSyncPane.updatePass(); - return false; - }); - setEventListener("loginErrorResetPass", "click", function () { - gSyncPane.resetPass(); - return false; - }); - setEventListener("loginErrorStartOver", "click", function () { - gSyncPane.startOver(true); - return false; - }); - setEventListener("noFxaSignUp", "command", function () { - gSyncPane.signUp(); - return false; - }); - setEventListener("noFxaSignIn", "command", function () { - gSyncPane.signIn(); - return false; - }); - setEventListener("fxaUnlinkButton", "command", function () { - gSyncPane.unlinkFirefoxAccount(true); - }); - setEventListener("verifyFxaAccount", "command", - gSyncPane.verifyFirefoxAccount); - setEventListener("unverifiedUnlinkFxaAccount", "command", function () { - /* no warning as account can't have previously synced */ - gSyncPane.unlinkFirefoxAccount(false); - }); - setEventListener("rejectReSignIn", "command", - gSyncPane.reSignIn); - setEventListener("rejectUnlinkFxaAccount", "command", function () { - gSyncPane.unlinkFirefoxAccount(true); - }); - setEventListener("fxaSyncComputerName", "keypress", function (e) { - if (e.keyCode == KeyEvent.DOM_VK_RETURN) { - document.getElementById("fxaSaveChangeDeviceName").click(); - } else if (e.keyCode == KeyEvent.DOM_VK_ESCAPE) { - document.getElementById("fxaCancelChangeDeviceName").click(); - } - }); - }, - - _initProfileImageUI: function () { - try { - if (Services.prefs.getBoolPref("identity.fxaccounts.profile_image.enabled")) { - document.getElementById("fxaProfileImage").hidden = false; - } - } catch (e) { } + document.getElementById("weavePrefsDeck").setAttribute("hidden", ""); }, updateWeavePrefs: function () { - let service = Components.classes["@mozilla.org/weave/service;1"] - .getService(Components.interfaces.nsISupports) - .wrappedJSObject; if (Weave.Status.service == Weave.CLIENT_NOT_CONFIGURED || Weave.Svc.Prefs.get("firstSync", "") == "notReady") { this.page = PAGE_NO_ACCOUNT; - // else: sync was previously configured for the legacy provider, so we - // make the "old" panels available. } else if (Weave.Status.login == Weave.LOGIN_FAILED_INVALID_PASSPHRASE || Weave.Status.login == Weave.LOGIN_FAILED_LOGIN_REJECTED) { this.needsUpdate(); } else { this.page = PAGE_HAS_ACCOUNT; - document.getElementById("accountName").textContent = Weave.Service.identity.account; + document.getElementById("accountName").value = Weave.Service.identity.account; document.getElementById("syncComputerName").value = Weave.Service.clientsEngine.localName; - document.getElementById("tosPP-normal").hidden = this._usingCustomServer; + document.getElementById("tosPP").hidden = this._usingCustomServer; } }, startOver: function (showDialog) { if (showDialog) { let flags = Services.prompt.BUTTON_POS_0 * Services.prompt.BUTTON_TITLE_IS_STRING + - Services.prompt.BUTTON_POS_1 * Services.prompt.BUTTON_TITLE_CANCEL + + Services.prompt.BUTTON_POS_1 * Services.prompt.BUTTON_TITLE_CANCEL + Services.prompt.BUTTON_POS_1_DEFAULT; let buttonChoice = Services.prompt.confirmEx(window, @@ -324,8 +117,9 @@ var gSyncPane = { null, null, null, {}); // If the user selects cancel, just bail - if (buttonChoice == 1) + if (buttonChoice == 1) { return; + } } Weave.Service.startOver(); @@ -333,33 +127,19 @@ var gSyncPane = { }, updatePass: function () { - if (Weave.Status.login == Weave.LOGIN_FAILED_LOGIN_REJECTED) + if (Weave.Status.login == Weave.LOGIN_FAILED_LOGIN_REJECTED) { gSyncUtils.changePassword(); - else + } else { gSyncUtils.updatePassphrase(); + } }, resetPass: function () { - if (Weave.Status.login == Weave.LOGIN_FAILED_LOGIN_REJECTED) + if (Weave.Status.login == Weave.LOGIN_FAILED_LOGIN_REJECTED) { gSyncUtils.resetPassword(); - else + } else { gSyncUtils.resetPassphrase(); - }, - - _getEntryPoint: function () { - let params = new URLSearchParams(document.URL.split("#")[0].split("?")[1] || ""); - return params.get("entrypoint") || "preferences"; - }, - - _openAboutAccounts: function(action) { - let entryPoint = this._getEntryPoint(); - let params = new URLSearchParams(); - if (action) { - params.set("action", action); } - params.set("entrypoint", entryPoint); - - this.replaceTabWithUrl("about:accounts?" + params); }, /** @@ -372,159 +152,16 @@ var gSyncPane = { * "reset" -- reset sync */ openSetup: function (wizardType) { - let service = Components.classes["@mozilla.org/weave/service;1"] - .getService(Components.interfaces.nsISupports) - .wrappedJSObject; - let win = Services.wm.getMostRecentWindow("Weave:AccountSetup"); - if (win) + if (win) { win.focus(); - else { + } else { window.openDialog("chrome://browser/content/sync/setup.xul", "weaveSetup", "centerscreen,chrome,resizable=no", wizardType); } }, - openContentInBrowser: function(url, options) { - let win = Services.wm.getMostRecentWindow("navigator:browser"); - if (!win) { - // no window to use, so use _openLink to create a new one. We don't - // always use that as it prefers to open a new window rather than use - // an existing one. - gSyncUtils._openLink(url); - return; - } - win.switchToTabHavingURI(url, true, options); - }, - - // Replace the current tab with the specified URL. - replaceTabWithUrl(url) { - // Get the <browser> element hosting us. - let browser = window.QueryInterface(Ci.nsIInterfaceRequestor) - .getInterface(Ci.nsIWebNavigation) - .QueryInterface(Ci.nsIDocShell) - .chromeEventHandler; - // And tell it to load our URL. - browser.loadURI(url); - }, - - signUp: function() { - this._openAboutAccounts("signup"); - }, - - signIn: function() { - this._openAboutAccounts("signin"); - }, - - reSignIn: function() { - this._openAboutAccounts("reauth"); - }, - - - clickOrSpaceOrEnterPressed: function(event) { - // Note: charCode is deprecated, but 'char' not yet implemented. - // Replace charCode with char when implemented, see Bug 680830 - return ((event.type == "click" && event.button == 0) || - (event.type == "keypress" && - (event.charCode == KeyEvent.DOM_VK_SPACE || event.keyCode == KeyEvent.DOM_VK_RETURN))); - }, - - openChangeProfileImage: function(event) { - if (this.clickOrSpaceOrEnterPressed(event)) { - fxAccounts.promiseAccountsChangeProfileURI(this._getEntryPoint(), "avatar") - .then(url => { - this.openContentInBrowser(url, { - replaceQueryString: true - }); - }); - // Prevent page from scrolling on the space key. - event.preventDefault(); - } - }, - - openManageFirefoxAccount: function(event) { - if (this.clickOrSpaceOrEnterPressed(event)) { - this.manageFirefoxAccount(); - // Prevent page from scrolling on the space key. - event.preventDefault(); - } - }, - - manageFirefoxAccount: function() { - fxAccounts.promiseAccountsManageURI(this._getEntryPoint()) - .then(url => { - this.openContentInBrowser(url, { - replaceQueryString: true - }); - }); - }, - - verifyFirefoxAccount: function() { - let showVerifyNotification = (data) => { - let isError = !data; - let maybeNot = isError ? "Not" : ""; - let sb = this._accountsStringBundle; - let title = sb.GetStringFromName("verification" + maybeNot + "SentTitle"); - let email = !isError && data ? data.email : ""; - let body = sb.formatStringFromName("verification" + maybeNot + "SentBody", [email], 1); - new Notification(title, { body }) - } - - let onError = () => { - showVerifyNotification(); - }; - - let onSuccess = data => { - if (data) { - showVerifyNotification(data); - } else { - onError(); - } - }; - - fxAccounts.resendVerificationEmail() - .then(fxAccounts.getSignedInUser, onError) - .then(onSuccess, onError); - }, - - openOldSyncSupportPage: function() { - let url = Services.urlFormatter.formatURLPref("app.support.baseURL") + "old-sync"; - this.openContentInBrowser(url); - }, - - unlinkFirefoxAccount: function(confirm) { - if (confirm) { - // We use a string bundle shared with aboutAccounts. - let sb = Services.strings.createBundle("chrome://browser/locale/syncSetup.properties"); - let disconnectLabel = sb.GetStringFromName("disconnect.label"); - let title = sb.GetStringFromName("disconnect.verify.title"); - let body = sb.GetStringFromName("disconnect.verify.bodyHeading") + - "\n\n" + - sb.GetStringFromName("disconnect.verify.bodyText"); - let ps = Services.prompt; - let buttonFlags = (ps.BUTTON_POS_0 * ps.BUTTON_TITLE_IS_STRING) + - (ps.BUTTON_POS_1 * ps.BUTTON_TITLE_CANCEL) + - ps.BUTTON_POS_1_DEFAULT; - - let factory = Cc["@mozilla.org/prompter;1"] - .getService(Ci.nsIPromptFactory); - let prompt = factory.getPrompt(window, Ci.nsIPrompt); - let bag = prompt.QueryInterface(Ci.nsIWritablePropertyBag2); - bag.setPropertyAsBool("allowTabModal", true); - - let pressed = prompt.confirmEx(title, body, buttonFlags, - disconnectLabel, null, null, null, {}); - - if (pressed != 0) { // 0 is the "continue" button - return; - } - } - fxAccounts.signOut().then(() => { - this.updateWeavePrefs(); - }); - }, - openQuotaDialog: function () { let win = Services.wm.getMostRecentWindow("Sync:ViewQuota"); if (win) { @@ -536,27 +173,21 @@ var gSyncPane = { }, openAddDevice: function () { - if (!Weave.Utils.ensureMPUnlocked()) + if (!Weave.Utils.ensureMPUnlocked()) { return; + } let win = Services.wm.getMostRecentWindow("Sync:AddDevice"); - if (win) + if (win) { win.focus(); - else + } else { window.openDialog("chrome://browser/content/sync/addDevice.xul", "syncAddDevice", "centerscreen,chrome,resizable=no"); + } }, resetSync: function () { this.openSetup("reset"); }, - - _populateComputerName(value) { - let textbox = document.getElementById("fxaSyncComputerName"); - if (!textbox.hasAttribute("placeholder")) { - textbox.setAttribute("placeholder", - Weave.Utils.getDefaultDeviceName()); - } - textbox.value = value; - }, }; + diff --git a/application/basilisk/components/preferences/in-content/sync.xul b/application/basilisk/components/preferences/in-content/sync.xul index cf0e81ca1..7ca075483 100644 --- a/application/basilisk/components/preferences/in-content/sync.xul +++ b/application/basilisk/components/preferences/in-content/sync.xul @@ -1,35 +1,22 @@ -# 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 http://mozilla.org/MPL/2.0/. - -<!-- Sync panel --> - -<preferences id="syncEnginePrefs" hidden="true" data-category="paneSync"> - <preference id="engine.addons" - name="services.sync.engine.addons" - type="bool"/> - <preference id="engine.bookmarks" - name="services.sync.engine.bookmarks" - type="bool"/> - <preference id="engine.history" - name="services.sync.engine.history" - type="bool"/> - <preference id="engine.tabs" - name="services.sync.engine.tabs" - type="bool"/> - <preference id="engine.prefs" - name="services.sync.engine.prefs" - type="bool"/> - <preference id="engine.passwords" - name="services.sync.engine.passwords" - type="bool"/> -</preferences> +<!-- 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 http://mozilla.org/MPL/2.0/. --> <script type="application/javascript" src="chrome://browser/content/preferences/in-content/sync.js"/> <script type="application/javascript" src="chrome://browser/content/sync/utils.js"/> +<preferences> +<!-- <preference id="engine.addons" name="services.sync.engine.addons" type="bool"/> --> + <preference id="engine.bookmarks" name="services.sync.engine.bookmarks" type="bool"/> + <preference id="engine.history" name="services.sync.engine.history" type="bool"/> + <preference id="engine.tabs" name="services.sync.engine.tabs" type="bool"/> + <preference id="engine.prefs" name="services.sync.engine.prefs" type="bool"/> + <preference id="engine.passwords" name="services.sync.engine.passwords" type="bool"/> +</preferences> + + <hbox id="header-sync" class="header" hidden="true" @@ -39,22 +26,19 @@ </hbox> <deck id="weavePrefsDeck" data-category="paneSync" hidden="true"> - <!-- These panels are for the "legacy" sync provider --> <vbox id="noAccount" align="center"> <spacer flex="1"/> <description id="syncDesc"> &weaveDesc.label; </description> <separator/> - <label id="noAccountSetup" class="text-link"> - &setupButton.label; - </label> - <vbox id="pairDevice"> - <separator/> - <label id="noAccountPair" class="text-link"> - &pairDevice.label; - </label> - </vbox> + <label class="text-link" + onclick="event.stopPropagation(); gSyncPane.openSetup(null);" + value="&setupButton.label;"/> + <separator/> + <label class="text-link" + onclick="event.stopPropagation(); gSyncPane.openSetup('pair');" + value="&pairDevice.label;"/> <spacer flex="3"/> </vbox> @@ -63,7 +47,7 @@ <!-- label is set to account name --> <caption id="accountCaption" align="center"> <image id="accountCaptionImage"/> - <label id="accountName"/> + <label id="accountName" value=""/> </caption> <hbox> @@ -71,28 +55,39 @@ label="&manageAccount.label;" accesskey="&manageAccount.accesskey;"> <menupopup> - <menuitem id="syncViewQuota" label="&viewQuota.label;" + <menuitem label="&viewQuota.label;" oncommand="gSyncPane.openQuotaDialog();"/> - <menuseparator/> - <menuitem id="syncChangePassword" label="&changePassword2.label;"/> - <menuitem id="syncResetPassphrase" label="&myRecoveryKey.label;"/> <menuseparator/> - <menuitem id="syncReset" label="&resetSync2.label;"/> + <menuitem label="&changePassword2.label;" + oncommand="gSyncUtils.changePassword();"/> + <menuitem label="&myRecoveryKey.label;" + oncommand="gSyncUtils.resetPassphrase();"/> + <menuseparator/> + <menuitem label="&resetSync2.label;" + oncommand="gSyncPane.resetSync();"/> </menupopup> </button> </hbox> <hbox> <label id="syncAddDeviceLabel" - class="text-link"> - &pairDevice.label; - </label> + class="text-link" + onclick="gSyncPane.openAddDevice(); return false;" + value="&pairDevice.label;"/> </hbox> <vbox> - <label>&syncMy.label;</label> + <label value="&syncMy.label;" /> <richlistbox id="syncEnginesList" - orient="vertical"> + orient="vertical" + onselect="if (this.selectedCount) this.clearSelection();"> + <!-- + <richlistitem> + <checkbox label="&engine.addons.label;" + accesskey="&engine.addons.accesskey;" + preference="engine.addons"/> + </richlistitem> + --> <richlistitem> <checkbox label="&engine.bookmarks.label;" accesskey="&engine.bookmarks.accesskey;" @@ -130,228 +125,42 @@ </columns> <rows> <row align="center"> - <label control="syncComputerName"> - &syncDeviceName.label; - </label> - <textbox id="syncComputerName"/> + <label value="&syncDeviceName.label;" + accesskey="&syncDeviceName.accesskey;" + control="syncComputerName"/> + <textbox id="syncComputerName" + onchange="gSyncUtils.changeName(this)"/> </row> </rows> </grid> <hbox> - <label id="unlinkDevice" class="text-link"> - &unlinkDevice.label; - </label> + <label class="text-link" + onclick="gSyncPane.startOver(true); return false;" + value="&unlinkDevice.label;"/> </hbox> </groupbox> - <vbox id="tosPP-normal"> - <label id="tosPP-normal-ToS" class="text-link"> - &prefs.tosLink.label; - </label> - <label id="tosPP-normal-PP" class="text-link"> - &prefs.ppLink.label; - </label> - </vbox> - </vbox> - - <vbox id="needsUpdate" align="center" pack="center"> - <hbox> - <label id="loginError"/> - <label id="loginErrorUpdatePass" class="text-link"> - &updatePass.label; - </label> - <label id="loginErrorResetPass" class="text-link"> - &resetPass.label; - </label> + <hbox id="tosPP" pack="center"> + <label class="text-link" + onclick="event.stopPropagation();gSyncUtils.openToS();" + value="&prefs.tosLink.label;"/> + <label class="text-link" + onclick="event.stopPropagation();gSyncUtils.openPrivacyPolicy();" + value="&prefs.ppLink.label;"/> </hbox> - <label id="loginErrorStartOver" class="text-link"> - &unlinkDevice.label; - </label> </vbox> - <!-- These panels are for the Firefox Accounts identity provider --> - <vbox id="noFxaAccount"> - <hbox> - <vbox id="fxaContentWrapper"> - <groupbox id="noFxaGroup"> - <vbox> - <label id="noFxaCaption">&signedOut.caption;</label> - <description id="noFxaDescription" flex="1">&signedOut.description;</description> - <hbox class="fxaAccountBox"> - <vbox> - <image class="fxaFirefoxLogo"/> - </vbox> - <vbox flex="1"> - <label id="signedOutAccountBoxTitle">&signedOut.accountBox.title;</label> - <hbox class="fxaAccountBoxButtons"> - <button id="noFxaSignUp" label="&signedOut.accountBox.create;" accesskey="&signedOut.accountBox.create.accesskey;"></button> - <button id="noFxaSignIn" label="&signedOut.accountBox.signin;" accesskey="&signedOut.accountBox.signin.accesskey;"></button> - </hbox> - </vbox> - </hbox> - </vbox> - </groupbox> - </vbox> - <vbox> - <image class="fxaSyncIllustration"/> - </vbox> - </hbox> - <label class="fxaMobilePromo"> - &mobilePromo3.start;<!-- We put these comments to avoid inserting white spaces - --><label id="fxaMobilePromo-android" - class="androidLink text-link"><!-- - -->&mobilePromo3.androidLink;</label><!-- - -->&mobilePromo3.iOSBefore;<!-- - --><label id="fxaMobilePromo-ios" - class="iOSLink text-link"><!-- - -->&mobilePromo3.iOSLink;</label><!-- - -->&mobilePromo3.end; - </label> - </vbox> - - <vbox id="hasFxaAccount"> + <vbox id="needsUpdate" align="center" pack="center"> <hbox> - <vbox id="fxaContentWrapper"> - <groupbox id="fxaGroup"> - <caption><label>&syncBrand.fxAccount.label;</label></caption> - <deck id="fxaLoginStatus"> - - <!-- logged in and verified and all is good --> - <hbox id="fxaLoginVerified" class="fxaAccountBox"> - <vbox align="center" pack="center"> - <image id="fxaProfileImage" class="actionable" - role="button" - onclick="gSyncPane.openChangeProfileImage(event);" hidden="true" - onkeypress="gSyncPane.openChangeProfileImage(event);" - tooltiptext="&profilePicture.tooltip;"/> - </vbox> - <vbox flex="1" pack="center"> - <label id="fxaDisplayName" hidden="true"/> - <label id="fxaEmailAddress1"/> - <hbox class="fxaAccountBoxButtons"> - <button id="fxaUnlinkButton" label="&disconnect.label;" accesskey="&disconnect.accesskey;"/> - <html:a id="verifiedManage" target="_blank" - accesskey="&verifiedManage.accesskey;" - onkeypress="gSyncPane.openManageFirefoxAccount(event);"><!-- - -->&verifiedManage.label;</html:a> - </hbox> - </vbox> - </hbox> - - <!-- logged in to an unverified account --> - <hbox id="fxaLoginUnverified" class="fxaAccountBox"> - <vbox> - <image id="fxaProfileImage"/> - </vbox> - <vbox flex="1"> - <hbox> - <vbox><image id="fxaLoginRejectedWarning"/></vbox> - <description flex="1"> - &signedInUnverified.beforename.label; - <label id="fxaEmailAddress2"/> - &signedInUnverified.aftername.label; - </description> - </hbox> - <hbox class="fxaAccountBoxButtons"> - <button id="verifyFxaAccount" accesskey="&verify.accesskey;">&verify.label;</button> - <button id="unverifiedUnlinkFxaAccount" accesskey="&forget.accesskey;">&forget.label;</button> - </hbox> - </vbox> - </hbox> - - <!-- logged in locally but server rejected credentials --> - <hbox id="fxaLoginRejected" class="fxaAccountBox"> - <vbox> - <image id="fxaProfileImage"/> - </vbox> - <vbox flex="1"> - <hbox> - <vbox><image id="fxaLoginRejectedWarning"/></vbox> - <description flex="1"> - &signedInLoginFailure.beforename.label; - <label id="fxaEmailAddress3"/> - &signedInLoginFailure.aftername.label; - </description> - </hbox> - <hbox class="fxaAccountBoxButtons"> - <button id="rejectReSignIn" accessky="&signIn.accesskey;">&signIn.label;</button> - <button id="rejectUnlinkFxaAccount" accesskey="&forget.accesskey;">&forget.label;</button> - </hbox> - </vbox> - </hbox> - </deck> - </groupbox> - <groupbox id="syncOptions"> - <caption><label>&signedIn.engines.label;</label></caption> - <hbox id="fxaSyncEngines"> - <vbox align="start" flex="1"> - <checkbox label="&engine.tabs.label;" - accesskey="&engine.tabs.accesskey;" - preference="engine.tabs"/> - <checkbox label="&engine.bookmarks.label;" - accesskey="&engine.bookmarks.accesskey;" - preference="engine.bookmarks"/> - <checkbox label="&engine.passwords.label;" - accesskey="&engine.passwords.accesskey;" - preference="engine.passwords"/> - </vbox> - <vbox align="start" flex="1"> - <checkbox label="&engine.history.label;" - accesskey="&engine.history.accesskey;" - preference="engine.history"/> - <checkbox label="&engine.addons.label;" - accesskey="&engine.addons.accesskey;" - preference="engine.addons"/> - <checkbox label="&engine.prefs.label;" - accesskey="&engine.prefs.accesskey;" - preference="engine.prefs"/> - </vbox> - <spacer/> - </hbox> - </groupbox> - </vbox> - <vbox> - <image class="fxaSyncIllustration"/> - </vbox> + <label id="loginError" value=""/> + <label class="text-link" + onclick="gSyncPane.updatePass(); return false;" + value="&updatePass.label;"/> + <label class="text-link" + onclick="gSyncPane.resetPass(); return false;" + value="&resetPass.label;"/> </hbox> - <groupbox> - <caption> - <label control="fxaSyncComputerName"> - &fxaSyncDeviceName.label; - </label> - </caption> - <hbox id="fxaDeviceName"> - <textbox id="fxaSyncComputerName" disabled="true"/> - <hbox> - <button id="fxaChangeDeviceName" - label="&changeSyncDeviceName.label;" - accesskey="&changeSyncDeviceName.accesskey;"/> - <button id="fxaCancelChangeDeviceName" - label="&cancelChangeSyncDeviceName.label;" - accesskey="&cancelChangeSyncDeviceName.accesskey;" - hidden="true"/> - <button id="fxaSaveChangeDeviceName" - label="&saveChangeSyncDeviceName.label;" - accesskey="&saveChangeSyncDeviceName.accesskey;" - hidden="true"/> - </hbox> - </hbox> - </groupbox> - <label class="fxaMobilePromo"> - &mobilePromo3.start;<!-- We put these comments to avoid inserting white spaces - --><label class="androidLink text-link" id="fxaMobilePromo-android-hasFxaAccount"><!-- - -->&mobilePromo3.androidLink;</label><!-- - -->&mobilePromo3.iOSBefore;<!-- - --><label class="iOSLink text-link" id="fxaMobilePromo-ios-hasFxaAccount"><!-- - -->&mobilePromo3.iOSLink;</label><!-- - -->&mobilePromo3.end; - </label> - <vbox id="tosPP-small" align="start"> - <label id="tosPP-small-ToS" class="text-link"> - &prefs.tosLink.label; - </label> - <label id="tosPP-small-PP" class="text-link"> - &fxaPrivacyNotice.link.label; - </label> - </vbox> + <label class="text-link" + onclick="gSyncPane.startOver(true); return false;" + value="&unlinkDevice.label;"/> </vbox> </deck> diff --git a/application/basilisk/locales/en-US/chrome/browser/preferences/sync.dtd b/application/basilisk/locales/en-US/chrome/browser/preferences/sync.dtd index a5b290052..f6ef3b876 100644 --- a/application/basilisk/locales/en-US/chrome/browser/preferences/sync.dtd +++ b/application/basilisk/locales/en-US/chrome/browser/preferences/sync.dtd @@ -39,80 +39,9 @@ <!-- Device Settings --> <!ENTITY syncDeviceName.label "Device Name:"> -<!ENTITY fxaSyncDeviceName.label "Device Name"> -<!ENTITY changeSyncDeviceName.label "Change Device Name…"> -<!ENTITY changeSyncDeviceName.accesskey "h"> -<!ENTITY cancelChangeSyncDeviceName.label "Cancel"> -<!ENTITY cancelChangeSyncDeviceName.accesskey "n"> -<!ENTITY saveChangeSyncDeviceName.label "Save"> -<!ENTITY saveChangeSyncDeviceName.accesskey "v"> +<!ENTITY syncDeviceName.accesskey "c"> <!ENTITY unlinkDevice.label "Unlink This Device"> <!-- Footer stuff --> <!ENTITY prefs.tosLink.label "Terms of Service"> <!ENTITY prefs.ppLink.label "Privacy Policy"> - -<!-- Firefox Accounts stuff --> -<!ENTITY fxaPrivacyNotice.link.label "Privacy Notice"> -<!ENTITY determiningAcctStatus.label "Determining your account status…"> - -<!-- LOCALIZATION NOTE (signedInUnverified.beforename.label, -signedInUnverified.aftername.label): these two string are used respectively -before and after the account email address. Localizers can use one of them, or -both, to better adapt this sentence to their language. ---> -<!ENTITY signedInUnverified.beforename.label ""> -<!ENTITY signedInUnverified.aftername.label "is not verified."> - -<!-- LOCALIZATION NOTE (signedInLoginFailure.beforename.label, -signedInLoginFailure.aftername.label): these two string are used respectively -before and after the account email address. Localizers can use one of them, or -both, to better adapt this sentence to their language. ---> -<!ENTITY signedInLoginFailure.beforename.label "Please sign in to reconnect"> -<!ENTITY signedInLoginFailure.aftername.label ""> - -<!ENTITY notSignedIn.label "You are not signed in."> -<!ENTITY signIn.label "Sign in"> -<!ENTITY signIn.accesskey "g"> -<!ENTITY profilePicture.tooltip "Change profile picture"> -<!ENTITY verifiedManage.label "Manage Account"> -<!ENTITY verifiedManage.accesskey "o"> -<!ENTITY disconnect.label "Disconnect…"> -<!ENTITY disconnect.accesskey "D"> -<!ENTITY verify.label "Verify Email"> -<!ENTITY verify.accesskey "V"> -<!ENTITY forget.label "Forget this Email"> -<!ENTITY forget.accesskey "F"> - -<!ENTITY welcome.description "Access your tabs, bookmarks, passwords and more wherever you use &brandShortName;."> -<!ENTITY welcome.signIn.label "Sign In"> -<!ENTITY welcome.createAccount.label "Create Account"> - -<!ENTITY welcome.useOldSync.label "Using an older version of Sync?"> - -<!ENTITY signedOut.caption "Take your Web with you"> -<!ENTITY signedOut.description "Synchronize your bookmarks, history, tabs, passwords, add-ons, and preferences across all your devices."> -<!ENTITY signedOut.accountBox.title "Connect with a &syncBrand.fxAccount.label;"> -<!ENTITY signedOut.accountBox.create "Create Account"> -<!ENTITY signedOut.accountBox.create.accesskey "C"> -<!ENTITY signedOut.accountBox.signin "Sign In"> -<!ENTITY signedOut.accountBox.signin.accesskey "I"> - -<!ENTITY signedIn.engines.label "Sync across all devices"> - -<!-- LOCALIZATION NOTE (mobilePromo3.*): the following strings will be used to - create a single sentence with active links. - The resulting sentence in English is: "Download Firefox for - Android or iOS to sync with your mobile device." --> - -<!ENTITY mobilePromo3.start "Download Firefox for "> -<!-- LOCALIZATION NOTE (mobilePromo3.androidLink): This is a link title that links to https://www.mozilla.org/firefox/android/ --> -<!ENTITY mobilePromo3.androidLink "Android"> - -<!-- LOCALIZATION NOTE (mobilePromo3.iOSBefore): This is text displayed between mobilePromo3.androidLink and mobilePromo3.iosLink --> -<!ENTITY mobilePromo3.iOSBefore " or "> -<!-- LOCALIZATION NOTE (mobilePromo3.iOSLink): This is a link title that links to https://www.mozilla.org/firefox/ios/ --> -<!ENTITY mobilePromo3.iOSLink "iOS"> - -<!ENTITY mobilePromo3.end " to sync with your mobile device."> diff --git a/application/basilisk/locales/en-US/chrome/browser/syncBrand.dtd b/application/basilisk/locales/en-US/chrome/browser/syncBrand.dtd index 71a9f68af..bc4d1b3e0 100644 --- a/application/basilisk/locales/en-US/chrome/browser/syncBrand.dtd +++ b/application/basilisk/locales/en-US/chrome/browser/syncBrand.dtd @@ -4,4 +4,3 @@ <!ENTITY syncBrand.shortName.label "Sync"> <!ENTITY syncBrand.fullName.label "Pale Moon Sync"> -<!ENTITY syncBrand.fxAccount.label "Firefox Account"> diff --git a/application/basilisk/locales/en-US/chrome/browser/syncKey.dtd b/application/basilisk/locales/en-US/chrome/browser/syncKey.dtd index 2ff001842..f37f2c92e 100644 --- a/application/basilisk/locales/en-US/chrome/browser/syncKey.dtd +++ b/application/basilisk/locales/en-US/chrome/browser/syncKey.dtd @@ -5,12 +5,12 @@ <!ENTITY syncKey.page.title "Your &syncBrand.fullName.label; Key"> <!ENTITY syncKey.page.description2 "This key is used to decode the data in your &syncBrand.fullName.label; account. You will need to enter the key each time you configure &syncBrand.fullName.label; on a new device."> <!ENTITY syncKey.keepItSecret.heading "Keep it secret"> -<!ENTITY syncKey.keepItSecret.description "Your &syncBrand.fullName.label; account is encrypted to protect your privacy. Without this key, it would take years for anyone to decode your personal information. You are the only person who holds this key. This means you’re the only one who can access your &syncBrand.fullName.label; data."> +<!ENTITY syncKey.keepItSecret.description "Your &syncBrand.fullName.label; account is encrypted to protect your privacy. Without this key, it would take years for anyone to decode your personal information. You are the only person who holds this key. This means you're the only one who can access your &syncBrand.fullName.label; data."> <!ENTITY syncKey.keepItSafe.heading "Keep it safe"> <!ENTITY syncKey.keepItSafe1.description "Do not lose this key."> -<!ENTITY syncKey.keepItSafe2.description " We don’t keep a copy of your key (that wouldn’t be keeping it secret!) so "> -<!ENTITY syncKey.keepItSafe3.description "we can’t help you recover it"> -<!ENTITY syncKey.keepItSafe4a.description " if it’s lost. You’ll need to use this key any time you connect a new device to &syncBrand.fullName.label;."> +<!ENTITY syncKey.keepItSafe2.description " We don't keep a copy of your key (that wouldn't be keeping it secret!) so "> +<!ENTITY syncKey.keepItSafe3.description "we can't help you recover it"> +<!ENTITY syncKey.keepItSafe4a.description " if it's lost. You'll need to use this key any time you connect a new device to &syncBrand.fullName.label;."> <!ENTITY syncKey.findOutMore1.label "Find out more about &syncBrand.fullName.label; and your privacy at "> <!ENTITY syncKey.findOutMore2.label "."> <!ENTITY syncKey.footer1.label "&syncBrand.fullName.label; Terms of Service are available at "> diff --git a/application/basilisk/locales/en-US/chrome/browser/syncQuota.properties b/application/basilisk/locales/en-US/chrome/browser/syncQuota.properties index 099090ec9..0e1b857ca 100644 --- a/application/basilisk/locales/en-US/chrome/browser/syncQuota.properties +++ b/application/basilisk/locales/en-US/chrome/browser/syncQuota.properties @@ -30,7 +30,7 @@ quota.remove.label = Remove quota.treeCaption.label = Uncheck items to stop syncing them and free up space on the server. # LOCALIZATION NOTE (quota.removal.label): %S is a list of engines that will be # disabled and whose data will be removed once the user confirms. -quota.removal.label = Firefox Sync will remove the following data: %S. +quota.removal.label = Sync will remove the following data: %S. # LOCALIZATION NOTE (quota.list.separator): This is the separator string used # for the list of engines (incl. spaces where appropriate) quota.list.separator = ,\u0020 diff --git a/application/basilisk/locales/en-US/chrome/browser/syncSetup.dtd b/application/basilisk/locales/en-US/chrome/browser/syncSetup.dtd index 2657156b7..7ee938e5d 100644 --- a/application/basilisk/locales/en-US/chrome/browser/syncSetup.dtd +++ b/application/basilisk/locales/en-US/chrome/browser/syncSetup.dtd @@ -6,13 +6,13 @@ <!-- First page of the wizard --> -<!ENTITY setup.pickSetupType.description2 "Welcome! If you’ve never used &syncBrand.fullName.label; before, you will need to create a new account."> +<!ENTITY setup.pickSetupType.description2 "Welcome! If you've never used &syncBrand.fullName.label; before, you will need to create a new account."> <!ENTITY button.createNewAccount.label "Create a New Account"> <!ENTITY button.haveAccount.label "I Have an Account"> <!ENTITY setup.choicePage.title.label "Have you used &syncBrand.fullName.label; before?"> -<!ENTITY setup.choicePage.new.label "I’ve never used &syncBrand.shortName.label; before"> -<!ENTITY setup.choicePage.existing2.label "I’m already using &syncBrand.shortName.label; on another device"> +<!ENTITY setup.choicePage.new.label "I've never used &syncBrand.shortName.label; before"> +<!ENTITY setup.choicePage.existing2.label "I'm already using &syncBrand.shortName.label; on another device"> <!-- New Account AND Existing Account --> <!ENTITY server.label "Server"> @@ -33,6 +33,8 @@ <!ENTITY setup.choosePassword.accesskey "P"> <!ENTITY setup.confirmPassword.label "Confirm Password"> <!ENTITY setup.confirmPassword.accesskey "m"> +<!ENTITY setup.setupMetro.label "Sync with Windows 8 style &brandShortName;"> +<!ENTITY setup.setupMetro.accesskey "S"> <!-- LOCALIZATION NOTE: tosAgree1, tosLink, tosAgree2, ppLink, tosAgree3 are joined with implicit white space, so spaces in the strings aren't necessary --> @@ -60,7 +62,7 @@ <!-- Existing Account Page 1: Pair a Device (incl. Pair a Device dialog strings) --> <!ENTITY pairDevice.title.label "Pair a Device"> <!ENTITY addDevice.showMeHow.label "Show me how."> -<!ENTITY addDevice.dontHaveDevice.label "I don’t have the device with me"> +<!ENTITY addDevice.dontHaveDevice.label "I don't have the device with me"> <!ENTITY pairDevice.setup.description.label "To activate, select "Pair a Device" on your other device."> <!ENTITY addDevice.setup.enterCode.label "Then, enter this code:"> <!ENTITY pairDevice.dialog.description.label "To activate your new device, select "Set Up Sync" on the device."> @@ -72,7 +74,7 @@ <!-- Existing Account Page 2: Manual Login --> <!ENTITY setup.signInPage.title.label "Sign In"> -<!ENTITY existingRecoveryKey.description "You can get a copy of your Recovery Key by going to &syncBrand.shortName.label; Preferences on your other device, and selecting "My Recovery Key" under "Manage Account"."> +<!ENTITY existingRecoveryKey.description "You can get a copy of your Recovery Key by going to &syncBrand.shortName.label; Options on your other device, and selecting "My Recovery Key" under "Manage Account"."> <!ENTITY verifying.label "Verifying…"> <!ENTITY resetPassword.label "Reset Password"> <!ENTITY resetSyncKey.label "I have lost my other device."> @@ -96,14 +98,14 @@ <!ENTITY engine.addons.label "Add-ons"> <!ENTITY engine.addons.accesskey "A"> -<!ENTITY choice2a.merge.main.label "Merge this device’s data with my &syncBrand.shortName.label; data"> +<!ENTITY choice2a.merge.main.label "Merge this device's data with my &syncBrand.shortName.label; data"> <!ENTITY choice2.merge.recommended.label "Recommended:"> <!ENTITY choice2a.client.main.label "Replace all data on this device with my &syncBrand.shortName.label; data"> -<!ENTITY choice2a.server.main.label "Replace all other devices with this device’s data"> +<!ENTITY choice2a.server.main.label "Replace all other devices with this device's data"> <!-- Confirm Merge Options --> <!ENTITY setup.optionsConfirmPage.title "Confirm"> -<!ENTITY confirm.merge2.label "&syncBrand.fullName.label; will now merge all this device’s browser data into your Sync account."> +<!ENTITY confirm.merge2.label "&syncBrand.fullName.label; will now merge all this device's browser data into your Sync account."> <!ENTITY confirm.client3.label "Warning: The following &brandShortName; data on this device will be deleted:"> <!ENTITY confirm.client2.moreinfo.label "&brandShortName; will then copy your &syncBrand.fullName.label; data to this device."> <!ENTITY confirm.server2.label "Warning: The following devices will be overwritten with your local data:"> diff --git a/application/basilisk/locales/en-US/chrome/browser/syncSetup.properties b/application/basilisk/locales/en-US/chrome/browser/syncSetup.properties index 9d388af86..8a5170adb 100644 --- a/application/basilisk/locales/en-US/chrome/browser/syncSetup.properties +++ b/application/basilisk/locales/en-US/chrome/browser/syncSetup.properties @@ -35,33 +35,17 @@ passwordsCount.label = #1 password;#1 passwords # LOCALIZATION NOTE (addonsCount.label): Semicolon-separated list of plural forms. # See: http://developer.mozilla.org/en/docs/Localization_and_Plurals # #1 is the number of add-ons, see the link above for forms -addonsCount.label = #1 add-on;#1 add-ons +addonsCount.label = #1 addon;#1 addons save.recoverykey.title = Save Recovery Key -save.recoverykey.defaultfilename = Firefox Recovery Key.html +save.recoverykey.defaultfilename = Pale Moon Recovery Key.html -newAccount.action.label = Firefox Sync is now set up to automatically sync all of your browser data. +newAccount.action.label = Sync is now set up to automatically sync all of your browser data. newAccount.change.label = You can choose exactly what to sync by selecting Sync Options below. -resetClient.change2.label = Firefox Sync will now merge all this device’s browser data into your Sync account. -wipeClient.change2.label = Firefox Sync will now replace all of the browser data on this device with the data in your Sync account. -wipeRemote.change2.label = Firefox Sync will now replace all of the browser data in your Sync account with the data on this device. +resetClient.change2.label = Sync will now merge all this device's browser data into your Sync account. +wipeClient.change2.label = Sync will now replace all of the browser data on this device with the data in your Sync account. +wipeRemote.change2.label = Sync will now replace all of the browser data in your Sync account with the data on this device. existingAccount.change.label = You can change this preference by selecting Sync Options below. # Several other strings are used (via Weave.Status.login), but they come from # /services/sync - -# Firefox Accounts based setup. -continue.label = Continue - -# LOCALIZATION NOTE (disconnect.label, disconnect.verify.title, disconnect.verify.bodyHeading, disconnect.verify.bodyText): -# These strings are used in the confirmation dialog shown when the user hits the disconnect button -# LOCALIZATION NOTE (disconnect.label): This is the label for the disconnect button -disconnect.label = Disconnect -disconnect.verify.title = Disconnect -disconnect.verify.bodyHeading = Disconnect from Sync? -disconnect.verify.bodyText = Your browsing data will remain on this computer, but it will no longer sync with your account. - -relinkVerify.title = Merge Warning -relinkVerify.heading = Are you sure you want to sign in to Sync? -# LOCALIZATION NOTE (relinkVerify.description): Email address of a user previously signed into sync. -relinkVerify.description = A different user was previously signed in to Sync on this computer. Signing in will merge this browser’s bookmarks, passwords and other settings with %S |