diff --git a/src/browser/components/preferences/zen-settings.js b/src/browser/components/preferences/zen-settings.js index 7cd264027..bcbf14fc3 100644 --- a/src/browser/components/preferences/zen-settings.js +++ b/src/browser/components/preferences/zen-settings.js @@ -48,12 +48,28 @@ var gZenLooksAndFeel = { }, _getInitialAccentColor() { - return Services.prefs.getStringPref("zen.theme.accent-color", kZenColors[0]); + return Services.prefs.getStringPref( + "zen.theme.accent-color", + kZenColors[0] + ); }, }; var gZenWorkspacesSettings = { init() { + this.addLanguageWarning(); + }, + + addLanguageWarning() { + let chooseLanguage = document.getElementById("languagesBox"); + + let fragment = window.MozXULElement.parseXULToFragment(` + + + + `); + + chooseLanguage.after(fragment); }, }; @@ -66,18 +82,18 @@ var gZenCKSSettings = { }, _addPrefObservers() { - Services.prefs.addObserver("zen.keyboard.shortcuts.disable-firefox", this.onDisableFirefoxShortcutsChange.bind(this)); + Services.prefs.addObserver( + "zen.keyboard.shortcuts.disable-firefox", + this.onDisableFirefoxShortcutsChange.bind(this) + ); }, async onDisableFirefoxShortcutsChange(event) { - let checked = Services.prefs.getBoolPref("zen.keyboard.shortcuts.disable-firefox"); - if (checked) return; - let buttonIndex = await confirmRestartPrompt( - true, - 1, - true, - false + let checked = Services.prefs.getBoolPref( + "zen.keyboard.shortcuts.disable-firefox" ); + if (checked) return; + let buttonIndex = await confirmRestartPrompt(true, 1, true, false); if (buttonIndex == CONFIRM_RESTART_PROMPT_RESTART_NOW) { Services.startup.quit( Ci.nsIAppStartup.eAttemptQuit | Ci.nsIAppStartup.eRestart @@ -113,7 +129,10 @@ var gZenCKSSettings = { `); - document.l10n.setAttributes(fragment.querySelector(".zenCKSOption-label"), l10nId); + document.l10n.setAttributes( + fragment.querySelector(".zenCKSOption-label"), + l10nId + ); let input = fragment.querySelector(".zenCKSOption-input"); let shortcut = gZenKeyboardShortcuts.getShortcut(key); @@ -156,15 +175,18 @@ var gZenCKSSettings = { return; } - let input = document.querySelector(`.zenCKSOption-input[data-key="${this._currentAction}"]`); + let input = document.querySelector( + `.zenCKSOption-input[data-key="${this._currentAction}"]` + ); let shortcut = { ctrl: event.ctrlKey, alt: event.altKey, shift: event.shiftKey, - meta: event.metaKey + meta: event.metaKey, }; - const shortcutWithoutModifiers = !shortcut.ctrl && !shortcut.alt && !shortcut.shift && !shortcut.meta; + const shortcutWithoutModifiers = + !shortcut.ctrl && !shortcut.alt && !shortcut.shift && !shortcut.meta; if (event.key === "Tab" && shortcutWithoutModifiers) { return; @@ -182,7 +204,7 @@ var gZenCKSSettings = { return; // No modifiers, ignore. } - if (!(["Control", "Alt", "Meta", "Shift"].includes(event.key))) { + if (!["Control", "Alt", "Meta", "Shift"].includes(event.key)) { if (event.keycode) { shortcut.keycode = event.keycode; } else { @@ -259,5 +281,5 @@ Preferences.addAll([ id: "zen.keyboard.shortcuts.disable-firefox", type: "bool", default: false, - } + }, ]); diff --git a/src/browser/locales/en-US/browser/preferences/zen-preferences.ftl b/src/browser/locales/en-US/browser/preferences/zen-preferences.ftl index 89795edec..c692c4dcf 100644 --- a/src/browser/locales/en-US/browser/preferences/zen-preferences.ftl +++ b/src/browser/locales/en-US/browser/preferences/zen-preferences.ftl @@ -3,6 +3,7 @@ pane-zen-looks-title = Look And Feel category-zen-looks = .tooltiptext = { pane-zen-looks-title } +zen-warning-language = Changing the default language could make it easier for Websites to track you. zen-look-and-feel-colors-header = Pick a theme colour zen-look-and-feel-colors-description = Make { -brand-short-name } look and feel the way you like @@ -152,4 +153,4 @@ zen-change-workspace = Cycle Workspaces zen-split-view-grid = Split View Grid zen-split-view-vertical = Split View Vertical zen-split-view-horizontal = Split View Horizontal -zen-split-view-close = Close Split View +zen-split-view-close = Close Split View \ No newline at end of file