[tbb-commits] [torbutton/maint-9.0] Revert "Merge remote-tracking branch 'richardtpo/bug_31855' into maint-9.0"

sysrqb at torproject.org sysrqb at torproject.org
Fri Jan 3 22:43:06 UTC 2020


commit 26b81644c979951e6773dd05d6801d359b725433
Author: Matthew Finkel <sysrqb at torproject.org>
Date:   Fri Jan 3 22:39:19 2020 +0000

    Revert "Merge remote-tracking branch 'richardtpo/bug_31855' into maint-9.0"
    
    This reverts commit 7362d231508e4c0e78985d51672d3051ab209de4, reversing
    changes made to ae1a9af4a4830bde7034565615a853102e5fe1df.
    
    Merging 0e5ac5d22f59487d857fea57dd3db69daf2e56d2 for Bug 31855 brought
    along many other commits from the master branch.
---
 LICENSE                                        | 115 +++++++
 chrome.manifest                                |   5 +
 chrome/content/locale/non-localized.properties |   6 +
 chrome/content/preferences.xhtml               |   1 +
 chrome/content/tor-circuit-display.js          |  30 +-
 chrome/content/torbutton.js                    | 263 ++++++++++++--
 chrome/content/torbutton_util.js               |  79 +++++
 chrome/locale/en-US/torbutton.dtd              |   3 -
 chrome/locale/en-US/torbutton.properties       |  10 -
 chrome/locale/ko/torbutton.dtd                 |  14 +-
 chrome/locale/ko/torbutton.properties          |   2 +-
 chrome/locale/lt/aboutDialog.dtd               |  19 -
 chrome/locale/lt/aboutTBUpdate.dtd             |   8 -
 chrome/locale/lt/aboutTor.dtd                  |  57 +--
 chrome/locale/lt/brand.dtd                     |  15 +-
 chrome/locale/lt/brand.properties              |  17 +-
 chrome/locale/lt/browserOnboarding.properties  |  72 ----
 chrome/locale/lt/torbutton.dtd                 |  66 +---
 chrome/locale/lt/torbutton.properties          |  81 +----
 chrome/locale/ms/aboutDialog.dtd               |  19 -
 chrome/locale/ms/aboutTBUpdate.dtd             |   8 -
 chrome/locale/ms/aboutTor.dtd                  |  57 +--
 chrome/locale/ms/brand.dtd                     |  15 +-
 chrome/locale/ms/brand.properties              |  17 +-
 chrome/locale/ms/browserOnboarding.properties  |  72 ----
 chrome/locale/ms/torbutton.dtd                 |  65 +---
 chrome/locale/ms/torbutton.properties          |  87 ++---
 chrome/locale/th/aboutDialog.dtd               |  19 -
 chrome/locale/th/aboutTBUpdate.dtd             |   8 -
 chrome/locale/th/aboutTor.dtd                  |  57 +--
 chrome/locale/th/brand.dtd                     |  11 +-
 chrome/locale/th/brand.properties              |  13 +-
 chrome/locale/th/browserOnboarding.properties  |  72 ----
 chrome/locale/th/torbutton.dtd                 |  65 +---
 chrome/locale/th/torbutton.properties          |  85 ++---
 chrome/locale/tr/torbutton.properties          |   2 +-
 components/cookie-jar-selector.js              | 460 +++++++++++++++++++++++++
 components/domain-isolator.js                  |   3 +
 components/dragDropFilter.js                   |   2 +
 components/external-app-blocker.js             |  16 +-
 components/startup-observer.js                 |  19 +-
 components/torbutton-logger.js                 |   2 +
 defaults/preferences/preferences.js            |  58 ++++
 import-translations.sh                         |   2 +-
 jar.mn                                         |  12 +-
 modules/default-prefs.js                       |  36 ++
 modules/security-prefs.js                      |   1 -
 modules/tor-control-port.js                    |  95 +----
 modules/utils.js                               |  54 +--
 moz.build                                      |   3 +
 50 files changed, 1308 insertions(+), 990 deletions(-)

diff --git a/LICENSE b/LICENSE
index 66c78f65..9c4498df 100644
--- a/LICENSE
+++ b/LICENSE
@@ -27,3 +27,118 @@ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 POSSIBILITY OF SUCH DAMAGE.
+
+===============================================================================
+
+"League Gothic" font embedded in chrome/skin/aboutTorFonts.css is licensed
+under:
+
+Copyright (c) 2010, Caroline Hadilaksono & Micah Rich
+<caroline at hadilaksono, micah at micahrich.com>, with Reserved Font Name:
+"League Gothic".
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+===============================================================================
+
+'Source' font embedded in chrome/skin/aboutTorFonts.css is licensed under:
+
+Copyright 2010, 2012 Adobe Systems Incorporated (http://www.adobe.com/), with
+Reserved Font Name 'Source'. All Rights Reserved. Source is a trademark of
+Adobe Systems Incorporated in the United States and/or other countries.
+
+This Font Software is licensed under the SIL Open Font License, Version 1.1.
+This license is copied below, and is also available with a FAQ at:
+http://scripts.sil.org/OFL
+
+===============================================================================
+
+SIL OPEN FONT LICENSE
+
+Version 1.1 - 26 February 2007
+
+PREAMBLE
+
+The goals of the Open Font License (OFL) are to stimulate worldwide
+development of collaborative font projects, to support the font creation
+efforts of academic and linguistic communities, and to provide a free and
+open framework in which fonts may be shared and improved in partnership
+with others.
+
+The OFL allows the licensed fonts to be used, studied, modified and
+redistributed freely as long as they are not sold by themselves. The
+fonts, including any derivative works, can be bundled, embedded,
+redistributed and/or sold with any software provided that any reserved
+names are not used by derivative works. The fonts and derivatives,
+however, cannot be released under any other type of license. The
+requirement for fonts to remain under this license does not apply
+to any document created using the fonts or their derivatives.
+DEFINITIONS
+
+"Font Software" refers to the set of files released by the Copyright
+Holder(s) under this license and clearly marked as such. This may
+include source files, build scripts and documentation.
+
+"Reserved Font Name" refers to any names specified as such after the
+copyright statement(s).
+
+"Original Version" refers to the collection of Font Software components as
+distributed by the Copyright Holder(s).
+
+"Modified Version" refers to any derivative made by adding to, deleting,
+or substituting — in part or in whole — any of the components of the
+Original Version, by changing formats or by porting the Font Software to a
+new environment.
+
+"Author" refers to any designer, engineer, programmer, technical
+writer or other person who contributed to the Font Software.
+PERMISSION & CONDITIONS
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of the Font Software, to use, study, copy, merge, embed, modify,
+redistribute, and sell modified and unmodified copies of the Font
+Software, subject to the following conditions:
+
+1) Neither the Font Software nor any of its individual components,
+in Original or Modified Versions, may be sold by itself.
+
+2) Original or Modified Versions of the Font Software may be bundled,
+redistributed and/or sold with any software, provided that each copy
+contains the above copyright notice and this license. These can be
+included either as stand-alone text files, human-readable headers or
+in the appropriate machine-readable metadata fields within text or
+binary files as long as those fields can be easily viewed by the user.
+
+3) No Modified Version of the Font Software may use the Reserved Font
+Name(s) unless explicit written permission is granted by the corresponding
+Copyright Holder. This restriction only applies to the primary font name as
+presented to the users.
+
+4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font
+Software shall not be used to promote, endorse or advertise any
+Modified Version, except to acknowledge the contribution(s) of the
+Copyright Holder(s) and the Author(s) or with their explicit written
+permission.
+
+5) The Font Software, modified or unmodified, in part or in whole,
+must be distributed entirely under this license, and must not be
+distributed under any other license. The requirement for fonts to
+remain under this license does not apply to any document created
+using the Font Software.
+TERMINATION
+
+This license becomes null and void if any of the above conditions are
+not met.
+DISCLAIMER
+
+THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE
+COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL
+DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM
+OTHER DEALINGS IN THE FONT SOFTWARE.
diff --git a/chrome.manifest b/chrome.manifest
index d1ffe6d6..13bef661 100644
--- a/chrome.manifest
+++ b/chrome.manifest
@@ -143,6 +143,9 @@ contract @torproject.org/torbutton-extAppBlocker;1 {3da0269f-fc29-4e9e-a678-c3b1
 component {06322def-6fde-4c06-aef6-47ae8e799629} components/startup-observer.js
 contract @torproject.org/startup-observer;1 {06322def-6fde-4c06-aef6-47ae8e799629}
 
+component {e6204253-b690-4159-bfe8-d4eedab6b3be} components/cookie-jar-selector.js
+contract @torproject.org/cookie-jar-selector;1 {e6204253-b690-4159-bfe8-d4eedab6b3be}
+
 component {5d57312b-5d8c-4169-b4af-e80d6a28a72e} components/torCheckService.js
 contract @torproject.org/torbutton-torCheckService;1 {5d57312b-5d8c-4169-b4af-e80d6a28a72e}
 
@@ -152,6 +155,8 @@ contract @torproject.org/torbutton-logger;1 {f36d72c9-9718-4134-b550-e109638331d
 component {e33fd6d4-270f-475f-a96f-ff3140279f68} components/domain-isolator.js
 contract @torproject.org/domain-isolator;1 {e33fd6d4-270f-475f-a96f-ff3140279f68}
 
+category profile-after-change CookieJarSelector @torproject.org/cookie-jar-selector;1
+
 category profile-after-change StartupObserver @torproject.org/startup-observer;1
 category profile-after-change DomainIsolator @torproject.org/domain-isolator;1
 category profile-after-change DragDropFilter @torproject.org/torbutton-dragDropFilter;1
diff --git a/chrome/content/locale/non-localized.properties b/chrome/content/locale/non-localized.properties
new file mode 100644
index 00000000..dca78639
--- /dev/null
+++ b/chrome/content/locale/non-localized.properties
@@ -0,0 +1,6 @@
+# This file must be located in a subdirectory named "locale" so that
+# about:config will display the correct value for browser.startup.homepage.
+# See fetchPref() inside toolkit/components/viewconfig/content/config.js
+
+# Default home page
+browser.startup.homepage=about:tor
diff --git a/chrome/content/preferences.xhtml b/chrome/content/preferences.xhtml
index eafbf01e..6f662f5f 100644
--- a/chrome/content/preferences.xhtml
+++ b/chrome/content/preferences.xhtml
@@ -6,6 +6,7 @@
     <title>&torbutton.prefs.security_settings;</title>
     <link type="text/css" rel="stylesheet" charset="UTF-8" href="chrome://torbutton/skin/preferences.css"/>
     <link type="text/css" rel="stylesheet" charset="UTF-8" href="chrome://torbutton/skin/preferences-mobile.css"/>
+    <script type="text/javascript" src="torbutton_util.js"></script>
     <script type="text/javascript" src="preferences-mobile.js"></script>
     <style>
     </style>
diff --git a/chrome/content/tor-circuit-display.js b/chrome/content/tor-circuit-display.js
index 19b55d18..21bcc57b 100644
--- a/chrome/content/tor-circuit-display.js
+++ b/chrome/content/tor-circuit-display.js
@@ -6,8 +6,9 @@
 // with docco.js to produce pretty documentation.
 //
 // This script is to be embedded in torbutton.xul. It defines a single global
-// function, createTorCircuitDisplay(), which activates the automatic Tor
-// circuit display for the current tab and any future tabs.
+// function, createTorCircuitDisplay(ipcFile, host, port, password), which
+// activates the automatic Tor circuit display for the current tab and any
+// future tabs.
 //
 // See https://trac.torproject.org/8641
 
@@ -15,12 +16,11 @@
 /* global document, gBrowser, Components */
 
 // ### Main function
-// __createTorCircuitDisplay(enablePrefName)__.
+// __createTorCircuitDisplay(ipcFile, host, port, password, enablePrefName)__.
 // The single function that prepares tor circuit display. Connects to a tor
-// control port using information provided to the control port module via
-// a previous call to configureControlPortModule(), and binds to a named
-// bool pref whose value determines whether the circuit display is enabled
-// or disabled.
+// control port with the given ipcFile or host plus port, and password, and
+// binds to a named bool pref whose value determines whether the circuit display
+// is enabled or disabled.
 let createTorCircuitDisplay = (function () {
 
 "use strict";
@@ -32,7 +32,7 @@ const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 let { controller } = ChromeUtils.import("resource://torbutton/modules/tor-control-port.js", {});
 
 // Utility functions
-let { bindPrefAndInit, observe, getLocale, getDomainForBrowser, torbutton_get_property_string } = ChromeUtils.import("resource://torbutton/modules/utils.js", {});
+let { bindPrefAndInit, observe, getLocale, getDomainForBrowser } = ChromeUtils.import("resource://torbutton/modules/utils.js", {});
 
 // Make the TorButton logger available.
 let logger = Cc["@torproject.org/torbutton-logger;1"]
@@ -204,10 +204,15 @@ let collectBrowserCredentials = function () {
 
 // ## User interface
 
+// __torbuttonBundle__.
+// Bundle of localized strings for torbutton UI.
+let torbuttonBundle = Services.strings.createBundle(
+                        "chrome://torbutton/locale/torbutton.properties");
+
 // __uiString__.
 // Read the localized strings for this UI.
 let uiString = function (shortName) {
-  return torbutton_get_property_string("torbutton.circuit_display." + shortName);
+  return torbuttonBundle.GetStringFromName("torbutton.circuit_display." + shortName);
 };
 
 // __localizedCountryNameFromCode(countryCode)__.
@@ -410,11 +415,11 @@ let ensureCorrectPopupDimensions = function () {
 
 // ## Main function
 
-// __setupDisplay(enablePrefName)__.
+// __setupDisplay(ipcFile, host, port, password, enablePrefName)__.
 // Once called, the Tor circuit display will be started whenever
 // the "enablePref" is set to true, and stopped when it is set to false.
 // A reference to this function (called createTorCircuitDisplay) is exported as a global.
-let setupDisplay = function (enablePrefName) {
+let setupDisplay = function (ipcFile, host, port, password, enablePrefName) {
   setupGuardNote();
   let myController = null,
       stopCollectingIsolationData = null,
@@ -437,7 +442,8 @@ let setupDisplay = function (enablePrefName) {
       },
       start = function () {
         if (!myController) {
-          myController = controller(function (err) {
+          myController = controller(ipcFile, host, port || 9151, password,
+                function (err) {
             // An error has occurred.
             logger.eclog(5, err);
             logger.eclog(5, "Disabling tor display circuit because of an error.");
diff --git a/chrome/content/torbutton.js b/chrome/content/torbutton.js
index 5ef63af2..9846b864 100644
--- a/chrome/content/torbutton.js
+++ b/chrome/content/torbutton.js
@@ -1,9 +1,3 @@
-// window globals
-var torbutton_init;
-var torbutton_new_circuit;
-var torbutton_new_identity;
-
-(() => {
 // Bug 1506 P1-P5: This is the main Torbutton overlay file. Much needs to be
 // preserved here, but in an ideal world, most of this code should perhaps be
 // moved into an XPCOM service, and much can also be tossed. See also
@@ -13,23 +7,20 @@ var torbutton_new_identity;
 // TODO: Double-check there are no strange exploits to defeat:
 //       http://kb.mozillazine.org/Links_to_local_pages_don%27t_work
 
-/* global gBrowser, CustomizableUI,
-   createTorCircuitDisplay, gFindBarInitialized,
-   gFindBar, OpenBrowserWindow, PrivateBrowsingUtils,
+/* global torbutton_log, gBrowser, torbutton_safelog, CustomizableUI,
+   createTorCircuitDisplay, torbutton_get_property_string, gFindBarInitialized,
+   gFindBar, OpenBrowserWindow, PrivateBrowsingUtils, torbutton_get_stringbundle,
    Services, AppConstants
  */
 
 let {
+  showDialog,
   show_torbrowser_manual,
   unescapeTorString,
   bindPrefAndInit,
   getDomainForBrowser,
-  torbutton_safelog,
-  torbutton_log,
-  torbutton_get_property_string,
 } = ChromeUtils.import("resource://torbutton/modules/utils.js", {});
 let SecurityPrefs = ChromeUtils.import("resource://torbutton/modules/security-prefs.js", {});
-let { configureControlPortModule } = Cu.import("resource://torbutton/modules/tor-control-port.js", {});
 
 const k_tb_last_browser_version_pref = "extensions.torbutton.lastBrowserVersion";
 const k_tb_browser_update_needed_pref = "extensions.torbutton.updateNeeded";
@@ -40,10 +31,17 @@ var m_tb_prefs = Services.prefs;
 
 // status
 var m_tb_wasinited = false;
+var m_tb_plugin_string = false;
 var m_tb_is_main_window = false;
+var m_tb_hidden_browser = false;
 
 var m_tb_confirming_plugins = false;
 
+var m_tb_window_height = window.outerHeight;
+var m_tb_window_width = window.outerWidth;
+
+var m_tb_tbb = false;
+
 var m_tb_control_ipc_file = null;    // Set if using IPC (UNIX domain socket).
 var m_tb_control_port = null;        // Set if using TCP.
 var m_tb_control_host = null;        // Set if using TCP.
@@ -102,9 +100,11 @@ var torbutton_unique_pref_observer =
     {
         this.forced_ua = false;
         m_tb_prefs.addObserver("extensions.torbutton", this, false);
+        m_tb_prefs.addObserver("network.cookie", this, false);
         m_tb_prefs.addObserver("browser.privatebrowsing.autostart", this, false);
         m_tb_prefs.addObserver("javascript", this, false);
         m_tb_prefs.addObserver("plugin.disable", this, false);
+        m_tb_prefs.addObserver("privacy.firstparty.isolate", this, false);
         m_tb_prefs.addObserver("privacy.resistFingerprinting", this, false);
         m_tb_prefs.addObserver("privacy.resistFingerprinting.letterboxing", this, false);
 
@@ -116,9 +116,11 @@ var torbutton_unique_pref_observer =
     unregister: function()
     {
         m_tb_prefs.removeObserver("extensions.torbutton", this);
+        m_tb_prefs.removeObserver("network.cookie", this);
         m_tb_prefs.removeObserver("browser.privatebrowsing.autostart", this);
         m_tb_prefs.removeObserver("javascript", this);
         m_tb_prefs.removeObserver("plugin.disable", this);
+        m_tb_prefs.removeObserver("privacy.firstparty.isolate", this);
         m_tb_prefs.removeObserver("privacy.resistFingerprinting", this);
         m_tb_prefs.removeObserver("privacy.resistFingerprinting.letterboxing", this);
 
@@ -173,6 +175,9 @@ var torbutton_unique_pref_observer =
             case "privacy.resistFingerprinting.letterboxing":
                 torbutton_update_fingerprinting_prefs();
                 break;
+            case "privacy.firstparty.isolate":
+                torbutton_update_isolation_prefs();
+                break;
         }
     }
 }
@@ -235,7 +240,7 @@ function torbutton_is_mobile() {
 // Bug 1506 P2-P4: This code sets some version variables that are irrelevant.
 // It does read out some important environment variables, though. It is
 // called once per browser window.. This might belong in a component.
-torbutton_init = function() {
+function torbutton_init() {
     torbutton_log(3, 'called init()');
 
     SecurityPrefs.initialize();
@@ -249,6 +254,7 @@ torbutton_init = function() {
     var cur_version;
     try {
       cur_version = m_tb_prefs.getCharPref("torbrowser.version");
+      m_tb_tbb = true;
       torbutton_log(3, "This is a Tor Browser");
     } catch(e) {
       torbutton_log(3, "This is not a Tor Browser: "+e);
@@ -338,9 +344,6 @@ torbutton_init = function() {
         }
     }
 
-    configureControlPortModule(m_tb_control_ipc_file, m_tb_control_host,
-                               m_tb_control_port, m_tb_control_pass);
-
     // Add about:tor IPC message listener.
     window.messageManager.addMessageListener("AboutTor:Loaded",
                                    torbutton_abouttor_message_handler);
@@ -360,7 +363,9 @@ torbutton_init = function() {
     torbutton_notify_if_update_needed();
 
     try {
-        createTorCircuitDisplay("extensions.torbutton.display_circuit");
+        createTorCircuitDisplay(m_tb_control_ipc_file, m_tb_control_host,
+                                m_tb_control_port, m_tb_control_pass,
+                               "extensions.torbutton.display_circuit");
     } catch(e) {
         torbutton_log(4, "Error creating the tor circuit display " + e);
     }
@@ -490,6 +495,25 @@ function torbutton_confirm_plugins() {
   }
 }
 
+function torbutton_inform_about_tbb() {
+  var prompts = Services.prompt;
+
+  var message = torbutton_get_property_string("torbutton.popup.prompt_torbrowser");
+  var title = torbutton_get_property_string("torbutton.title.prompt_torbrowser");
+  var checkbox = {value: false};
+
+  var sb = Services.strings;
+  var browserstrings = sb.createBundle("chrome://browser/locale/browser.properties");
+
+  var askagain = browserstrings.GetStringFromName("privateBrowsingNeverAsk");
+
+  var response = prompts.alertCheck(null, title, message, askagain, checkbox);
+
+  // Update preferences to reflect their response and to prevent the prompt from
+  // being displayed again.
+  m_tb_prefs.setBoolPref("extensions.torbutton.prompt_torbrowser", !checkbox.value);
+}
+
 // Bug 1506 P2: It might be nice to let people move the button around, I guess?
 function torbutton_get_toolbutton() {
     var o_toolbutton = false;
@@ -540,10 +564,30 @@ function torbutton_notify_if_update_needed() {
     setOrClearAttribute(item, "tbUpdateNeeded", updateNeeded);
 }
 
+function torbutton_check_for_update() {
+    // Open the update prompt in the correct mode.  The update state
+    // checks used here were adapted from isPending() and isApplied() in
+    // Mozilla's browser/base/content/aboutDialog.js code.
+    let updateMgr = Cc["@mozilla.org/updates/update-manager;1"]
+                     .getService(Ci.nsIUpdateManager);
+    let update = updateMgr.activeUpdate;
+    let updateState = (update) ? update.state : undefined;
+    let pendingStates = [ "pending", "pending-service",
+                          "applied", "applied-service" ];
+    let isPending = (updateState && (pendingStates.indexOf(updateState) >= 0));
+
+    let prompter = Cc["@mozilla.org/updates/update-prompt;1"]
+                     .createInstance(Ci.nsIUpdatePrompt);
+    if (isPending)
+        prompter.showUpdateDownloaded(update, false);
+    else
+        prompter.checkForUpdates();
+}
+
 // Bug 1506 P4: Checking for Tor Browser updates is pretty important,
 // probably even as a fallback if we ever do get a working updater.
 function torbutton_do_async_versioncheck() {
-  if (!m_tb_prefs.getBoolPref("extensions.torbutton.versioncheck_enabled")) {
+  if (!m_tb_tbb || !m_tb_prefs.getBoolPref("extensions.torbutton.versioncheck_enabled")) {
     return;
   }
 
@@ -749,7 +793,7 @@ function torbutton_send_ctrl_cmd(command) {
 }
 
 // Bug 1506 P4: Needed for New IP Address
-torbutton_new_circuit = function() {
+function torbutton_new_circuit() {
   let firstPartyDomain = getDomainForBrowser(gBrowser.selectedBrowser);
 
   let domainIsolator = Cc["@torproject.org/domain-isolator;1"]
@@ -761,7 +805,7 @@ torbutton_new_circuit = function() {
 }
 
 // Bug 1506 P4: Needed for New Identity.
-torbutton_new_identity = async function() {
+async function torbutton_new_identity() {
   try {
     // Make sure that we can only click once on New Identiy to avoid race
     // conditions leading to failures (see bug 11783 for an example).
@@ -995,7 +1039,16 @@ async function torbutton_do_new_identity() {
 
   torbutton_log(3, "New Identity: Clearing Cookies and DOM Storage");
 
-  torbutton_clear_cookies();
+  if (m_tb_prefs.getBoolPref("extensions.torbutton.cookie_protections")) {
+    var selector = Cc["@torproject.org/cookie-jar-selector;1"]
+                    .getService(Ci.nsISupports)
+                    .wrappedJSObject;
+    // This emits "cookie-changed", "cleared", which kills DOM storage
+    // and the safe browsing API key
+    selector.clearUnprotectedCookies("tor");
+  } else {
+    torbutton_clear_cookies();
+  }
 
   torbutton_log(3, "New Identity: Closing open connections");
 
@@ -1368,19 +1421,21 @@ function torbutton_tor_check_ok()
 //
 // toggles plugins: true for disabled, false for enabled
 function torbutton_toggle_plugins(disable_plugins) {
-  var PH=Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
-  var P=PH.getPluginTags({});
-  for(var i=0; i<P.length; i++) {
-      if ("enabledState" in P[i]) { // FF24
-        // FIXME: DOCDOC the reasoning for the isDisabled check, or remove it.
-        var isDisabled = (P[i].enabledState == Ci.nsIPluginTag.STATE_DISABLED);
-        if (!isDisabled && disable_plugins)
-          P[i].enabledState = Ci.nsIPluginTag.STATE_DISABLED;
-        else if (isDisabled && !disable_plugins)
-          P[i].enabledState = Ci.nsIPluginTag.STATE_CLICKTOPLAY;
-      } else if (P[i].disabled != disable_plugins) { // FF17
-        P[i].disabled=disable_plugins;
-      }
+  if (m_tb_tbb) {
+    var PH=Cc["@mozilla.org/plugin/host;1"].getService(Ci.nsIPluginHost);
+    var P=PH.getPluginTags({});
+    for(var i=0; i<P.length; i++) {
+        if ("enabledState" in P[i]) { // FF24
+          // FIXME: DOCDOC the reasoning for the isDisabled check, or remove it.
+          var isDisabled = (P[i].enabledState == Ci.nsIPluginTag.STATE_DISABLED);
+          if (!isDisabled && disable_plugins)
+            P[i].enabledState = Ci.nsIPluginTag.STATE_DISABLED;
+          else if (isDisabled && !disable_plugins)
+            P[i].enabledState = Ci.nsIPluginTag.STATE_CLICKTOPLAY;
+        } else if (P[i].disabled != disable_plugins) { // FF17
+          P[i].disabled=disable_plugins;
+        }
+    }
   }
 }
 
@@ -1395,7 +1450,7 @@ function torbutton_update_disk_prefs() {
     // No way to clear this beast during New Identity. Leave it off.
     //m_tb_prefs.setBoolPref("dom.indexedDB.enabled", !mode);
 
-    m_tb_prefs.setBoolPref("permissions.memory_only", mode);
+    if (m_tb_tbb) m_tb_prefs.setBoolPref("permissions.memory_only", mode);
 
     // Third party abuse. Leave it off for now.
     //m_tb_prefs.setBoolPref("browser.cache.offline.enable", !mode);
@@ -1417,6 +1472,15 @@ function torbutton_update_fingerprinting_prefs() {
     Services.prefs.savePrefFile(null);
 }
 
+function torbutton_update_isolation_prefs() {
+    let isolate = m_tb_prefs.getBoolPref("privacy.firstparty.isolate");
+
+    m_tb_prefs.setBoolPref("security.enable_tls_session_tickets", !isolate);
+
+    // Force prefs to be synced to disk
+    Services.prefs.savePrefFile(null);
+}
+
 // This function closes all XUL browser windows except this one. For this
 // window, it closes all existing tabs and creates one about:blank tab.
 function torbutton_close_tabs_on_new_identity() {
@@ -1469,6 +1533,50 @@ function torbutton_close_tabs_on_new_identity() {
   torbutton_log(3, "Closed all tabs");
 }
 
+// Bug 1506 P2: This code is only important for disabling
+// New Identity where it is not supported (ie no control port).
+function torbutton_check_protections()
+{
+  var env = Cc["@mozilla.org/process/environment;1"]
+              .getService(Ci.nsIEnvironment);
+
+  // Bug 14100: check for the existence of an environment variable
+  // in order to toggle the visibility of networksettings menuitem
+  if (env.exists("TOR_NO_DISPLAY_NETWORK_SETTINGS"))
+    document.getElementById("torbutton-networksettings").hidden = true;
+  else
+    document.getElementById("torbutton-networksettings").hidden = false;
+
+  // Bug 21091: check for the existence of an environment variable
+  // in order to toggle the visibility of the torbutton-checkForUpdate
+  // menuitem and its separator.
+  if (env.exists("TOR_HIDE_UPDATE_CHECK_UI")) {
+    document.getElementById("torbutton-checkForUpdateSeparator").hidden = true;
+    document.getElementById("torbutton-checkForUpdate").hidden = true;
+  } else {
+    document.getElementById("torbutton-checkForUpdateSeparator").hidden = false;
+    document.getElementById("torbutton-checkForUpdate").hidden = false;
+  }
+
+  var cookie_pref = m_tb_prefs.getBoolPref("extensions.torbutton.cookie_protections");
+  document.getElementById("torbutton-cookie-protector").disabled = !cookie_pref;
+
+  // XXX: Bug 14632: The cookie dialog is useless in private browsing mode in FF31ESR
+  // See https://trac.torproject.org/projects/tor/ticket/10353 for more info.
+  document.getElementById("torbutton-cookie-protector").hidden = m_tb_prefs.getBoolPref("browser.privatebrowsing.autostart");
+
+  if (!m_tb_control_pass || (!m_tb_control_ipc_file && !m_tb_control_port)) {
+    // TODO: Remove the Torbutton menu entry again once we have done our
+    // security control redesign.
+    document.getElementById("menu_newIdentity").disabled = true;
+    document.getElementById("appMenuNewIdentity").disabled = true;
+  }
+
+  if (!m_tb_tbb && m_tb_prefs.getBoolPref("extensions.torbutton.prompt_torbrowser")) {
+      torbutton_inform_about_tbb();
+  }
+}
+
 // -------------- HISTORY & COOKIES ---------------------
 
 // Bug 1506 P4: Used by New Identity if cookie protections are
@@ -1627,6 +1735,23 @@ function torbutton_do_startup()
         // Bug 30565: sync browser.privatebrowsing.autostart with security.nocertdb
         torbutton_update_disk_prefs();
 
+        // #5758: Last ditch effort to keep Vanilla Torbutton users from totally
+        // being pwnt.  This is a pretty darn ugly hack, too. But because of #5863,
+        // we really don't care about preserving the user's values for this.
+        if (!m_tb_tbb) {
+            // Bug 1506 P5: You have to set these two for non-TBB Firefoxen
+            m_tb_prefs.setBoolPref("network.websocket.enabled", false);
+            m_tb_prefs.setBoolPref("dom.indexedDB.enabled", false);
+        }
+
+        // Still need this in case people shove this thing back into FF
+        if (!m_tb_tbb && m_tb_prefs.getBoolPref("extensions.torbutton.prompt_torbrowser")) {
+          var warning = torbutton_get_property_string("torbutton.popup.short_torbrowser");
+          var title = torbutton_get_property_string("torbutton.title.prompt_torbrowser");
+          var prompts = Services.prompt;
+          prompts.alert(null, title, warning);
+        }
+
         // For general pref fixups to handle pref damage in older versions
         torbutton_fixup_old_prefs();
 
@@ -1727,6 +1852,9 @@ function torbutton_new_window(event)
       return;
     }
 
+    m_tb_window_height = window.outerHeight;
+    m_tb_window_width = window.outerWidth;
+
     if (!m_tb_wasinited) {
         torbutton_init();
     }
@@ -1794,6 +1922,13 @@ function torbutton_close_window(event) {
     }
 }
 
+
+function torbutton_open_network_settings() {
+  var obsSvc = Services.obs;
+  obsSvc.notifyObservers(this, "TorOpenNetworkSettings");
+}
+
+
 window.addEventListener('load',torbutton_new_window,false);
 window.addEventListener('unload', torbutton_close_window, false);
 
@@ -1900,6 +2035,60 @@ var torbutton_resizelistener =
   onSecurityChange: function() {}
 };
 
+// aURI should be an http or https nsIURI object.
+function torbutton_get_current_accept_language_value(aURI)
+{
+  try {
+    let ioService = Services.io;
+    let channel = ioService.newChannelFromURI(aURI);
+    let httpChannel = channel.QueryInterface(Ci.nsIHttpChannel);
+    return httpChannel.getRequestHeader("Accept-Language");
+  } catch (e) {}
+
+  return null;
+}
+
+// Take URL strings the user has specified for a homepage
+// and normalize it so it looks like a real URL.
+function torbutton_normalize_homepage_url_string(aURLString)
+{
+  if (!aURLString) return null;
+  if (typeof aURLString !== "string") return null;
+  let url;
+  try {
+    url = new URL(aURLString);
+  } catch (e) {
+    try {
+      url = new URL("http://" + aURLString);
+    } catch (e) {
+      return null;
+    }
+  }
+  return url.href;
+}
+
+function torbutton_is_homepage_url(aURI)
+{
+  if (!aURI)
+    return false;
+
+  let homePageURLs;
+  let choice = m_tb_prefs.getIntPref("browser.startup.page");
+  if ((1 == choice) || (3 == choice)) try {
+     // A homepage may be used at startup. Get the values and check against
+     // aURI.spec.
+     homePageURLs = m_tb_prefs.getComplexValue("browser.startup.homepage",
+                                               Ci.nsIPrefLocalizedString).data;
+  } catch (e) {}
+
+  if (!homePageURLs)
+    return false;
+
+  let urls = homePageURLs.split('|')
+               .map(torbutton_normalize_homepage_url_string);
+  return (urls.indexOf(aURI.spec) >= 0);
+}
+
 // Makes sure the item in the Help Menu and the link in about:tor
 // for the Tor Browser User Manual are only visible when
 // show_torbrowser_manual() returns true.
@@ -1910,5 +2099,5 @@ function torbutton_init_user_manual_links() {
     torbutton_abouttor_message_handler.updateAllOpenPages();
   });
 }
-})();
+
 //vim:set ts=4
diff --git a/chrome/content/torbutton_util.js b/chrome/content/torbutton_util.js
new file mode 100644
index 00000000..e6446cde
--- /dev/null
+++ b/chrome/content/torbutton_util.js
@@ -0,0 +1,79 @@
+// Bug 1506 P1-P3: These utility functions might be useful, but
+// you probably just want to rewrite them or use the underlying
+// code directly. I don't see any of them as essential for 1506,
+// really.
+
+var m_tb_torlog = Cc["@torproject.org/torbutton-logger;1"]
+.getService(Ci.nsISupports).wrappedJSObject;
+
+var m_tb_string_bundle = torbutton_get_stringbundle();
+
+function torbutton_safelog(nLevel, sMsg, scrub) {
+    m_tb_torlog.safe_log(nLevel, sMsg, scrub);
+    return true;
+}
+
+function torbutton_log(nLevel, sMsg) {
+    m_tb_torlog.log(nLevel, sMsg);
+
+    // So we can use it in boolean expressions to determine where the 
+    // short-circuit is..
+    return true; 
+}
+
+// get a preferences branch object
+// FIXME: this is lame.
+function torbutton_get_prefbranch(branch_name) {
+    var o_prefs = false;
+    var o_branch = false;
+
+    torbutton_log(1, "called get_prefbranch()");
+    o_prefs = Services.prefs;
+    if (!o_prefs) {
+        torbutton_log(5, "Failed to get preferences-service!");
+        return false;
+    }
+
+    o_branch = o_prefs.getBranch(branch_name);
+    if (!o_branch)
+    {
+        torbutton_log(5, "Failed to get prefs branch!");
+        return false;
+    }
+
+    return o_branch;
+}
+
+// load localization strings
+function torbutton_get_stringbundle()
+{
+    var o_stringbundle = false;
+
+    try {
+        var oBundle = Services.strings;
+        o_stringbundle = oBundle.createBundle("chrome://torbutton/locale/torbutton.properties");
+    } catch(err) {
+        o_stringbundle = false;
+    }
+    if (!o_stringbundle) {
+        torbutton_log(5, 'ERROR (init): failed to find torbutton-bundle');
+    }
+
+    return o_stringbundle;
+}
+
+function torbutton_get_property_string(propertyname)
+{
+    try { 
+        if (!m_tb_string_bundle) {
+            m_tb_string_bundle = torbutton_get_stringbundle();
+        }
+
+        return m_tb_string_bundle.GetStringFromName(propertyname);
+    } catch(e) {
+        torbutton_log(4, "Unlocalized string "+propertyname);
+    }
+
+    return propertyname;
+}
+
diff --git a/chrome/locale/en-US/torbutton.dtd b/chrome/locale/en-US/torbutton.dtd
index ed3cb1a6..d14bd1da 100644
--- a/chrome/locale/en-US/torbutton.dtd
+++ b/chrome/locale/en-US/torbutton.dtd
@@ -47,6 +47,3 @@
 <!ENTITY torbutton.prefs.sec_advanced_security_settings "Advanced Security Settings…">
 <!ENTITY torbutton.circuit_display.title "Tor Circuit">
 <!ENTITY torbutton.circuit_display.new_circuit "New Circuit for this Site">
-
-<!-- Onion services strings.  Strings are kept here for ease of translation. -->
-<!ENTITY torbutton.onionServices.authPrompt.tooltip "Open onion service client authentication prompt">
diff --git a/chrome/locale/en-US/torbutton.properties b/chrome/locale/en-US/torbutton.properties
index 1020e57a..ea7a7d63 100644
--- a/chrome/locale/en-US/torbutton.properties
+++ b/chrome/locale/en-US/torbutton.properties
@@ -58,13 +58,3 @@ updateDownloadingPanelUILabel=Downloading %S update
 # .Onion Page Info prompt.  Strings are kept here for ease of translation.
 pageInfo_OnionEncryptionWithBitsAndProtocol=Connection Encrypted (Onion Service, %1$S, %2$S bit keys, %3$S)
 pageInfo_OnionEncryption=Connection Encrypted (Onion Service)
-
-# Onion services strings.  Strings are kept here for ease of translation.
-# LOCALIZATION NOTE: %S will be replaced with the .onion address.
-onionServices.clientAuthMissing=Tor onion service missing client authorization
-onionServices.authPrompt.description=%S is requesting your private key.
-onionServices.authPrompt.keyPlaceholder=Enter your private key for this onion service
-onionServices.authPrompt.done=Done
-onionServices.authPrompt.doneAccessKey=d
-onionServices.authPrompt.invalidKey=Please enter a valid key (52 base32 characters or 44 base64 characters)
-onionServices.authPrompt.failedToSetKey=Unable to configure Tor with your key
diff --git a/chrome/locale/ko/torbutton.dtd b/chrome/locale/ko/torbutton.dtd
index 109e2117..044cd417 100644
--- a/chrome/locale/ko/torbutton.dtd
+++ b/chrome/locale/ko/torbutton.dtd
@@ -1,18 +1,18 @@
 <!ENTITY torbutton.context_menu.new_identity "새로운 신원">
 <!ENTITY torbutton.context_menu.new_identity_key "I">
-<!ENTITY torbutton.context_menu.new_circuit "이 사이트에서의 새 Tor 서킷">
+<!ENTITY torbutton.context_menu.new_circuit "Tor 서킷 재구축">
 <!ENTITY torbutton.context_menu.new_circuit_key "C">
-<!ENTITY torbutton.context_menu.networksettings "Tor 네트워크 설정...">
+<!ENTITY torbutton.context_menu.networksettings "토르 네트워크 설정...">
 <!ENTITY torbutton.context_menu.networksettings.key "N">
 <!ENTITY torbutton.context_menu.downloadUpdate "토르 브라우저 업데이트 체크하기...">
 <!ENTITY torbutton.context_menu.downloadUpdate.key "U">
-<!ENTITY torbutton.context_menu.cookieProtections "쿠키 보호...">
+<!ENTITY torbutton.context_menu.cookieProtections "쿠키 보호....">
 <!ENTITY torbutton.context_menu.cookieProtections.key "C">
-<!ENTITY torbutton.button.tooltip "클릭하여 Torbutton 설정 초기하기">
+<!ENTITY torbutton.button.tooltip "Torbutton 설정 초기화">
 <!ENTITY torbutton.prefs.security_settings "Tor 브라우저 보안 설정">
 <!ENTITY torbutton.cookiedialog.title "쿠키 보호 관리">
 <!ENTITY torbutton.cookiedialog.lockCol "보호됨">
-<!ENTITY torbutton.cookiedialog.domainCol "호스트">
+<!ENTITY torbutton.cookiedialog.domainCol "Host">
 <!ENTITY torbutton.cookiedialog.nameCol "이름">
 <!ENTITY torbutton.cookiedialog.pathCol "경로">
 <!ENTITY torbutton.cookiedialog.protectCookie "쿠키 보호">
@@ -22,7 +22,7 @@
 <!ENTITY torbutton.cookiedialog.saveAllCookies "새로운 쿠키 보호">
 <!ENTITY torbutton.cookiedialog.doNotSaveAllCookies "새로운 쿠키를 보호하지 않음">
 <!ENTITY torbutton.prefs.sec_caption "보안 등급">
-<!ENTITY torbutton.prefs.sec_caption_tooltip "보안 슬라이더를 사용하면 특정 브라우저 기능이 비활성화되어 브라우저가 해킹 시도에 취약해질 수 있습니다.">
+<!ENTITY torbutton.prefs.sec_caption_tooltip "보안 슬라이더를 사용하면 특정 브라우저 기능이 비활성화 되어 브라우저가 해킹 시도에 취약해질 수 있습니다.">
 <!ENTITY torbutton.prefs.sec_standard_label "표준">
 <!ENTITY torbutton.prefs.sec_standard_description "모든 Tor 브라우저와 웹사이트의 기능들이 활성화 됩니다.">
 <!ENTITY torbutton.prefs.sec_safer_label "더 안전합니다">
@@ -36,7 +36,7 @@
 <!ENTITY torbutton.prefs.sec_js_disabled "자바 스크립트는 기본 설정으로 모든 사이트에서 비활성화 되어 있습니다.">
 <!ENTITY torbutton.prefs.sec_limit_typography "일부 글꼴이며 수학기호가 비활성화 됩니다.">
 <!ENTITY torbutton.prefs.sec_limit_graphics_and_typography "일부 글꼴이며 상징이며 수학기호며 사진이 비활성화 됩니다.">
-<!ENTITY torbutton.prefs.sec_click_to_play_media "오디오와 비디오(HTML5로 표현된), 그리고 WebGL 은 클릭하여 재생합니다.">
+<!ENTITY torbutton.prefs.sec_click_to_play_media "Audio and video (HTML5 media), and WebGL are click-to-play.">
 <!ENTITY torbutton.prefs.sec_custom_warning "사용자 맞춤">
 <!ENTITY torbutton.prefs.sec_overview "보안과 익명성을 공격하는 데 사용될 수 있는 특정한 웹의 기능을 해제합니다.">
 <!ENTITY torbutton.prefs.sec_standard_tooltip "보안 수준:표준">
diff --git a/chrome/locale/ko/torbutton.properties b/chrome/locale/ko/torbutton.properties
index fed47bf8..9eef842b 100644
--- a/chrome/locale/ko/torbutton.properties
+++ b/chrome/locale/ko/torbutton.properties
@@ -53,7 +53,7 @@ profileMigrationFailed=기존 %S 프로필을 이전하지 못했습니다. 새
 # "Downloading update" string for the hamburger menu (see #28885).
 # This string is kept here for ease of translation.
 # LOCALIZATION NOTE: %S is the application name.
-updateDownloadingPanelUILabel=업데이트 %S 다운로드 중
+updateDownloadingPanelUILabel=Downloading %S update
 
 # .Onion Page Info prompt.  Strings are kept here for ease of translation.
 pageInfo_OnionEncryptionWithBitsAndProtocol=연결은 암호화했습니다 (Onion 서비스, %1$S, %2$S 비트 키들, %3$S)
diff --git a/chrome/locale/lt/aboutDialog.dtd b/chrome/locale/lt/aboutDialog.dtd
deleted file mode 100644
index 8086ac53..00000000
--- a/chrome/locale/lt/aboutDialog.dtd
+++ /dev/null
@@ -1,19 +0,0 @@
-<!ENTITY project.start           "&brandShortName; plėtoja ">
-<!-- LOCALIZATION NOTE (project.tpoLink): This is a link title that links to https://www.torproject.org -->
-<!ENTITY project.tpoLink         "&vendorShortName;">
-<!ENTITY project.end             ", ne pelno siekianti organizacija, dirbanti tam, kad apsaugotų jūsų privatumą ir laisvę internete.">
-
-<!ENTITY help.start              "Norite padėti?">
-<!-- LOCALIZATION NOTE (help.donate): This is a link title that links to https://www.torproject.org/donate/donate.html.en -->
-<!ENTITY help.donateLink         "Paaukokite">
-<!ENTITY help.or                 " arba ">
-<!-- LOCALIZATION NOTE (help.getInvolvedLink): This is a link title that links to https://www.torproject.org/getinvolved/volunteer.html.en -->
-<!ENTITY help.getInvolvedLink    "įsitraukite">
-<!ENTITY help.end                "!">
-<!-- LOCALIZATION NOTE (bottom.questions): This is a link title that links to https://www.torproject.org/docs/trademark-faq.html.en -->
-<!ENTITY bottomLinks.questions   "Klausimai?">
-<!-- LOCALIZATION NOTE (bottom.questions): This is a link title that links to https://www.torproject.org/getinvolved/relays -->
-<!ENTITY bottomLinks.grow        "Padėkite Tor tinklui augti!">
-<!-- LOCALIZATION NOTE (bottom.questions): This is a link title that links to about:license -->
-<!ENTITY bottomLinks.license  "Licencijavimo informacija">
-<!ENTITY tor.TrademarkStatement   ""Tor" ir "Onion logotipas" yra registruoti Tor Project, Inc. prekių ženklai.">
diff --git a/chrome/locale/lt/aboutTBUpdate.dtd b/chrome/locale/lt/aboutTBUpdate.dtd
deleted file mode 100644
index a555d655..00000000
--- a/chrome/locale/lt/aboutTBUpdate.dtd
+++ /dev/null
@@ -1,8 +0,0 @@
-<!ENTITY aboutTBUpdate.changelogTitle "Tor Browser keitinių žurnalas">
-<!ENTITY aboutTBUpdate.updated "Tor Naršyklė atnaujinta.">
-<!ENTITY aboutTBUpdate.linkPrefix "Norėdami sužinoti naujausią informaciją apie šią laida, ">
-<!ENTITY aboutTBUpdate.linkLabel  "apsilankykite mūsų internetinėje svetainėje">
-<!ENTITY aboutTBUpdate.linkSuffix ".">
-<!ENTITY aboutTBUpdate.version "Versija">
-<!ENTITY aboutTBUpdate.releaseDate "Laidos data">
-<!ENTITY aboutTBUpdate.releaseNotes "Laidos informacija">
diff --git a/chrome/locale/lt/aboutTor.dtd b/chrome/locale/lt/aboutTor.dtd
index b6f8a23d..9f14022b 100644
--- a/chrome/locale/lt/aboutTor.dtd
+++ b/chrome/locale/lt/aboutTor.dtd
@@ -1,32 +1,47 @@
 <!--
-   - Copyright (c) 2019, The Tor Project, Inc.
+   - Copyright (c) 2014, The Tor Project, Inc.
    - See LICENSE for licensing information.
    - vim: set sw=2 sts=2 ts=8 et syntax=xml:
   -->
 
-<!ENTITY aboutTor.title "Apie Tor">
+<!ENTITY aboutTor.title "About Tor">
 
-<!ENTITY aboutTor.viewChangelog.label "Rodyti keitinių žurnalą">
+<!ENTITY aboutTor.outOfDateTorOn.label "HOWEVER, this browser is out of date.">
+<!ENTITY aboutTor.outOfDateTorOff.label "ALSO, this browser is out of date.">
+<!ENTITY aboutTor.outOfDate2.label "Click on the onion and then choose Download Tor Browser Bundle Update.">
 
-<!ENTITY aboutTor.ready.label "Naršykite. Privačiai.">
-<!ENTITY aboutTor.ready2.label "Jūs esate pasiruošę privačiausiam naršymo patyrimui pasaulyje.">
-<!ENTITY aboutTor.failure.label "Kažkas nutiko!">
-<!ENTITY aboutTor.failure2.label "Šioje naršyklėje Tor neveikia.">
+<!ENTITY aboutTor.check.label "Test Tor Network Settings">
 
-<!ENTITY aboutTor.search.label "Ieškoti naudojant DuckDuckGo">
-<!ENTITY aboutTor.searchDDGPost.link "https://duckduckgo.com">
+<!ENTITY aboutTor.success.label "Congratulations!">
+<!ENTITY aboutTor.success2.label "This browser is configured to use Tor.">
+<!ENTITY aboutTor.success3.label "You are now free to browse the Internet anonymously.">
+<!ENTITY aboutTor.failure.label "Something Went Wrong!">
+<!ENTITY aboutTor.failure2.label "Tor is not working in this browser.">
+<!ENTITY aboutTor.failure3prefix.label "For assistance, please contact ">
+<!ENTITY aboutTor.failure3Link "help at rt.torproject.org">
+<!ENTITY aboutTor.failure3suffix.label ".">
 
-<!ENTITY aboutTor.torbrowser_user_manual_questions.label "Turite klausimų?">
-<!ENTITY aboutTor.torbrowser_user_manual_link.label "Peržiūrėkite mūsų Tor Browser naudotojo vadovą »">
-<!-- The next two entities are used within the browser's Help menu. -->
-<!ENTITY aboutTor.torbrowser_user_manual.accesskey "V">
-<!ENTITY aboutTor.torbrowser_user_manual.label "Tor Browser naudotojo vadovas">
+<!ENTITY aboutTor.search.label "Search">
+<!ENTITY aboutTor.searchSPPost.link "https://startpage.com/do/search">
+<!ENTITY aboutTor.searchDDGPost.link "https://duckduckgo.com/html/">
 
-<!ENTITY aboutTor.tor_mission.label "Tor Project yra JAV 501(c)(3) ne pelno organizacija remianti žmogaus teises ir laisves, kurianti ir diegianti laisvas ir atvirojo kodo anonimiškumo bei privatumo technologijas, palaikanti jų neribotą prieinamumą ir naudojimą bei mokslinį ir visuotinį supratimą.">
-<!ENTITY aboutTor.getInvolved.label "Įsitraukite »">
-<!ENTITY aboutTor.getInvolved.link "https://www.torproject.org/getinvolved/volunteer.html.en">
+<!ENTITY aboutTor.torInfo1.label "Additional Info:">
+<!ENTITY aboutTor.torInfo2.label "Country & IP Address:">
+<!ENTITY aboutTor.torInfo3.label "Exit Node:">
+<!ENTITY aboutTor.torInfo4.label "This server does not log any information about visitors.">
+<!ENTITY aboutTor.whatnextQuestion.label "What Next?">
+<!ENTITY aboutTor.whatnextAnswer.label "Tor is NOT all you need to browse anonymously! You may need to change some of your browsing habits to ensure your identity stays safe.">
+<!ENTITY aboutTor.whatnext.label "Tips On Staying Anonymous »">
+<!ENTITY aboutTor.whatnext.link "https://www.torproject.org/download/download.html.en#warning">
+<!ENTITY aboutTor.helpInfo1.label "You Can Help!">
+<!ENTITY aboutTor.helpInfo2.label "There are many ways you can help make the Tor Network faster and stronger:">
+<!ENTITY aboutTor.helpInfo3.label "Run a Tor Relay Node »">
+<!ENTITY aboutTor.helpInfo3.link "https://www.torproject.org/docs/tor-doc-relay.html.en">
+<!ENTITY aboutTor.helpInfo4.label "Volunteer Your Services »">
+<!ENTITY aboutTor.helpInfo4.link "https://www.torproject.org/getinvolved/volunteer.html.en">
+<!ENTITY aboutTor.helpInfo5.label "Make a Donation »">
+<!ENTITY aboutTor.helpInfo5.link "https://www.torproject.org/donate/donate.html.en">
 
-<!ENTITY aboutTor.newsletter.tagline "Gaukite naujienas iš Tor tiesiai į savo pašto dėžutę.">
-<!ENTITY aboutTor.newsletter.link_text "Užsisakykite Tor naujienas.">
-<!ENTITY aboutTor.donationBanner.line2e "Išlaikykite Tor stiprų.">
-<!ENTITY aboutTor.donationBanner.buttonA "Paaukokite dabar">
+<!ENTITY aboutTor.footer.label "The Tor Project is a US 501(c)(3) non-profit dedicated to the research, development, and education of online anonymity and privacy.">
+<!ENTITY aboutTor.learnMore.label "Learn more about The Tor Project »">
+<!ENTITY aboutTor.learnMore.link "https://www.torproject.org/about/overview.html.en">
diff --git a/chrome/locale/lt/brand.dtd b/chrome/locale/lt/brand.dtd
index 788d88f3..47d33862 100644
--- a/chrome/locale/lt/brand.dtd
+++ b/chrome/locale/lt/brand.dtd
@@ -2,14 +2,7 @@
    - 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/. -->
 
-<!ENTITY  brandShorterName      "Tor Naršyklė">
-<!ENTITY  brandShortName        "Tor Naršyklė">
-<!ENTITY  brandFullName         "Tor Naršyklė">
-<!ENTITY  vendorShortName       "Tor projektas">
-<!ENTITY  trademarkInfo.part1   ""Tor" ir "Onion logotipas" yra registruoti Tor Project, Inc. prekių ženklai.">
-
-<!-- The following strings are for bug #10280's UI. We place them here for our translators -->
-<!ENTITY plugins.installed.find "Spustelėkite, kad įkeltumėte įdiegtus sistemos papildinius">
-<!ENTITY plugins.installed.enable "Įjungti papildinius">
-<!ENTITY plugins.installed.disable "Išjungti papildinius">
-<!ENTITY plugins.installed.disable.tip "Spustelėkite, kad neleistumėte įkėlinėti sistemos papildinių">
+<!ENTITY  brandShortName        "Tor Browser">
+<!ENTITY  brandFullName         "Tor Browser">
+<!ENTITY  vendorShortName       "Tor Project">
+<!ENTITY  trademarkInfo.part1   "'Tor' and the 'Onion Logo' are registered trademarks of the Tor Project, Inc.">
diff --git a/chrome/locale/lt/brand.properties b/chrome/locale/lt/brand.properties
index 88eddfc5..f63def38 100644
--- a/chrome/locale/lt/brand.properties
+++ b/chrome/locale/lt/brand.properties
@@ -2,15 +2,14 @@
 # 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/.
 
-brandShorterName=Tor Naršyklė
-brandShortName=Tor Naršyklė
-brandFullName=Tor Naršyklė
-vendorShortName=Tor projektas
+brandShortName=Tor Browser
+brandFullName=Tor Browser
+vendorShortName=Tor Project
 
-homePageSingleStartMain=Firefox Start, greitas pradžios tinklalapis su integruota paieška
-homePageImport=Importuoti pradžios tinklalapį iš %S
+homePageSingleStartMain=Firefox Start, a fast home page with built-in search
+homePageImport=Import your home page from %S
 
-homePageMigrationPageTitle=Pradžios tinklalapio pasirinkimas
-homePageMigrationDescription=Prašome pasirinkti pradžios tinklalapį, kurį naudosite:
+homePageMigrationPageTitle=Home Page Selection
+homePageMigrationDescription=Please select the home page you wish to use:
 
-syncBrandShortName=Sinchronizavimas
+syncBrandShortName=Sync
diff --git a/chrome/locale/lt/browserOnboarding.properties b/chrome/locale/lt/browserOnboarding.properties
deleted file mode 100644
index b351e854..00000000
--- a/chrome/locale/lt/browserOnboarding.properties
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright (c) 2019, The Tor Project, Inc.
-# See LICENSE for licensing information.
-# vim: set sw=2 sts=2 ts=8 et:
-
-onboarding.tour-tor-welcome=Sveiki
-onboarding.tour-tor-welcome.title=Esate pasiruošę.
-onboarding.tour-tor-welcome.description=Tor Naršyklė leidžia naršyti po saityną ir tuo pačiu siūlo aukščiausius privatumo bei saugumo standartus. Dabar, esate apsaugoti nuo sekimo, stebėjimo ir cenzūros. Šiame trumpame įvade jums parodysime kaip tai daroma.
-onboarding.tour-tor-welcome.next-button=Pereiti į privatumą
-
-onboarding.tour-tor-privacy=Privatumas
-onboarding.tour-tor-privacy.title=Nepaisykite sekiklių ir šniukštinėtojų.
-onboarding.tour-tor-privacy.description=Tor Naršyklė izoliuoja slapukus ir po kiekvieno naršymo seanso ištrina naršymo istoriją. Šie pakeitimai užtikrina, kad jūsų privatumas ir saugumas naršyklėje yra apsaugoti. Spustelėkite "Tor tinklas", norėdami sužinoti, kaip mes apsaugome jus tinklo lygmenyje.
-onboarding.tour-tor-privacy.button=Pereiti prie Tor tinklo
-
-onboarding.tour-tor-network=Tor tinklas
-onboarding.tour-tor-network.title=Keliaukite po decentralizuotą tinklą.
-onboarding.tour-tor-network.description=Tor Naršyklė prijungia jus prie Tor tinklo, veikiančio tūkstančių, po visą pasaulį išsidėsčiusių, savanorių dėka. Skirtingai nei VPN, čia, norint mėgautis privačiu naršymu saityne, nėra vieno žlugimo taško, ar centralizuoto objekto, kuriuo turėtumėte pasitikėti.
-onboarding.tour-tor-network.description-para2=NAUJA: Tor tinklo nustatymai, įtraukiant galimybę prašyti tinklo tiltų, kur Tor užblokuotas, dabar galima rasti pirmenybėse
-onboarding.tour-tor-network.action-button=Derinti savo Tor tinklo nustatymus
-onboarding.tour-tor-network.button=Pereiti į grandinės rodinį
-
-onboarding.tour-tor-circuit-display=Grandinės rodinys
-onboarding.tour-tor-circuit-display.title=Matykite savo kelią.
-onboarding.tour-tor-circuit-display.description=Kiekvienoje jūsų aplankomų sričių, jūsų srautas yra retransliuojamas ir šifruojamas grandinėje, sudarytoje iš trijų Tor retransliavimų, išsidėsčiusių po visą pasaulį. Jokia internetinė svetainė nežino iš kurios vietos jungiatės. Galite užklausti naują grandinę, mūsų grandinės rodinyje spusteldami ant "Nauja grandinė šiai svetainei".
-onboarding.tour-tor-circuit-display.button=Rodyti mano kelią
-onboarding.tour-tor-circuit-display.next-button=Pereiti į saugumą
-
-onboarding.tour-tor-security=Saugumas
-onboarding.tour-tor-security.title=Pasirinkite savo patyrimą.
-onboarding.tour-tor-security.description=Mes taip pat siūlome papildomus nustatymus, kurių pagalba galima būtų dar pagerinti jūsų naršyklės saugumą. Mūsų saugumo nustatymai leidžia jums blokuoti reikiamus elementus, kurie galėtų būti panaudoti siekiant užpulti jūsų kompiuterį. Spustelėkite žemiau, norėdami pamatyti ką skirtingi parametrai atlieka.
-onboarding.tour-tor-security.description-suffix=Pastaba: Pagal numatymą, NoScript ir HTTPS Everywhere nėra įtraukti į įrankių juostą, tačiau norėdami juos pridėti, galite tinkinti savo įrankių juostą.
-onboarding.tour-tor-security-level.button=Žiūrėti savo saugumo lygmenį
-onboarding.tour-tor-security-level.next-button=Pereiti į patyrimo patarimus
-
-onboarding.tour-tor-expect-differences=Patyrimo patarimai
-onboarding.tour-tor-expect-differences.title=Tikėkitės kai kurių skirtumų.
-onboarding.tour-tor-expect-differences.description=Su visomis Tor suteikiamomis saugumo ir privatumo ypatybėmis, jūsų patyrimas naršant saityną gali būti šiek tiek kitoks. Priklausomai nuo jūsų saugumo lygmens, viskas gali veikti šiek tiek lėčiau, o kai kurie elementai - neveikti arba būti neįkeliami. Taip pat jūsų gali būti prašoma įrodyti, kad esate žmogus, o ne robotas.
-onboarding.tour-tor-expect-differences.button=Rodyti DUK
-onboarding.tour-tor-expect-differences.next-button=Pereiti į Onion tarnybas
-
-onboarding.tour-tor-onion-services=Onion tarnybos
-onboarding.tour-tor-onion-services.title=Būkite papildomai apsaugoti.
-onboarding.tour-tor-onion-services.description=Onion tarnybos yra svetainės, kurių adresai baigiasi .onion - turinio leidėjams bei lankytojams jos suteikia papildomą apsaugą, įskaitant apsaugą prieš cenzūros. Onion tarnybos leidžia visiems skelbti turinį bei teikti paslaugas anonimiškai. Spustelėkite žemiau, norėdami apsilankyti DuckDuckGo onion svetainėje.
-onboarding.tour-tor-onion-services.button=Apsilankyti Onion
-onboarding.tour-tor-onion-services.next-button=Atlikta
-
-onboarding.overlay-icon-tooltip-updated2=Žiūrėkite kas yra\nnaujo %S
-onboarding.tour-tor-update.prefix-new=Nauja
-onboarding.tour-tor-update.prefix-updated=Atnaujinta
-
-onboarding.tour-tor-toolbar=Įrankių juosta
-onboarding.tour-tor-toolbar-update-9.0.title=Viso gero Svogūno mygtuke.
-onboarding.tour-tor-toolbar-update-9.0.description=Norime kad jūsų patirtis naudojantis Tor būtų pilnai integruota Tor naršyklėje.
-onboarding.tour-tor-toolbar-update-9.0.description-para2=Dėl to dabar, vietoj svogūno mygtuko naudojimo, galite Tor grandinę pamatyti per [i] URL juostoje ir duoti užklausą naujai tapatybei naudodamiesi įrankių juostos mygtuku arba [≡] meniu.
-onboarding.tour-tor-toolbar-update-9.0.button=Kaip duoti užklausą naujai tapatybei
-onboarding.tour-tor-toolbar-update-9.0.next-button=Pereiti prie Tor tinklo
-
-# Circuit Display onboarding.
-onboarding.tor-circuit-display.next=Kitas
-onboarding.tor-circuit-display.done=Atlikta
-onboarding.tor-circuit-display.one-of-three=1 iš 3
-onboarding.tor-circuit-display.two-of-three=2 iš 3
-onboarding.tor-circuit-display.three-of-three=3 iš 3
-
-onboarding.tor-circuit-display.intro.title=Kaip veikia grandinės?
-onboarding.tor-circuit-display.intro.msg=Grandinės yra sudarytos iš atsitiktinai priskirtų retransliavimų, kurie savo ruožtu yra kompiuteriai visame pasaulyje sukonfigūruoti persiųsti Tor duomenų srautą. Grandinės jums leidžia naršyti privačiai ir prisijungti prie onion tarnybų.
-
-onboarding.tor-circuit-display.diagram.title=Grandinės rodinys
-onboarding.tor-circuit-display.diagram.msg=Ši diagrama rodo retransliavimus, kurie sudaro šios internetinės svetainės grandinę. Norint neleisti susieti veiklos tarp įvairių svetainių, kiekviena svetainė gauna skirtingą grandinę.
-
-onboarding.tor-circuit-display.new-circuit.title=Ar jums reikia naujos grandinės?
-onboarding.tor-circuit-display.new-circuit.msg=Jeigu negalite prisijungti prie norimos aplankyti internetinės svetainės arba ji nėra tinkamai įkeliama, tuomet galite pasinaudoti šiuo mygtuku, kad iš naujo įkeltumėte svetainę, naudojant naują grandinę.
diff --git a/chrome/locale/lt/torbutton.dtd b/chrome/locale/lt/torbutton.dtd
index a03f0c34..ac9fb759 100644
--- a/chrome/locale/lt/torbutton.dtd
+++ b/chrome/locale/lt/torbutton.dtd
@@ -1,52 +1,20 @@
 <!ENTITY torbutton.context_menu.new_identity "Nauja tapatybė">
-<!ENTITY torbutton.context_menu.new_identity_key "T">
-<!ENTITY torbutton.context_menu.new_circuit "Nauja Tor grandinė šiai svetainei">
-<!ENTITY torbutton.context_menu.new_circuit_key "G">
-<!ENTITY torbutton.context_menu.networksettings "Tor tinklo nustatymai…">
-<!ENTITY torbutton.context_menu.networksettings.key "N">
-<!ENTITY torbutton.context_menu.downloadUpdate "Tikrinti, ar yra Tor Naršyklės atnaujinimų…">
+<!ENTITY torbutton.context_menu.new_identity_key "I">
+<!ENTITY torbutton.context_menu.networksettings "Open Network Settings…">
+<!ENTITY torbutton.context_menu.downloadUpdate "Download Tor Browser Bundle Update...">
 <!ENTITY torbutton.context_menu.downloadUpdate.key "U">
-<!ENTITY torbutton.context_menu.cookieProtections "Slapukų apsaugos…">
-<!ENTITY torbutton.context_menu.cookieProtections.key "P">
-<!ENTITY torbutton.button.tooltip "Spustelėkite, kad aktyvuotumėte Torbutton">
-<!ENTITY torbutton.prefs.security_settings "Tor Naršyklės saugumo nustatymai">
-<!ENTITY torbutton.cookiedialog.title "Tvarkyti slapukų apsaugas">
-<!ENTITY torbutton.cookiedialog.lockCol "Apsaugotas">
-<!ENTITY torbutton.cookiedialog.domainCol "Serveris">
+<!ENTITY torbutton.context_menu.cookieProtections "Slapukų apsaugos">
+<!ENTITY torbutton.context_menu.cookieProtections.key "C">
+<!ENTITY torbutton.button.tooltip "Paspauskite kad aktyvuoti Torbutton">
+<!ENTITY torbutton.cookiedialog.title "Manage Cookie Protections">
+<!ENTITY torbutton.cookiedialog.lockCol "Protected">
+<!ENTITY torbutton.cookiedialog.domainCol "Host">
 <!ENTITY torbutton.cookiedialog.nameCol "Pavadinimas">
-<!ENTITY torbutton.cookiedialog.pathCol "Kelias">
-<!ENTITY torbutton.cookiedialog.protectCookie "Apsaugoti slapuką">
-<!ENTITY torbutton.cookiedialog.removeCookie "Šalinti slapuką">
-<!ENTITY torbutton.cookiedialog.unprotectCookie "Neapsaugoti slapuko">
-<!ENTITY torbutton.cookiedialog.removeAllBut "Šalinti visus, išskyrus apsaugotus">
-<!ENTITY torbutton.cookiedialog.saveAllCookies "Apsaugoti naujus slapukus">
-<!ENTITY torbutton.cookiedialog.doNotSaveAllCookies "Neapsaugoti naujų slapukų">
-<!ENTITY torbutton.prefs.sec_caption "Saugumo lygmuo">
-<!ENTITY torbutton.prefs.sec_caption_tooltip "Saugumo slankiklis leidžia jums išjungti tam tikras naršyklės ypatybes, kurios gali padaryti jūsų naršyklę labiau pažeidžiamą bandymams įsibrauti.">
-<!ENTITY torbutton.prefs.sec_standard_label "Standartinis">
-<!ENTITY torbutton.prefs.sec_standard_description "Visos Tor Naršyklės ir internetinių svetainių ypatybės yra įjungtos.">
-<!ENTITY torbutton.prefs.sec_safer_label "Saugesnis">
-<!ENTITY torbutton.prefs.sec_safer_description "Išjungia tas internetinių svetainių ypatybes, kurios, dažnai, būna pavojingos, dėl to kai kurios svetainės gali prarasti funkcionalumą.">
-<!ENTITY torbutton.prefs.sec_safer_list_label "Saugesniame nustatyme:">
-<!ENTITY torbutton.prefs.sec_safest_label "Saugiausias">
-<!ENTITY torbutton.prefs.sec_safest_description "Leidžia tik tas internetinių svetainių ypatybes, kurios yra reikalingos statinėms svetainėms bei pagrindinėms paslaugoms. Šie pakeitimai paveikia paveikslus, medija ir scenarijus.">
-<!ENTITY torbutton.prefs.sec_safest_list_label "Saugiausiame nustatyme:">
-<!ENTITY torbutton.prefs.sec_learn_more_label "Sužinoti daugiau">
-<!ENTITY torbutton.prefs.sec_js_on_https_sites_only "JavaScript yra išjungtas ne HTTPS svetainėse.">
-<!ENTITY torbutton.prefs.sec_js_disabled "Pagal numatymą, Javascript yra išjungtas visose svetainėse.">
-<!ENTITY torbutton.prefs.sec_limit_typography "Kai kurie šriftai ir matematiniai simboliai yra išjungti.">
-<!ENTITY torbutton.prefs.sec_limit_graphics_and_typography "Kai kurie šriftai, piktogramos, matematiniai simboliai ir paveikslai yra išjungti.">
-<!ENTITY torbutton.prefs.sec_click_to_play_media "Garsas ir vaizdas (HTML5 medija), bei WebGL yra atkuriami tik spustelėjus.">
-<!ENTITY torbutton.prefs.sec_custom_warning "Tinkintas">
-<!ENTITY torbutton.prefs.sec_overview "Išjungia tam tikras saityno ypatybes, kurios gali būti panaudotos užpulti jūsų saugumą ar anonimiškumą.">
-<!ENTITY torbutton.prefs.sec_standard_tooltip "Saugumo lygmuo : Standartinis">
-<!ENTITY torbutton.prefs.sec_safer_tooltip "Saugumo lygmuo : Saugesnis">
-<!ENTITY torbutton.prefs.sec_safest_tooltip "Saugumo lygmuo : Saugiausias">
-<!ENTITY torbutton.prefs.sec_custom_summary "Jūsų pasirinktinės naršyklės nuostatos sąlygojo neįprastus saugumo nustatymus. Dėl saugumo ir privatumo priežasčių, rekomenduojame jums pasirinkti vieną iš numatytųjų saugumo lygių.">
-<!ENTITY torbutton.prefs.sec_restore_defaults "Atkurti numatytuosius">
-<!ENTITY torbutton.prefs.sec_advanced_security_settings "Išplėstiniai saugumo nustatymai…">
-<!ENTITY torbutton.circuit_display.title "Tor grandinė">
-<!ENTITY torbutton.circuit_display.new_circuit "Nauja grandinė šiai svetainei">
-
-<!-- Onion services strings.  Strings are kept here for ease of translation. -->
-<!ENTITY torbutton.onionServices.authPrompt.tooltip "Atidarykite onion paslaugos kliento autentifikavimo eilutę">
+<!ENTITY torbutton.cookiedialog.pathCol "Path">
+<!ENTITY torbutton.cookiedialog.protectCookie "Protect Cookie">
+<!ENTITY torbutton.cookiedialog.removeCookie "Remove Cookie">
+<!ENTITY torbutton.cookiedialog.unprotectCookie "Unprotect Cookie">
+<!ENTITY torbutton.cookiedialog.removeAllBut "Remove All But Protected">
+<!ENTITY torbutton.cookiedialog.saveAllCookies "Protect New Cookies">
+<!ENTITY torbutton.cookiedialog.doNotSaveAllCookies "Do Not Protect New Cookies">
+<!ENTITY torbutton.prefs.sec_restore_defaults "Atstatyti numatytuosius">
diff --git a/chrome/locale/lt/torbutton.properties b/chrome/locale/lt/torbutton.properties
index 7bc5a23e..e3e4454c 100644
--- a/chrome/locale/lt/torbutton.properties
+++ b/chrome/locale/lt/torbutton.properties
@@ -1,70 +1,27 @@
-torbutton.circuit_display.internet = Internetas
-torbutton.circuit_display.ip_unknown = IP nežinomas
-torbutton.circuit_display.onion_site = Onion svetainė
-torbutton.circuit_display.this_browser = Ši naršyklė
-torbutton.circuit_display.relay = Retransliavimas
-torbutton.circuit_display.tor_bridge = Tinklų tiltas
-torbutton.circuit_display.unknown_country = Nežinoma šalis
-torbutton.circuit_display.guard = Sargybinis
-torbutton.circuit_display.guard_note = Jūsų [Sargybinis] mazgas negali pasikeisti.
-torbutton.circuit_display.learn_more = Sužinoti daugiau
-torbutton.content_sizer.margin_tooltip = Tor Naršyklė prideda šią paraštę, kad jūsų lango plotis ir aukštis būtų mažiau atskiriami ir, tokiu būdu, žmonėms būtų sumažinta galimybė sekti jus internete.
-torbutton.panel.tooltip.disabled = Spustelėkite norėdami įjungti Tor
-torbutton.panel.tooltip.enabled = Spustelėkite norėdami išjungti Tor
-torbutton.panel.label.disabled = Tor išjungta
-torbutton.panel.label.enabled = Tor įjungta
-extensions.torbutton at torproject.org.description = Torbutton pateikia mygtuką, skirtą konfigūruoti Tor nustatymus ir greitai bei lengvai išvalyti privačius naršymo duomenis.
-torbutton.popup.external.title = Atsisiųsti išorinį failo tipą?
-torbutton.popup.external.app = Tor Naršyklė negali atvaizduoti šio failo. Jums teks jį atverti, naudojant kitą programą.\n\n
-torbutton.popup.external.note = Kai kurie failų tipai, gali priversti programas prisijungti prie interneto ne per Tor.\n\n
-torbutton.popup.external.suggest = Saugumo sumetimais, parsisiųstus failus derėtų atverti, atsijungus nuo interneto arba naudojant Tor Live CD tokį kaip Tails.\n
-torbutton.popup.launch = Atsisiųsti failą
-torbutton.popup.cancel = Atsisakyti
-torbutton.popup.dontask = Nuo šiol, failus atsisiųsti automatiškai
-torbutton.popup.no_newnym = Torbutton negali jums saugiai suteikti naujos tapatybės. Programa neturi prieigos prie Tor valdymo prievado.\n\nAr jūs esate paleidę Tor Naršyklės rinkinį?
-torbutton.security_settings.menu.title = Saugumo nustatymai
+torbutton.panel.tooltip.disabled = Paspauskite kad įgalinti Tor
+torbutton.panel.tooltip.enabled = Paspauskite kad atjungti Tor
+torbutton.panel.label.disabled = Tor atjungtas
+torbutton.panel.label.enabled = Tor įgalintas
+extensions.torbutton at torproject.org.description = Torbutton provides a button to configure Tor settings and quickly and easily clear private browsing data.
+torbutton.popup.external.title = Load external content?
+torbutton.popup.external.app = An external application is needed to handle:\n\n
+torbutton.popup.external.note = \n\nNOTE: External applications are NOT Tor safe by default and can unmask you!\n
+torbutton.popup.external.suggest = \nIf this file is untrusted, you should either save it to view while offline or in a VM,\nor consider using a transparent Tor proxy like Tails LiveCD or torsocks.\n
+torbutton.popup.launch = Launch application
+torbutton.popup.cancel = Atšaukti
+torbutton.popup.dontask = Always launch applications from now on
+torbutton.popup.prompted_language = To give you more privacy, Torbutton can request the English language version of web pages. This may cause web pages that you prefer to read in your native language to display in English instead.\n\nWould you like to request English language web pages for better privacy?
+torbutton.popup.no_newnym = Torbutton cannot safely give you a new identity. It does not have access to the Tor Control Port.\n\nAre you running Tor Browser Bundle?
 torbutton.title.prompt_torbrowser = Svarbi Torbutton informacija
 torbutton.popup.prompt_torbrowser = Torbutton works differently now: you can't turn it off any more.\n\nWe made this change because it isn't safe to use Torbutton in a browser that's also used for non-Tor browsing. There were too many bugs there that we couldn't fix any other way.\n\nIf you want to keep using Firefox normally, you should uninstall Torbutton and download Tor Browser Bundle. The privacy properties of Tor Browser are also superior to those of normal Firefox, even when Firefox is used with Torbutton.\n\nTo remove Torbutton, go to Tools->Addons->Extensions and then click the Remove button next to Torbutton.
-torbutton.popup.short_torbrowser = Svarbi Torbutton informacija!\n\nDabar, Torbutton visada yra įjungta.\n\nIšsamesnei informacijai, spustelėkite ant Torbutton.
+torbutton.popup.short_torbrowser = Important Torbutton Information!\n\nTorbutton is now always enabled.\n\nClick on the Torbutton for more information.
 
-torbutton.popup.confirm_plugins = Tokie įskiepiai kaip Flash gali pažeisti jūsų privatumą ir anonimiškumą.\n\nJie taip pat gali apeiti Tor tam, kad atskleistų jūsų dabartinę buvimo vietą ir IP adresą.\n\nAr tikrai norite įjungti įskiepius?\n\n
-torbutton.popup.never_ask_again = Daugiau nebeklausti
-torbutton.popup.confirm_newnym = Tor Naršyklė užvers visus langus ir korteles. Visi svetainių seansai bus prarasti.\n\nPaleisti Tor Naršyklę iš naujo dabar, kad būtų atstatyta jūsų tapatybė?\n\n
-
-torbutton.maximize_warning = Tor Naršyklės išskleidimas gali leisti svetainėms nustatyti jūsų monitoriaus dydį, o tai gali būti naudojama jūsų sekimui. Rekomenduojame palikti Tor Naršyklės langus jų pradiniame numatytajame dydyje.
+torbutton.popup.confirm_plugins = Plugins such as Flash can harm your privacy and anonymity.\n\nThey can also bypass Tor to reveal your current location and IP address.\n\nAre you sure you want to enable plugins?\n\n
+torbutton.popup.never_ask_again = Never ask me again
 
 # Canvas permission prompt. Strings are kept here for ease of translation.
-canvas.siteprompt=Ši svetainė (%S) bandė išskleisti HTML5 drobės paveikslo duomenis, kas gali būti panaudota, kad jūsų kompiuteris būtų unikaliai atpažįstamas.\n\nAr Tor Naršyklė turėtų leisti šiai svetainei išskleisti HTML5 drobės paveikslo duomenis?
-canvas.notNow=Ne dabar
-canvas.notNowAccessKey=N
+canvas.siteprompt=This website (%S) attempted to access image data on a canvas. Since canvas image data can be used to discover information about your computer, blank image data was returned this time.
 canvas.allow=Leisti ateityje
 canvas.allowAccessKey=A
-canvas.never=Niekada šiai svetainei (rekomenduojama)
+canvas.never=Niekada šiam puslapiui
 canvas.neverAccessKey=e
-
-# Profile/startup error messages. Strings are kept here for ease of translation.
-# LOCALIZATION NOTE: %S is the application name.
-profileProblemTitle=%S profilio problema
-profileReadOnly=Negalite paleisti %S iš tik skaitymui skirtos failų sistemos.  Prieš norėdami ja naudotis, nukopijuokite %S į kitą vietą.
-profileReadOnlyMac=Negalite paleisti %S iš tik skaitymui skirtos failų sistemos.  Prieš bandydami ją naudoti, nukopijuokite %S į savo Darbalaukio ar Programų aplanką.
-profileAccessDenied=%S neturi leidimo prieigai prie profilio. Prašome suderinti savo failų sistemos leidimus ir bandyti dar kartą.
-profileMigrationFailed=Jūsų esamo %S profilio perkėlimas nepavyko.\nBus naudojami nauji nustatymai.
-
-# "Downloading update" string for the hamburger menu (see #28885).
-# This string is kept here for ease of translation.
-# LOCALIZATION NOTE: %S is the application name.
-updateDownloadingPanelUILabel=Atsisiunčiamas %S atnaujinimas
-
-# .Onion Page Info prompt.  Strings are kept here for ease of translation.
-pageInfo_OnionEncryptionWithBitsAndProtocol=Šifruotas ryšys (Onion tarnyba, %1$S, %2$S bitų raktai, %3$S)
-pageInfo_OnionEncryption=Šifruotas ryšys (Onion tarnyba)
-
-# Onion services strings.  Strings are kept here for ease of translation.
-# LOCALIZATION NOTE: %S will be replaced with the .onion address.
-onionServices.clientAuthMissing=Tor onion paslaugai trūksta kliento leidimo
-onionServices.authPrompt.description=%S prašo jūsų asmeninio rakto.
-onionServices.authPrompt.keyPlaceholder=Įveskite asmeninį raktą skirtą šiai onion paslaugai
-onionServices.authPrompt.done=Atlikta
-onionServices.authPrompt.doneAccessKey=u
-onionServices.authPrompt.invalidKey=Įveskite galiojantį raktą (52 base32 arba 44 base64 simbolius)
-onionServices.authPrompt.failedToSetKey=Nepavyko konfigūruoti Tor naudojant jūsų raktą
diff --git a/chrome/locale/ms/aboutDialog.dtd b/chrome/locale/ms/aboutDialog.dtd
deleted file mode 100644
index ba27c728..00000000
--- a/chrome/locale/ms/aboutDialog.dtd
+++ /dev/null
@@ -1,19 +0,0 @@
-<!ENTITY project.start           "&brandShortName; dibangunkan oleh">
-<!-- LOCALIZATION NOTE (project.tpoLink): This is a link title that links to https://www.torproject.org -->
-<!ENTITY project.tpoLink         "&vendorShortName;">
-<!ENTITY project.end             ", sebuah usaha tidak berasaskan keuntungan untuk melindungi kerahsiaan dan kebebasan atas talian anda.">
-
-<!ENTITY help.start              "Mahu membantu?">
-<!-- LOCALIZATION NOTE (help.donate): This is a link title that links to https://www.torproject.org/donate/donate.html.en -->
-<!ENTITY help.donateLink         "Derma">
-<!ENTITY help.or                 "atau">
-<!-- LOCALIZATION NOTE (help.getInvolvedLink): This is a link title that links to https://www.torproject.org/getinvolved/volunteer.html.en -->
-<!ENTITY help.getInvolvedLink    "sertai">
-<!ENTITY help.end                "!">
-<!-- LOCALIZATION NOTE (bottom.questions): This is a link title that links to https://www.torproject.org/docs/trademark-faq.html.en -->
-<!ENTITY bottomLinks.questions   "Ada Pertanyaan?">
-<!-- LOCALIZATION NOTE (bottom.questions): This is a link title that links to https://www.torproject.org/getinvolved/relays -->
-<!ENTITY bottomLinks.grow        "Bantulah Pembangunan Rangkaian Tor!">
-<!-- LOCALIZATION NOTE (bottom.questions): This is a link title that links to about:license -->
-<!ENTITY bottomLinks.license  "Maklumat Pelesenan">
-<!ENTITY tor.TrademarkStatement   "'Tor' dan 'Logo Onion' adalah cap dagangan berdaftar bagi Projek Tor, Inc.">
diff --git a/chrome/locale/ms/aboutTBUpdate.dtd b/chrome/locale/ms/aboutTBUpdate.dtd
deleted file mode 100644
index 30470b87..00000000
--- a/chrome/locale/ms/aboutTBUpdate.dtd
+++ /dev/null
@@ -1,8 +0,0 @@
-<!ENTITY aboutTBUpdate.changelogTitle "Log Perubahan Pelayar Tor">
-<!ENTITY aboutTBUpdate.updated "Pelayar Tor telah dikemaskinikan.">
-<!ENTITY aboutTBUpdate.linkPrefix "Untuk dapatkan maklumat terkini berkenaan keluaran ini.">
-<!ENTITY aboutTBUpdate.linkLabel  "lawati laman sesawang kami">
-<!ENTITY aboutTBUpdate.linkSuffix ".">
-<!ENTITY aboutTBUpdate.version "Versi">
-<!ENTITY aboutTBUpdate.releaseDate "Tarikh Keluaran">
-<!ENTITY aboutTBUpdate.releaseNotes "Nota Keluaran">
diff --git a/chrome/locale/ms/aboutTor.dtd b/chrome/locale/ms/aboutTor.dtd
index 19fe7960..9f14022b 100644
--- a/chrome/locale/ms/aboutTor.dtd
+++ b/chrome/locale/ms/aboutTor.dtd
@@ -1,32 +1,47 @@
 <!--
-   - Copyright (c) 2019, The Tor Project, Inc.
+   - Copyright (c) 2014, The Tor Project, Inc.
    - See LICENSE for licensing information.
    - vim: set sw=2 sts=2 ts=8 et syntax=xml:
   -->
 
-<!ENTITY aboutTor.title "Perihal Tor">
+<!ENTITY aboutTor.title "About Tor">
 
-<!ENTITY aboutTor.viewChangelog.label "Lihat Log Perubahan">
+<!ENTITY aboutTor.outOfDateTorOn.label "HOWEVER, this browser is out of date.">
+<!ENTITY aboutTor.outOfDateTorOff.label "ALSO, this browser is out of date.">
+<!ENTITY aboutTor.outOfDate2.label "Click on the onion and then choose Download Tor Browser Bundle Update.">
 
-<!ENTITY aboutTor.ready.label "Menjelajahlah. Secara Persendirian.">
-<!ENTITY aboutTor.ready2.label "Anda kini bersedia menikmati pengalaman melayari Internet secara persendirian.">
-<!ENTITY aboutTor.failure.label "Sesuatu telah berlaku!">
-<!ENTITY aboutTor.failure2.label "Tor tidak berfungsi ke atas pelayar ini.">
+<!ENTITY aboutTor.check.label "Test Tor Network Settings">
 
-<!ENTITY aboutTor.search.label "Gelintar dengan DuckDuckGo">
-<!ENTITY aboutTor.searchDDGPost.link "https://duckduckgo.com">
+<!ENTITY aboutTor.success.label "Congratulations!">
+<!ENTITY aboutTor.success2.label "This browser is configured to use Tor.">
+<!ENTITY aboutTor.success3.label "You are now free to browse the Internet anonymously.">
+<!ENTITY aboutTor.failure.label "Something Went Wrong!">
+<!ENTITY aboutTor.failure2.label "Tor is not working in this browser.">
+<!ENTITY aboutTor.failure3prefix.label "For assistance, please contact ">
+<!ENTITY aboutTor.failure3Link "help at rt.torproject.org">
+<!ENTITY aboutTor.failure3suffix.label ".">
 
-<!ENTITY aboutTor.torbrowser_user_manual_questions.label "Ada Pertanyaan?">
-<!ENTITY aboutTor.torbrowser_user_manual_link.label "Periksa Panduan Pelayar Tor kami »">
-<!-- The next two entities are used within the browser's Help menu. -->
-<!ENTITY aboutTor.torbrowser_user_manual.accesskey "M">
-<!ENTITY aboutTor.torbrowser_user_manual.label "Panduan Pelayar Tor">
+<!ENTITY aboutTor.search.label "Search">
+<!ENTITY aboutTor.searchSPPost.link "https://startpage.com/do/search">
+<!ENTITY aboutTor.searchDDGPost.link "https://duckduckgo.com/html/">
 
-<!ENTITY aboutTor.tor_mission.label "Projek Tor ialah organisasi bukan-berasaskan-keuntungan US 501(c)(3) yang melindungi hak-hak kemanusian dan kebebasan dengan mencipta dan menghasilkan teknologi keawanamaan dan kerahsiaan bebas dan bersumber-terbuka, menyokong ketersediaan dan penggunaan tanpa-had, dan melanjutkan kesefahaman saintifik dan popular mereka.">
-<!ENTITY aboutTor.getInvolved.label "Sertai »">
-<!ENTITY aboutTor.getInvolved.link "https://www.torproject.org/getinvolved/volunteer.html.en">
+<!ENTITY aboutTor.torInfo1.label "Additional Info:">
+<!ENTITY aboutTor.torInfo2.label "Country & IP Address:">
+<!ENTITY aboutTor.torInfo3.label "Exit Node:">
+<!ENTITY aboutTor.torInfo4.label "This server does not log any information about visitors.">
+<!ENTITY aboutTor.whatnextQuestion.label "What Next?">
+<!ENTITY aboutTor.whatnextAnswer.label "Tor is NOT all you need to browse anonymously! You may need to change some of your browsing habits to ensure your identity stays safe.">
+<!ENTITY aboutTor.whatnext.label "Tips On Staying Anonymous »">
+<!ENTITY aboutTor.whatnext.link "https://www.torproject.org/download/download.html.en#warning">
+<!ENTITY aboutTor.helpInfo1.label "You Can Help!">
+<!ENTITY aboutTor.helpInfo2.label "There are many ways you can help make the Tor Network faster and stronger:">
+<!ENTITY aboutTor.helpInfo3.label "Run a Tor Relay Node »">
+<!ENTITY aboutTor.helpInfo3.link "https://www.torproject.org/docs/tor-doc-relay.html.en">
+<!ENTITY aboutTor.helpInfo4.label "Volunteer Your Services »">
+<!ENTITY aboutTor.helpInfo4.link "https://www.torproject.org/getinvolved/volunteer.html.en">
+<!ENTITY aboutTor.helpInfo5.label "Make a Donation »">
+<!ENTITY aboutTor.helpInfo5.link "https://www.torproject.org/donate/donate.html.en">
 
-<!ENTITY aboutTor.newsletter.tagline "Dapatkan berita terkini Tor yang terus ke dalam kotak mel anda.">
-<!ENTITY aboutTor.newsletter.link_text "Daftar untuk dapatkan Berita Tor.">
-<!ENTITY aboutTor.donationBanner.line2e "Pastika Tor kekal teguh.">
-<!ENTITY aboutTor.donationBanner.buttonA "Dermalah Sekarang">
+<!ENTITY aboutTor.footer.label "The Tor Project is a US 501(c)(3) non-profit dedicated to the research, development, and education of online anonymity and privacy.">
+<!ENTITY aboutTor.learnMore.label "Learn more about The Tor Project »">
+<!ENTITY aboutTor.learnMore.link "https://www.torproject.org/about/overview.html.en">
diff --git a/chrome/locale/ms/brand.dtd b/chrome/locale/ms/brand.dtd
index d6f3c62d..47d33862 100644
--- a/chrome/locale/ms/brand.dtd
+++ b/chrome/locale/ms/brand.dtd
@@ -2,14 +2,7 @@
    - 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/. -->
 
-<!ENTITY  brandShorterName      "Pelayar Tor">
-<!ENTITY  brandShortName        "Pelayar Tor">
-<!ENTITY  brandFullName         "Pelayar Tor">
-<!ENTITY  vendorShortName       "Projek Tor">
-<!ENTITY  trademarkInfo.part1   "'Tor' dan 'Logo Onion' adalah cap dagangan berdaftar bagi Projek Tor, Inc.">
-
-<!-- The following strings are for bug #10280's UI. We place them here for our translators -->
-<!ENTITY plugins.installed.find "Klik untuk muat pemalam sistem terpasang">
-<!ENTITY plugins.installed.enable "Benarkan pemalam">
-<!ENTITY plugins.installed.disable "Lumpuhkan pemalam">
-<!ENTITY plugins.installed.disable.tip "Klik untuk elak memuatkan pemalam sistem">
+<!ENTITY  brandShortName        "Tor Browser">
+<!ENTITY  brandFullName         "Tor Browser">
+<!ENTITY  vendorShortName       "Tor Project">
+<!ENTITY  trademarkInfo.part1   "'Tor' and the 'Onion Logo' are registered trademarks of the Tor Project, Inc.">
diff --git a/chrome/locale/ms/brand.properties b/chrome/locale/ms/brand.properties
index 5adee627..f63def38 100644
--- a/chrome/locale/ms/brand.properties
+++ b/chrome/locale/ms/brand.properties
@@ -2,15 +2,14 @@
 # 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/.
 
-brandShorterName=Pelayar Tor
-brandShortName=Pelayar Tor
-brandFullName=Pelayar Tor
-vendorShortName=Projek Tor
+brandShortName=Tor Browser
+brandFullName=Tor Browser
+vendorShortName=Tor Project
 
-homePageSingleStartMain=Firefox Start, halaman utama yang pantas dan dilengkapi dengan gelintar terbina-dalam.
-homePageImport=Import halaman utama anda dari %S
+homePageSingleStartMain=Firefox Start, a fast home page with built-in search
+homePageImport=Import your home page from %S
 
-homePageMigrationPageTitle=Pemilihan Laman Utama
-homePageMigrationDescription=Sila pilih halaman utama yang ingin digunakan:
+homePageMigrationPageTitle=Home Page Selection
+homePageMigrationDescription=Please select the home page you wish to use:
 
-syncBrandShortName=Segerak
+syncBrandShortName=Sync
diff --git a/chrome/locale/ms/browserOnboarding.properties b/chrome/locale/ms/browserOnboarding.properties
deleted file mode 100644
index 2a304198..00000000
--- a/chrome/locale/ms/browserOnboarding.properties
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright (c) 2019, The Tor Project, Inc.
-# See LICENSE for licensing information.
-# vim: set sw=2 sts=2 ts=8 et:
-
-onboarding.tour-tor-welcome=Selamat Datang
-onboarding.tour-tor-welcome.title=Anda sedia.
-onboarding.tour-tor-welcome.description=Pelayar Tor menawatkan piawaian kerahsiaan dan keselamatan tertinggi ketika melayari sesawang. Anda kini dilindungi dari penjejakan, pemantauan, dan penapisan. Panduan pantas ini akan membantu anda bagaimana hendak menggunakannya.
-onboarding.tour-tor-welcome.next-button=Pergi ke Privasi
-
-onboarding.tour-tor-privacy=Privasi
-onboarding.tour-tor-privacy.title=Endah penjejak dan pengintip.
-onboarding.tour-tor-privacy.description=Pelayar Tor mengasingkan kuki dan memadam sejarah pelayar anda selepas sesi tamat. Pengubahsuaian ini memastikan kerahsiaan dan keselamatan pelayar anda dilindungi. Klik 'Rangkaian Tor' untuk mengetahui bagaiaman kami melindungi anda pada tahap rangkaian.
-onboarding.tour-tor-privacy.button=Pergi ke Rangkaian Tor
-
-onboarding.tour-tor-network=Rangkaian Tor
-onboarding.tour-tor-network.title=Menjelajah dengan rangkaian tidak terpusat.
-onboarding.tour-tor-network.description=Pelayar Tor menghubungkan anda dengan rangkaian Tor yang diurus oleh beribu-ribu para sukarelawan di seluruh dunia. Tidak seperti VPN, tiada kegagalan atau entiti terpusat yang anda kena percaya untuk menikmati internet secara persendirian.
-onboarding.tour-tor-network.description-para2=NEW: Tor Network Settings, including the ability to request bridges where Tor is blocked, can now be found in Preferences.
-onboarding.tour-tor-network.action-button=Laras Tetapan Rangkaian Tor anda
-onboarding.tour-tor-network.button=Pergi ke Paparan Litar
-
-onboarding.tour-tor-circuit-display=Paparan Litar
-onboarding.tour-tor-circuit-display.title=Lihat laluan anda.
-onboarding.tour-tor-circuit-display.description=Bagi setiap domain yang anda lawati, trafik anda disampaikan dan disulitkan dalam litar merentasi tiga geganti Tor mengelilingi dunia. Tiada laman sesawang mengetahui lokasi anda bersambung. Anda boleh pohon satu litar baharu dengan mengklik 'Litar Baharu untuk Laman ini' pada Paparan Litar kami.
-onboarding.tour-tor-circuit-display.button=Lihat Laluan Saya
-onboarding.tour-tor-circuit-display.next-button=Pergi ke Keselamatan
-
-onboarding.tour-tor-security=Keselamatan
-onboarding.tour-tor-security.title=Pilih pengalaman yang dikehendaki.
-onboarding.tour-tor-security.description=Kami juga menyediakan tetapan tambahan untuk menambahbaik keselamatan pelayar anda. Tetapan Keselamatan kami membolehkan anda sekat unsur-unsur yang boleh digunakan untuk menyerang komputer anda. Klik di bawah untuk melihat apakah perbezaan pilihan-pilihan tawarkan.
-onboarding.tour-tor-security.description-suffix=Perhatian: Secara lalai, NoScript dan HTTPS Everywhere tidak di sertakan dalam palang alat, tetapi anda boleh suaikan palang alat untuk menambahnya.
-onboarding.tour-tor-security-level.button=Lihat Tahap Keselamatan Anda
-onboarding.tour-tor-security-level.next-button=Pergi ke Peuta Pengalaman
-
-onboarding.tour-tor-expect-differences=Petua Pengalaman.
-onboarding.tour-tor-expect-differences.title=Jangkakan beberapa perbezaan.
-onboarding.tour-tor-expect-differences.description=Dengan semua fitur keselamatan dan privasi yang disediakan oleh Tor, pengalaman anda ketika melayari internet menjadi sedikit berbeza. Menjadi lebih perlahan berbanding sebelum ini dan juga bergantung pada tahap keselamatan yang anda tetapkan, sesetengah unsur-unsur mungkin tidak berfungsi atau dimuatkan. Anda juga akan ditanya sama ada manusia dan bukan robot.
-onboarding.tour-tor-expect-differences.button=Lihat FAQ
-onboarding.tour-tor-expect-differences.next-button=Pergi ke Perkhidmatan Onion
-
-onboarding.tour-tor-onion-services=Perkhidmatan Onion
-onboarding.tour-tor-onion-services.title=Mahu lebih dilindungi.
-onboarding.tour-tor-onion-services.description=Perkhidmatan Onion merupakan laman-laman berakhir dengan .onion yang menyediakan perlindungan tambahan kepada para penerbit dan pelawat, termasuklah perlindungan terhadap tapisan. Perkhidmatan Onion membolehkan sesiapa sahaja menyediakan kandungan dan perkhidmatan secara awanama. Klik di bawah untuk melawati laman onion DuckDuckGo.
-onboarding.tour-tor-onion-services.button=Lawati Onion
-onboarding.tour-tor-onion-services.next-button=Selesai
-
-onboarding.overlay-icon-tooltip-updated2=Lihat yang terbaharu\ndi dalam %S
-onboarding.tour-tor-update.prefix-new=Baharu
-onboarding.tour-tor-update.prefix-updated=Dikemaskini
-
-onboarding.tour-tor-toolbar=Palang Alat
-onboarding.tour-tor-toolbar-update-9.0.title=Selamat Tinggal Butang Onion.
-onboarding.tour-tor-toolbar-update-9.0.description=We want your experience using Tor to be fully integrated within Tor Browser.
-onboarding.tour-tor-toolbar-update-9.0.description-para2=That's why now, rather than using the onion button, you can see your Tor Circuit via the [i] in the URL bar and request a New Identity using the toolbar button or the [≡] menu.
-onboarding.tour-tor-toolbar-update-9.0.button=How to Request a New Identity
-onboarding.tour-tor-toolbar-update-9.0.next-button=Pergi ke Rangkaian Tor
-
-# Circuit Display onboarding.
-onboarding.tor-circuit-display.next=Seterusnya
-onboarding.tor-circuit-display.done=Selesai
-onboarding.tor-circuit-display.one-of-three=1 dari 3
-onboarding.tor-circuit-display.two-of-three=2 dari 3
-onboarding.tor-circuit-display.three-of-three=3 dari 3
-
-onboarding.tor-circuit-display.intro.title=Bagaimanakah litar-litar ini berfungsi?
-onboarding.tor-circuit-display.intro.msg=Litar-litar diperbuat daripada geganti-geganti terumpuk secara rawak, yang merupakan komputer-komputer di seluruh dunia yang dikonfigur khas untuk memajukan trafik Tor. Litar-litar membolehkan anda melayari Internet secara persendirian yang dihubungkan dengan perkhidmatan onion.
-
-onboarding.tor-circuit-display.diagram.title=Paparan Litar
-onboarding.tor-circuit-display.diagram.msg=Rajah ini menunjukkan geganti-geganti yang terlibat dengan litar bagi laman sesawang ini. Untuk menghindari pemautan aktiviti merentasi laman-laman yang berbeza, setiap laman sesawang memperoleh satu litar yang berlainan.
-
-onboarding.tor-circuit-display.new-circuit.title=Anda perlukan satu litar baharu?
-onboarding.tor-circuit-display.new-circuit.msg=Jika anda masih tidak berjaya bersambung dengan laman sesawang yang ingin dilawati atau laman tidak dimuatkan dengan betul, anda boleh guna butang ini untuk memuatkan semula laman tersebut dengan satu litar baharu.
diff --git a/chrome/locale/ms/torbutton.dtd b/chrome/locale/ms/torbutton.dtd
index 8a63b220..fa587065 100644
--- a/chrome/locale/ms/torbutton.dtd
+++ b/chrome/locale/ms/torbutton.dtd
@@ -1,52 +1,19 @@
-<!ENTITY torbutton.context_menu.new_identity "Identiti Baharu">
+<!ENTITY torbutton.context_menu.new_identity "New Identity">
 <!ENTITY torbutton.context_menu.new_identity_key "I">
-<!ENTITY torbutton.context_menu.new_circuit "Litar Tor baharu untuk Laman ini">
-<!ENTITY torbutton.context_menu.new_circuit_key "C">
-<!ENTITY torbutton.context_menu.networksettings "Tetapan Rangkaian Tor...">
-<!ENTITY torbutton.context_menu.networksettings.key "N">
-<!ENTITY torbutton.context_menu.downloadUpdate "Periksa untuk dapatkan Kemaskini Pelayar Tor...">
+<!ENTITY torbutton.context_menu.networksettings "Open Network Settings…">
+<!ENTITY torbutton.context_menu.downloadUpdate "Download Tor Browser Bundle Update...">
 <!ENTITY torbutton.context_menu.downloadUpdate.key "U">
-<!ENTITY torbutton.context_menu.cookieProtections "Perlindungan Kuki...">
+<!ENTITY torbutton.context_menu.cookieProtections "Cookie Protections">
 <!ENTITY torbutton.context_menu.cookieProtections.key "C">
-<!ENTITY torbutton.button.tooltip "Klik untuk mengawalkan Torbutton">
-<!ENTITY torbutton.prefs.security_settings "Tetapan Keselamatan Pelayar Tor">
-<!ENTITY torbutton.cookiedialog.title "Urus Perlindungan Kuki">
-<!ENTITY torbutton.cookiedialog.lockCol "Dilindungi">
-<!ENTITY torbutton.cookiedialog.domainCol "Hos">
-<!ENTITY torbutton.cookiedialog.nameCol "Nama">
-<!ENTITY torbutton.cookiedialog.pathCol "Laluan">
-<!ENTITY torbutton.cookiedialog.protectCookie "Lindung Kuki">
-<!ENTITY torbutton.cookiedialog.removeCookie "Buang Kuki">
-<!ENTITY torbutton.cookiedialog.unprotectCookie "Kuki Tidak Dilindungi">
-<!ENTITY torbutton.cookiedialog.removeAllBut "Buang Semua Kecuali Dilindungi">
-<!ENTITY torbutton.cookiedialog.saveAllCookies "Lindungi Kuki Baharu">
-<!ENTITY torbutton.cookiedialog.doNotSaveAllCookies "Jangan Lindungi Kuki Baharu">
-<!ENTITY torbutton.prefs.sec_caption "Tahap Keselamatan">
-<!ENTITY torbutton.prefs.sec_caption_tooltip "Pelaras Keselamatan membolehkan anda lumpuhkan beberapa fitur pelayar yang mana ia menjadikan pelayar anda mudah terdedah dengan serangan penggodaman.">
-<!ENTITY torbutton.prefs.sec_standard_label "Piawai">
-<!ENTITY torbutton.prefs.sec_standard_description "Semua Pelayar Tor dan fitur laman sesawang telah dibenarkan.">
-<!ENTITY torbutton.prefs.sec_safer_label "Lebih Selamat">
-<!ENTITY torbutton.prefs.sec_safer_description "Fitur-fitur laman sesawang yang dilumpuhkan biasanya merbahaya, boleh menyebabkan beberapa laman kehilangan kefungsiannya.">
-<!ENTITY torbutton.prefs.sec_safer_list_label "Pada tetapan lebih selamat:">
-<!ENTITY torbutton.prefs.sec_safest_label "Paling Selamat">
-<!ENTITY torbutton.prefs.sec_safest_description "Hanya benarkan fitur-fitur laman sesawang yang diperlukan untuk laman-laman statik dan perkhidmatan asas. Perubahan ini dapat menjejaskan imej, media dan skrip.">
-<!ENTITY torbutton.prefs.sec_safest_list_label "Pada tetapan paling selamat:">
-<!ENTITY torbutton.prefs.sec_learn_more_label "Ketahui lebih lanjut">
-<!ENTITY torbutton.prefs.sec_js_on_https_sites_only "Skrip Java dilumpuhkan pada laman-laman bukan-HTTPS.">
-<!ENTITY torbutton.prefs.sec_js_disabled "Skrip Java dilumpuhkan secara lalai untuk semua laman.">
-<!ENTITY torbutton.prefs.sec_limit_typography "Sesetengah fon dan simbol matematik dilumpuhkan.">
-<!ENTITY torbutton.prefs.sec_limit_graphics_and_typography "Sesetengah fon, ikon, simbol matematik, dan imej dilumpuhkan.">
-<!ENTITY torbutton.prefs.sec_click_to_play_media "Audio dan video (media HTML5) dan WebGL adalah klik-untuk-dimainkan.">
-<!ENTITY torbutton.prefs.sec_custom_warning "Suai">
-<!ENTITY torbutton.prefs.sec_overview "Lumpuhkan beberapa fitur sesawang yang boleh digunakan untuk menyerang keselamatan dan keawanamaan anda.">
-<!ENTITY torbutton.prefs.sec_standard_tooltip "Tahap Keselamatan: Piawai">
-<!ENTITY torbutton.prefs.sec_safer_tooltip "Tahap Keselamatan : Lebih Selamat">
-<!ENTITY torbutton.prefs.sec_safest_tooltip "Tahap Keselamatan : Paling Selamat">
-<!ENTITY torbutton.prefs.sec_custom_summary "Keutamaan pelayar suai anda telah menyebabkan tetapan keselamatan luar jangkaan. Atas sebab keselamatan dan kerahsiaan, kami sarankan anda memilih salah satu daripada tahap keselamatan lalai yang ada.">
-<!ENTITY torbutton.prefs.sec_restore_defaults "Pulih Lalai">
-<!ENTITY torbutton.prefs.sec_advanced_security_settings "Tetapan Keselamatan Lanjutan...">
-<!ENTITY torbutton.circuit_display.title "Litar Tor">
-<!ENTITY torbutton.circuit_display.new_circuit "Lihat baharu untuk Laman ini">
-
-<!-- Onion services strings.  Strings are kept here for ease of translation. -->
-<!ENTITY torbutton.onionServices.authPrompt.tooltip "Buka bisikan pengesahihan klien perkhidmatan onion">
+<!ENTITY torbutton.button.tooltip "Click to initialize Torbutton">
+<!ENTITY torbutton.cookiedialog.title "Manage Cookie Protections">
+<!ENTITY torbutton.cookiedialog.lockCol "Protected">
+<!ENTITY torbutton.cookiedialog.domainCol "Host">
+<!ENTITY torbutton.cookiedialog.nameCol "Name">
+<!ENTITY torbutton.cookiedialog.pathCol "Path">
+<!ENTITY torbutton.cookiedialog.protectCookie "Protect Cookie">
+<!ENTITY torbutton.cookiedialog.removeCookie "Remove Cookie">
+<!ENTITY torbutton.cookiedialog.unprotectCookie "Unprotect Cookie">
+<!ENTITY torbutton.cookiedialog.removeAllBut "Remove All But Protected">
+<!ENTITY torbutton.cookiedialog.saveAllCookies "Protect New Cookies">
+<!ENTITY torbutton.cookiedialog.doNotSaveAllCookies "Do Not Protect New Cookies">
diff --git a/chrome/locale/ms/torbutton.properties b/chrome/locale/ms/torbutton.properties
index 50b40d37..ee5b1f95 100644
--- a/chrome/locale/ms/torbutton.properties
+++ b/chrome/locale/ms/torbutton.properties
@@ -1,70 +1,27 @@
-torbutton.circuit_display.internet = Internet
-torbutton.circuit_display.ip_unknown = IP tidak diketahui
-torbutton.circuit_display.onion_site = Laman Onion
-torbutton.circuit_display.this_browser = Pelayar ini
-torbutton.circuit_display.relay = Geganti
-torbutton.circuit_display.tor_bridge = Titi
-torbutton.circuit_display.unknown_country = Negara tidak diketahui
-torbutton.circuit_display.guard = Jaga
-torbutton.circuit_display.guard_note = Nod [Jaga] anda tidak berubah.
-torbutton.circuit_display.learn_more = Ketahui lebih lanjut
-torbutton.content_sizer.margin_tooltip = Pelayar Tor menambah jidar ini untuk memastikan tinggi dan lebar tetingkap anda kurang dikenali, dan seterusnya mengurangkan keupayaan orang lain menjejak anda ketika berada diatas-talian.
-torbutton.panel.tooltip.disabled = Klik untuk benarkan Tor
-torbutton.panel.tooltip.enabled = Klik untuk lumpuhkan Tor
-torbutton.panel.label.disabled = Tor Dilumpuhkan
-torbutton.panel.label.enabled = Tor Dibenarkan
-extensions.torbutton at torproject.org.description = Torbutton menyediakan butang bagi mengkonfigur tetapan Tor secara pantas dan mudah membersihkan data pelayaran persendirian anda.
-torbutton.popup.external.title = Muat turun jenis fail luar?
-torbutton.popup.external.app = Pelayar Tor tidak dapat paparkan fail ini. Anda perlu membukanya dengan aplikasi lain.\n\n
-torbutton.popup.external.note = Sesetengah jenis fail boleh menyebabkan aplikasi menyambung dengan Internet tanpa menggunakan Tor.\n\n
-torbutton.popup.external.suggest = Sebagai langkah berjaga-jaga, anda sepatutnya hanya membuka fail dimuat turun ketika berada diluar talian, atau guna CD Langsung Tor seperti Tails.\n
-torbutton.popup.launch = Muat turun fail
-torbutton.popup.cancel = Batal
-torbutton.popup.dontask = Muat turun fail secara automatik mulai sekarang
-torbutton.popup.no_newnym = Torbutton tidak dapat memberikan anda identiti baharu secara selamat. Ia tidak mempunyai capaian ke Port Kawalan Tor.\n\nAnda pasti masih menjalankan Berkas Pelayar Tor?
-torbutton.security_settings.menu.title = Tetapan Keselamatan
-torbutton.title.prompt_torbrowser = Maklumat Torbutton Penting
-torbutton.popup.prompt_torbrowser = Torbutton berfungsi secara berlainan sekarang: anda tidak boleh mematikannya lagi.\n\nKami membuat perubahan ini kerana ia tidak selamat menggunakan Torbutton dalam pelayar yang juga digunakan untuk pelayaran bukan-Tor. Terdapat terlalu banyak pepijat yang masih belum dibaiki.\n\nJika anda mahu menggunakan Firefox seperti biasa, anda patut menyahpasang Torbutton dan muat turun Berkas Pelayar Tor. Sifat kerahsiaan Pelayar Tor adalah lebih baik berbanding Firefox biasa, walaupun Firefox digandingkan dengan Torbutton.\n\nUntuk membuang Torbutton, pergi ke Alatan>Tambahan>Sambungan dan kemudian klik butang Buang bersebelahan Torbutton.
-torbutton.popup.short_torbrowser = Maklumat Torbutton Penting! \n\nTorbutton kini sentiasa dibenarkan. \n\nKlik pada Torbutton untuk maklumat lanjut.
+torbutton.panel.tooltip.disabled = Click to enable Tor
+torbutton.panel.tooltip.enabled = Click to disable Tor
+torbutton.panel.label.disabled = Tor Disabled
+torbutton.panel.label.enabled = Tor Enabled
+extensions.torbutton at torproject.org.description = Torbutton provides a button to configure Tor settings and quickly and easily clear private browsing data.
+torbutton.popup.external.title = Load external content?
+torbutton.popup.external.app = An external application is needed to handle:\n\n
+torbutton.popup.external.note = \n\nNOTE: External applications are NOT Tor safe by default and can unmask you!\n
+torbutton.popup.external.suggest = \nIf this file is untrusted, you should either save it to view while offline or in a VM,\nor consider using a transparent Tor proxy like Tails LiveCD or torsocks.\n
+torbutton.popup.launch = Launch application
+torbutton.popup.cancel = Cancel
+torbutton.popup.dontask = Always launch applications from now on
+torbutton.popup.prompted_language = To give you more privacy, Torbutton can request the English language version of web pages. This may cause web pages that you prefer to read in your native language to display in English instead.\n\nWould you like to request English language web pages for better privacy?
+torbutton.popup.no_newnym = Torbutton cannot safely give you a new identity. It does not have access to the Tor Control Port.\n\nAre you running Tor Browser Bundle?
+torbutton.title.prompt_torbrowser = Important Torbutton Information
+torbutton.popup.prompt_torbrowser = Torbutton works differently now: you can't turn it off any more.\n\nWe made this change because it isn't safe to use Torbutton in a browser that's also used for non-Tor browsing. There were too many bugs there that we couldn't fix any other way.\n\nIf you want to keep using Firefox normally, you should uninstall Torbutton and download Tor Browser Bundle. The privacy properties of Tor Browser are also superior to those of normal Firefox, even when Firefox is used with Torbutton.\n\nTo remove Torbutton, go to Tools->Addons->Extensions and then click the Remove button next to Torbutton.
+torbutton.popup.short_torbrowser = Important Torbutton Information!\n\nTorbutton is now always enabled.\n\nClick on the Torbutton for more information.
 
-torbutton.popup.confirm_plugins = Pemalam seperti Flash boleh mengganggu privasi dan keawanamaan anda.\n\nIa juga boleh melepasi Tor dan mendedahkan lokasi dan alamat IP semasa anda.\n\nAnda pasti anda mahu benarkan pemalam tersebut?\n\n
-torbutton.popup.never_ask_again = Jangan tanya saya lagi
-torbutton.popup.confirm_newnym = Pelayar Tor akan menutup semua tetingkap dan tab. Semua sesi laman sesawang akan hilang.\n\nMulakan semula Pelayar Tor sekarang untuk tetapkan semula identiti anda?\n\n
-
-torbutton.maximize_warning = Memaksimumkan Pelayar Tor dapat membenarkan laman sesawang tentukan saiz monitor anda, yang mana boleh digunakan untuk menjejak anda. Kami sarankan anda biarkan tetingkap Pelayar Tor dalam saiz lalai asalnya.
+torbutton.popup.confirm_plugins = Plugins such as Flash can harm your privacy and anonymity.\n\nThey can also bypass Tor to reveal your current location and IP address.\n\nAre you sure you want to enable plugins?\n\n
+torbutton.popup.never_ask_again = Never ask me again
 
 # Canvas permission prompt. Strings are kept here for ease of translation.
-canvas.siteprompt=Laman sesawang (%S) ini cuba mengekstrak data imej kanvas HTML5, yang boleh digunakan untuk mengecam komputer anda secara unik.\n\nPatutkah Pelayar Tor membenarkan laman sesawang ini mengekstrak data imej kanvas HTML5?
-canvas.notNow=Bukan Sekarang
-canvas.notNowAccessKey=N
-canvas.allow=Benarkan pada masa hadapan
+canvas.siteprompt=This website (%S) attempted to access image data on a canvas. Since canvas image data can be used to discover information about your computer, blank image data was returned this time.
+canvas.allow=Allow in the Future
 canvas.allowAccessKey=A
-canvas.never=Tidak sesekali untuk laman ini (disarankan)
+canvas.never=Never for This Site
 canvas.neverAccessKey=e
-
-# Profile/startup error messages. Strings are kept here for ease of translation.
-# LOCALIZATION NOTE: %S is the application name.
-profileProblemTitle=Masalah Profil %S
-profileReadOnly=Anda tidak boleh jalankan %S dari sistem fail baca-sahaja. Sila salin %S ke lokasi lain sebelum cuba gunakannya.
-profileReadOnlyMac=Anda tidak boleh jalankan %S dari sistem fail baca-sahaja. Sila salin %S ke folder Desktop atau Aplikasi anda sebelum cuba gunakannya.
-profileAccessDenied=%S tidak mempunyai keizinan untuk mencapai profil. Sila laras keizinan sistem fail anda dan cuba sekali lagi.
-profileMigrationFailed=Pemindahan profil sedia anda telah gagal.\nTetapan baharu akan digunakan.
-
-# "Downloading update" string for the hamburger menu (see #28885).
-# This string is kept here for ease of translation.
-# LOCALIZATION NOTE: %S is the application name.
-updateDownloadingPanelUILabel=Memuat turun %S kemaskini
-
-# .Onion Page Info prompt.  Strings are kept here for ease of translation.
-pageInfo_OnionEncryptionWithBitsAndProtocol=Sambungan Tersulit (Perkhidmatan Onion, %1$S, %2$S bit kunci, %3$S)
-pageInfo_OnionEncryption=Sambungan Tersulit (Perkhidmatan Onion)
-
-# Onion services strings.  Strings are kept here for ease of translation.
-# LOCALIZATION NOTE: %S will be replaced with the .onion address.
-onionServices.clientAuthMissing=Tor onion service missing client authorization
-onionServices.authPrompt.description=%S is requesting your private key.
-onionServices.authPrompt.keyPlaceholder=Enter your private key for this onion service
-onionServices.authPrompt.done=Selesai
-onionServices.authPrompt.doneAccessKey=d
-onionServices.authPrompt.invalidKey=Please enter a valid key (52 base32 characters or 44 base64 characters)
-onionServices.authPrompt.failedToSetKey=Unable to configure Tor with your key
diff --git a/chrome/locale/th/aboutDialog.dtd b/chrome/locale/th/aboutDialog.dtd
deleted file mode 100644
index 769e8174..00000000
--- a/chrome/locale/th/aboutDialog.dtd
+++ /dev/null
@@ -1,19 +0,0 @@
-<!ENTITY project.start           "&brandShortName; พัฒนาโดย">
-<!-- LOCALIZATION NOTE (project.tpoLink): This is a link title that links to https://www.torproject.org -->
-<!ENTITY project.tpoLink         "the &vendorShortName;">
-<!ENTITY project.end             "เป็นองค์กรไม่แสวงหาผลกำไรที่ทำงานเพื่อปกป้องความเป็นส่วนตัวและอิสรภาพของคุณทางออนไลน์">
-
-<!ENTITY help.start              "อยากช่วยเหลือหรือไม่">
-<!-- LOCALIZATION NOTE (help.donate): This is a link title that links to https://www.torproject.org/donate/donate.html.en -->
-<!ENTITY help.donateLink         "บริจาค">
-<!ENTITY help.or                 "หรือ">
-<!-- LOCALIZATION NOTE (help.getInvolvedLink): This is a link title that links to https://www.torproject.org/getinvolved/volunteer.html.en -->
-<!ENTITY help.getInvolvedLink    "เข้ามามีส่วนร่วม">
-<!ENTITY help.end                "!">
-<!-- LOCALIZATION NOTE (bottom.questions): This is a link title that links to https://www.torproject.org/docs/trademark-faq.html.en -->
-<!ENTITY bottomLinks.questions   "คำถาม?">
-<!-- LOCALIZATION NOTE (bottom.questions): This is a link title that links to https://www.torproject.org/getinvolved/relays -->
-<!ENTITY bottomLinks.grow        "ช่วยให้เครือข่ายทอร์เติบโต!">
-<!-- LOCALIZATION NOTE (bottom.questions): This is a link title that links to about:license -->
-<!ENTITY bottomLinks.license  "ข้อมูลลิขสิทธิ์">
-<!ENTITY tor.TrademarkStatement   "'Tor 'และ' Onion Logo 'เป็นเครื่องหมายการค้าจดทะเบียนของโครงการ Tor Project, Inc.">
diff --git a/chrome/locale/th/aboutTBUpdate.dtd b/chrome/locale/th/aboutTBUpdate.dtd
deleted file mode 100644
index c0d1746b..00000000
--- a/chrome/locale/th/aboutTBUpdate.dtd
+++ /dev/null
@@ -1,8 +0,0 @@
-<!ENTITY aboutTBUpdate.changelogTitle "บันทึกการเปลี่ยนแปลงของ Tor Browser">
-<!ENTITY aboutTBUpdate.updated "Tor Browser ถูกอัปเดตแล้ว">
-<!ENTITY aboutTBUpdate.linkPrefix "สำหรับข้อมูลที่อัปเดตที่สุดของการเผยแพร่ครั้งนี้">
-<!ENTITY aboutTBUpdate.linkLabel  "ดูเว็บไซต์ของเรา">
-<!ENTITY aboutTBUpdate.linkSuffix ".">
-<!ENTITY aboutTBUpdate.version "รุ่น">
-<!ENTITY aboutTBUpdate.releaseDate "วันที่เผยแพร่">
-<!ENTITY aboutTBUpdate.releaseNotes "หมายเหตุการเผยแพร่">
diff --git a/chrome/locale/th/aboutTor.dtd b/chrome/locale/th/aboutTor.dtd
index 071ec960..9f14022b 100644
--- a/chrome/locale/th/aboutTor.dtd
+++ b/chrome/locale/th/aboutTor.dtd
@@ -1,32 +1,47 @@
 <!--
-   - Copyright (c) 2019, The Tor Project, Inc.
+   - Copyright (c) 2014, The Tor Project, Inc.
    - See LICENSE for licensing information.
    - vim: set sw=2 sts=2 ts=8 et syntax=xml:
   -->
 
-<!ENTITY aboutTor.title "เกี่ยวกับ Tor">
+<!ENTITY aboutTor.title "About Tor">
 
-<!ENTITY aboutTor.viewChangelog.label "ดูบันทึกการเปลี่ยนแปลง">
+<!ENTITY aboutTor.outOfDateTorOn.label "HOWEVER, this browser is out of date.">
+<!ENTITY aboutTor.outOfDateTorOff.label "ALSO, this browser is out of date.">
+<!ENTITY aboutTor.outOfDate2.label "Click on the onion and then choose Download Tor Browser Bundle Update.">
 
-<!ENTITY aboutTor.ready.label "ค้นหาอย่างปลอดภัย">
-<!ENTITY aboutTor.ready2.label "คุณพร้อมแล้วสำหรับประสบการณ์การท่องอินเทอร์เน็ตที่ปลอดภัย">
-<!ENTITY aboutTor.failure.label "แย่แล้ว มีอะไรบางอย่างผิดพลาด">
-<!ENTITY aboutTor.failure2.label "Tor ทำงานกับเบราว์เซอร์นี้ไม่ได้">
+<!ENTITY aboutTor.check.label "Test Tor Network Settings">
 
-<!ENTITY aboutTor.search.label "ค้นหาโดย DuckDuckGo">
-<!ENTITY aboutTor.searchDDGPost.link "https://duckduckgo.com">
+<!ENTITY aboutTor.success.label "Congratulations!">
+<!ENTITY aboutTor.success2.label "This browser is configured to use Tor.">
+<!ENTITY aboutTor.success3.label "You are now free to browse the Internet anonymously.">
+<!ENTITY aboutTor.failure.label "Something Went Wrong!">
+<!ENTITY aboutTor.failure2.label "Tor is not working in this browser.">
+<!ENTITY aboutTor.failure3prefix.label "For assistance, please contact ">
+<!ENTITY aboutTor.failure3Link "help at rt.torproject.org">
+<!ENTITY aboutTor.failure3suffix.label ".">
 
-<!ENTITY aboutTor.torbrowser_user_manual_questions.label "มีคำถามไหม">
-<!ENTITY aboutTor.torbrowser_user_manual_link.label "ดูคู่มือผู้ใช้งาน Tor Browser">
-<!-- The next two entities are used within the browser's Help menu. -->
-<!ENTITY aboutTor.torbrowser_user_manual.accesskey "M">
-<!ENTITY aboutTor.torbrowser_user_manual.label "คู่มือผู้ใช้งาน Tor Browser">
+<!ENTITY aboutTor.search.label "Search">
+<!ENTITY aboutTor.searchSPPost.link "https://startpage.com/do/search">
+<!ENTITY aboutTor.searchDDGPost.link "https://duckduckgo.com/html/">
 
-<!ENTITY aboutTor.tor_mission.label "โปรเจค Tor เป็นขององค์กรไม่แสวงหาผลกำไรที่ทำงานเพื่อส่งเสริมสิทธิมนุษยชนและเสรีภาพ โดยการสร้างและบริการเทคโนโลยีที่ฟรี เน้นความเป็นนิรนามและโอเพนซอร์ส และส่งเสริมความเป็นส่วนตัว เพื่อสนับสนุนการใช้งานที่ไม่ต้องถูกจำกัด และสร้างความเข้าใจในสาธารณะให้กว้างขึ้น">
-<!ENTITY aboutTor.getInvolved.label "มาร่วมกับเรา">
-<!ENTITY aboutTor.getInvolved.link "https://www.torproject.org/getinvolved/volunteer.html.th">
+<!ENTITY aboutTor.torInfo1.label "Additional Info:">
+<!ENTITY aboutTor.torInfo2.label "Country & IP Address:">
+<!ENTITY aboutTor.torInfo3.label "Exit Node:">
+<!ENTITY aboutTor.torInfo4.label "This server does not log any information about visitors.">
+<!ENTITY aboutTor.whatnextQuestion.label "What Next?">
+<!ENTITY aboutTor.whatnextAnswer.label "Tor is NOT all you need to browse anonymously! You may need to change some of your browsing habits to ensure your identity stays safe.">
+<!ENTITY aboutTor.whatnext.label "Tips On Staying Anonymous »">
+<!ENTITY aboutTor.whatnext.link "https://www.torproject.org/download/download.html.en#warning">
+<!ENTITY aboutTor.helpInfo1.label "You Can Help!">
+<!ENTITY aboutTor.helpInfo2.label "There are many ways you can help make the Tor Network faster and stronger:">
+<!ENTITY aboutTor.helpInfo3.label "Run a Tor Relay Node »">
+<!ENTITY aboutTor.helpInfo3.link "https://www.torproject.org/docs/tor-doc-relay.html.en">
+<!ENTITY aboutTor.helpInfo4.label "Volunteer Your Services »">
+<!ENTITY aboutTor.helpInfo4.link "https://www.torproject.org/getinvolved/volunteer.html.en">
+<!ENTITY aboutTor.helpInfo5.label "Make a Donation »">
+<!ENTITY aboutTor.helpInfo5.link "https://www.torproject.org/donate/donate.html.en">
 
-<!ENTITY aboutTor.newsletter.tagline "ส่งตรงข่าวสารเกี่ยวกับ Tor ไปยังกล่องจดหมายของคุณ">
-<!ENTITY aboutTor.newsletter.link_text "สมัครรับข่าวสารเกี่ยวกับ Tor">
-<!ENTITY aboutTor.donationBanner.line2e "ทำให้ Tor เข็มแข็งขึ้น">
-<!ENTITY aboutTor.donationBanner.buttonA "ร่วมบริจาค">
+<!ENTITY aboutTor.footer.label "The Tor Project is a US 501(c)(3) non-profit dedicated to the research, development, and education of online anonymity and privacy.">
+<!ENTITY aboutTor.learnMore.label "Learn more about The Tor Project »">
+<!ENTITY aboutTor.learnMore.link "https://www.torproject.org/about/overview.html.en">
diff --git a/chrome/locale/th/brand.dtd b/chrome/locale/th/brand.dtd
index a3ef9518..47d33862 100644
--- a/chrome/locale/th/brand.dtd
+++ b/chrome/locale/th/brand.dtd
@@ -2,14 +2,7 @@
    - 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/. -->
 
-<!ENTITY  brandShorterName      "Tor Browser">
 <!ENTITY  brandShortName        "Tor Browser">
 <!ENTITY  brandFullName         "Tor Browser">
-<!ENTITY  vendorShortName       "โครงการ Tor">
-<!ENTITY  trademarkInfo.part1   "'Tor 'และ' Onion Logo 'เป็นเครื่องหมายการค้าจดทะเบียนของโครงการ Tor Project, Inc.">
-
-<!-- The following strings are for bug #10280's UI. We place them here for our translators -->
-<!ENTITY plugins.installed.find "คลิกเพื่อโหลดปลั๊กอินที่ถูกติดตั้งอยู่ในระบบ">
-<!ENTITY plugins.installed.enable "ปลั๊กอินที่เปิดใช้">
-<!ENTITY plugins.installed.disable "ปลั๊กอินที่ปิดใช้">
-<!ENTITY plugins.installed.disable.tip "คลิกเพื่อกันไม่ให้โหลดปลั๊กอินของระบบ">
+<!ENTITY  vendorShortName       "Tor Project">
+<!ENTITY  trademarkInfo.part1   "'Tor' and the 'Onion Logo' are registered trademarks of the Tor Project, Inc.">
diff --git a/chrome/locale/th/brand.properties b/chrome/locale/th/brand.properties
index ef2be578..f63def38 100644
--- a/chrome/locale/th/brand.properties
+++ b/chrome/locale/th/brand.properties
@@ -2,15 +2,14 @@
 # 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/.
 
-brandShorterName=Tor Browser
 brandShortName=Tor Browser
 brandFullName=Tor Browser
-vendorShortName=โครงการ Tor
+vendorShortName=Tor Project
 
-homePageSingleStartMain=Firefox Start หน้าเหย้าที่โหลดอย่างรวดเร็วและมีช่องค้นหาในตัว
-homePageImport=นำเข้าหน้าเหย้าของคุณจาก %S
+homePageSingleStartMain=Firefox Start, a fast home page with built-in search
+homePageImport=Import your home page from %S
 
-homePageMigrationPageTitle=เลือกหน้าเหย้า
-homePageMigrationDescription=กรุณาเลือกหน้าเหย้าที่คุณต้องการใช้:
+homePageMigrationPageTitle=Home Page Selection
+homePageMigrationDescription=Please select the home page you wish to use:
 
-syncBrandShortName=เชื่อมข้อมูล
+syncBrandShortName=Sync
diff --git a/chrome/locale/th/browserOnboarding.properties b/chrome/locale/th/browserOnboarding.properties
deleted file mode 100644
index 60df93d6..00000000
--- a/chrome/locale/th/browserOnboarding.properties
+++ /dev/null
@@ -1,72 +0,0 @@
-# Copyright (c) 2019, The Tor Project, Inc.
-# See LICENSE for licensing information.
-# vim: set sw=2 sts=2 ts=8 et:
-
-onboarding.tour-tor-welcome=ยินดีต้อนรับ
-onboarding.tour-tor-welcome.title=คุณพร้อมแล้ว
-onboarding.tour-tor-welcome.description=Tor Browser ให้บริการมาตรฐานสูงสุดเรื่องความเป็นส่วนตัวและความปลอดภัยขณะเข้าชมเว็บไซต์ ขณะนี้คุณได้รับการคุ้มครองจากการติดตาม การตรวจตรา และการปิดกั้นอินเทอร์เน็ต ชุดเตรียมความพร้อมจะบอกคุณว่า Tor Browserทำงานอย่างไร
-onboarding.tour-tor-welcome.next-button=ไปที่ความเป็นส่วนตัว
-
-onboarding.tour-tor-privacy=ความเป็นส่วนตัว
-onboarding.tour-tor-privacy.title=Snub trackers และ snoopers
-onboarding.tour-tor-privacy.description=Tor Browser แยกคุ้กกี้และลบประวัติการใช้เบราว์เซอร์หลังจบเซสซั่น การแก้ไขจะทำให้แน่ใจว่าความเป็นส่วนตัวและความปลอดภัยของคุณได้รับการคุ้มครองในเบราว์เซอร์ คลิก 'Tor Network' เพื่อเรียนรู้ว่าเราคุ้มครองคุณในระดับสูงกว่านี้อย่างไร
-onboarding.tour-tor-privacy.button=ไปที่เครือข่าย Tor
-
-onboarding.tour-tor-network=เครือข่าย Tor
-onboarding.tour-tor-network.title=นำทางเพื่อกระจายเครือข่าย
-onboarding.tour-tor-network.description=Tor Browser เชื่อมต่อคุณเข้ากับเครือข่าย Tor ที่ทำงานโดยอาสาสมัครกว่าพันคนทั่วโลก Tor Browser ต่างจาก VPN เพราะไม่มีใครสามารถระบุความผิดพลาดหรือหน่วยงานกลางได้ คุณต้องไว้วางใจเพื่อความเพลิดเพลินในการใช้อินเทอร์เน็ตอย่างเป็นส่วนตัว
-onboarding.tour-tor-network.description-para2=NEW: Tor Network Settings, including the ability to request bridges where Tor is blocked, can now be found in Preferences.
-onboarding.tour-tor-network.action-button=Adjust Your Tor Network Settings
-onboarding.tour-tor-network.button=ไปที่วงจรหน้าจอ
-
-onboarding.tour-tor-circuit-display=วงจรหน้าจอ
-onboarding.tour-tor-circuit-display.title=ดูพาทของคุณ
-onboarding.tour-tor-circuit-display.description=สำหรับทุกๆโดเมนที่คุณเยี่ยมชม ปริมาณการใช้งานของคุณถูกรีเลย์เข้ารหัสลับในวงจรระหว่างTor รีเลย์3แห่งทั่วโลก ไม่มีเว็บไซต์ใดๆที่สามารถรู้ได้ว่าคุณเชื่อมต่อจากที่ไหน คุณสามารถส่งคำร้องสร้างวงจรใหม่ได้ในคลิก วงจร Tor ใหม่สำหรับไซต์นี้ในวงจรหน้าจอ
-onboarding.tour-tor-circuit-display.button=ดูพาทของฉัน
-onboarding.tour-tor-circuit-display.next-button=ไปที่ความปลอดภัย
-
-onboarding.tour-tor-security=ความปลอดภัย
-onboarding.tour-tor-security.title=เลือกประสบการณ์ของคุณ
-onboarding.tour-tor-security.description=เราให้บริการการตั้งค่าเพิ่มเติมสำหรับคุณ ในการเพิ่มความปลอดภัยให้เบราว์เซอร์ของคุณ การตั้งค่าความปลอดภัยจะทำให้คุณสามารถปิดกั้นองค์ประกอบที่อาจโจมตีคอมพิวเตอร์ของคุณได้ คลิกด้านล่างเพื่อดูว่าตัวเลือกต่างๆทำอะไรได้บ้าง
-onboarding.tour-tor-security.description-suffix=หมายเหตุ โดยการตั้งค่าเริ่มต้นแล้ว NoScript และ HTTPS ในทุกที่ไม่ได้ถูกรวมเข้าในแถบเครื่องมือ แต่คุณสามารถกำหนดเองเพื่อเพิ่มในแถบเครื่องมือได้
-onboarding.tour-tor-security-level.button=ดูระดับความปลอดภัย
-onboarding.tour-tor-security-level.next-button=ไปยังเคล็ดลับประสบการณ์
-
-onboarding.tour-tor-expect-differences=เคล็ดลับประสบการณ์
-onboarding.tour-tor-expect-differences.title=คาดหวังบางอย่างที่แตกต่าง
-onboarding.tour-tor-expect-differences.description=ฟีเจอร์ด้านความปลอดภัยและความเป็นส่วนตัวต่างๆที่ให้บริการโดย Tor ประสบการณ์ของคุณขณะเรียกดูอินเทอร์เน็ตอาจแตกต่างออกไปบ้าง อาจช้าลง ขึ้นอยู่กับระดับความปลอดภัย องค์ประกอบบางอย่างอาจไม่โหลดหรือไม่ทำงาน อาจมีคำถามเพื่อพิสูจน์ว่าคุณคือมนุษย์และไม่ใช่หุ่นยนต์
-onboarding.tour-tor-expect-differences.button=ดูคำถามที่พบบ่อย
-onboarding.tour-tor-expect-differences.next-button=ไปยัง บริการOnion 
-
-onboarding.tour-tor-onion-services=บริการ Onion
-onboarding.tour-tor-onion-services.title=การป้องกันที่พิเศษ
-onboarding.tour-tor-onion-services.description=บริการ Onion คือไซต์ที่ลงท้ายด้วย.onion ที่ให้บริการการคุ้มครองพิเศษให้กับผู้เผยแพร่หรือผู้เข้าชม รวมไปถึงเพิ่มความคุ้มครองจากการปิดกั้นอินเทอร์เน็ต บริการ Onion อนุญาติทุกคนสามารถจัดหาเนื้อหาและบริการอย่างนิรนาม คลิกด้านล่างเพื่อชมDuckDuckGo ไซต์ onion
-onboarding.tour-tor-onion-services.button=เยียมชม Onion
-onboarding.tour-tor-onion-services.next-button=เสร็จสิ้น
-
-onboarding.overlay-icon-tooltip-updated2=ดูว่ามีอะไรใหม่\nใน %S
-onboarding.tour-tor-update.prefix-new=สร้างใหม่
-onboarding.tour-tor-update.prefix-updated=อัพเดต
-
-onboarding.tour-tor-toolbar=แถบเครื่องมือ
-onboarding.tour-tor-toolbar-update-9.0.title=Goodbye Onion Button.
-onboarding.tour-tor-toolbar-update-9.0.description=We want your experience using Tor to be fully integrated within Tor Browser.
-onboarding.tour-tor-toolbar-update-9.0.description-para2=That's why now, rather than using the onion button, you can see your Tor Circuit via the [i] in the URL bar and request a New Identity using the toolbar button or the [≡] menu.
-onboarding.tour-tor-toolbar-update-9.0.button=How to Request a New Identity
-onboarding.tour-tor-toolbar-update-9.0.next-button=ไปที่เครือข่าย Tor
-
-# Circuit Display onboarding.
-onboarding.tor-circuit-display.next=ต่อไป
-onboarding.tor-circuit-display.done=เสร็จสิ้น
-onboarding.tor-circuit-display.one-of-three=1 ใน 3
-onboarding.tor-circuit-display.two-of-three=2 ใน 3
-onboarding.tor-circuit-display.three-of-three=3 ใน 3
-
-onboarding.tor-circuit-display.intro.title=วงจรทำงานอย่างไร
-onboarding.tor-circuit-display.intro.msg=วงจรประกอบด้วยรีเลย์แบบสุ่มซึ่งคอมพิวเตอร์ทั่วโลกกำหนดค่าไว้เพื่อส่งต่อการรับส่งข้อมูล Tor วงจรช่วยให้คุณสามารถเรียกดูแบบและเชื่อมต่อกับบริการ Onion ได้อย่างส่วนตัว
-
-onboarding.tor-circuit-display.diagram.title=วงจรหน้าจอ
-onboarding.tor-circuit-display.diagram.msg=แผนภาพนี้แสดงรีเลย์ที่ประกอบเป็นวงจรสำหรับเว็บไซต์นี้ เพื่อป้องกันการเชื่อมโยงกิจกรรมข้ามไซต์ต่าง ๆ แต่ละเว็บไซต์จะมีวงจรที่แตกต่างกัน
-
-onboarding.tor-circuit-display.new-circuit.title=คุณต้องการวงจรใหม่หรือไม่
-onboarding.tor-circuit-display.new-circuit.msg=หากคุณไม่สามารถเชื่อมต่อกับเว็บไซต์ที่คุณพยายามเข้าชมหรือมีปัญหาในการโหลด คุณสามารถใช้ปุ่มนี้เพื่อโหลดไซต์ใหม่ด้วยวงจรใหม่
diff --git a/chrome/locale/th/torbutton.dtd b/chrome/locale/th/torbutton.dtd
index 1e16c404..e0da4be2 100644
--- a/chrome/locale/th/torbutton.dtd
+++ b/chrome/locale/th/torbutton.dtd
@@ -1,52 +1,19 @@
 <!ENTITY torbutton.context_menu.new_identity "สร้างตัวตนใหม่">
 <!ENTITY torbutton.context_menu.new_identity_key "I">
-<!ENTITY torbutton.context_menu.new_circuit "วงจร Tor ใหม่สำหรับไซต์นี้">
-<!ENTITY torbutton.context_menu.new_circuit_key "C">
-<!ENTITY torbutton.context_menu.networksettings "ตั้งค่าเครือข่าย Tor">
-<!ENTITY torbutton.context_menu.networksettings.key "N">
-<!ENTITY torbutton.context_menu.downloadUpdate "ตรวจสอบสถานะการปรับรุ่น Tor Browser">
-<!ENTITY torbutton.context_menu.downloadUpdate.key "U">
-<!ENTITY torbutton.context_menu.cookieProtections "การป้องกันคุกกี้">
+<!ENTITY torbutton.context_menu.networksettings "Open Network Settings…">
+<!ENTITY torbutton.context_menu.downloadUpdate "Download Tor Browser Bundle Update...">
+<!ENTITY torbutton.context_menu.downloadUpdate.key "A">
+<!ENTITY torbutton.context_menu.cookieProtections "Cookie Protections">
 <!ENTITY torbutton.context_menu.cookieProtections.key "C">
-<!ENTITY torbutton.button.tooltip "คลิกเพื่อเริ่มใช้ Torbutton">
-<!ENTITY torbutton.prefs.security_settings "ตั้งค่าความปลอดภัย Tor Browser">
-<!ENTITY torbutton.cookiedialog.title "จัดการป้องกัน Cookie">
-<!ENTITY torbutton.cookiedialog.lockCol "ถูกป้องกันอยู่">
-<!ENTITY torbutton.cookiedialog.domainCol "โฮสต์">
-<!ENTITY torbutton.cookiedialog.nameCol "ชื่อ">
-<!ENTITY torbutton.cookiedialog.pathCol "เส้นทาง">
-<!ENTITY torbutton.cookiedialog.protectCookie "การป้องกันคุกกี้">
-<!ENTITY torbutton.cookiedialog.removeCookie "นำคุกกี้ออก">
-<!ENTITY torbutton.cookiedialog.unprotectCookie "คุกกี้ที่ไม่ถูกป้องกัน">
-<!ENTITY torbutton.cookiedialog.removeAllBut "ลบทั้งหมดแต่ป้องกันเอาไว้">
-<!ENTITY torbutton.cookiedialog.saveAllCookies "ป้องกันคุกกี้ใหม่">
-<!ENTITY torbutton.cookiedialog.doNotSaveAllCookies "ไม่ต้องป้องกันคุกกี้ใหม่">
-<!ENTITY torbutton.prefs.sec_caption "ระดับความปลอดภัย">
-<!ENTITY torbutton.prefs.sec_caption_tooltip "สไลเดอร์สำหรับความปลอดภัยทำให้คุณปิดคุณสมบัติบางส่วนของเบราว์เซอร์ที่ทำให้บราวเซอร์ของคุณเสี่ยงต่อความพยายามที่จะแฮ็ค">
-<!ENTITY torbutton.prefs.sec_standard_label "มาตรฐาน">
-<!ENTITY torbutton.prefs.sec_standard_description "เปิดใช้งานคุณสมบัติของเบราว์เซอร์ Tor และเว็บไซต์ทั้งหมด">
-<!ENTITY torbutton.prefs.sec_safer_label "ปลอดภัยกว่า">
-<!ENTITY torbutton.prefs.sec_safer_description "ปิดคุณสมบัติเว็บไซต์มักจะมีความเสี่ยง ทำให้บางเว็บไซต์สูญเสียฟังก์ชันการใช้งาน ">
-<!ENTITY torbutton.prefs.sec_safer_list_label "การตั้งค่าที่ปลอดภัยกว่า">
-<!ENTITY torbutton.prefs.sec_safest_label "ปลอดภัยที่สุด">
-<!ENTITY torbutton.prefs.sec_safest_description "อนุญาตให้เปิดคุณสมบัติเว็บไซต์เท่าที่จำเป็นสำหรับทำให้เว็บไซต์เสถียรและทำงานพื้นฐานได้ ความเปลี่ยนแปลงเหล่านี้จะมีผลต่อรูปภาพ ข้อมูล และสคริปต์">
-<!ENTITY torbutton.prefs.sec_safest_list_label "การตั้งค่าที่ปลอดภัยที่สุด">
-<!ENTITY torbutton.prefs.sec_learn_more_label "เรียนรู้เพิ่มเติม">
-<!ENTITY torbutton.prefs.sec_js_on_https_sites_only "JavaScript ถูกปิดบนไซต์ที่ไม่ใช่ HTTPS">
-<!ENTITY torbutton.prefs.sec_js_disabled "JavaScript ถูกระงับโดยปริยายสำหรับทุกไซต์">
-<!ENTITY torbutton.prefs.sec_limit_typography "แบบอักษรและสัญลักษณ์ทางคณิตศาสตร์บางอย่างถูกปิดใช้งาน">
-<!ENTITY torbutton.prefs.sec_limit_graphics_and_typography "แบบอักษร ไอคอน สัญลักษณ์ทางคณิตศาสตร์ และรูปภาพบางอย่างถูกปิดใช้งาน ">
-<!ENTITY torbutton.prefs.sec_click_to_play_media "คลิกเพื่อเล่นเสียงและวิดีโอ (HTML 5 มีเดีย) และ WebGL ">
-<!ENTITY torbutton.prefs.sec_custom_warning "กำหนดเอง">
-<!ENTITY torbutton.prefs.sec_overview "ปิดใช้งานคุณลักษณะบางอย่างของ เว็บ ที่สามารถใช้เพื่อ การโจมตี ความปลอดภัย และ ความเป็นนิรนาม">
-<!ENTITY torbutton.prefs.sec_standard_tooltip "ระดับความปลอดภัย มาตรฐาน">
-<!ENTITY torbutton.prefs.sec_safer_tooltip "ระดับ ความปลอดภัย : ปลอดภัยยิ่งขึ้น">
-<!ENTITY torbutton.prefs.sec_safest_tooltip "ระดับ ความปลอดภัย : ปลอดภัยที่สุด">
-<!ENTITY torbutton.prefs.sec_custom_summary "การตั้งค่าเบราว์เซอร์ที่กำหนดเองของคุณส่งผลให้เกิดการตั้งค่าที่ไม่ความปลอดภัย เพื่อเหตุผลด้านความปลอดภัยและความเป็นส่วนตัวเรา ขอแนะนำให้คุณเลือกหนึ่งในระดับความปลอดภัยค่าเริ่มต้น">
-<!ENTITY torbutton.prefs.sec_restore_defaults "กลับสู่ค่ามาตรฐาน">
-<!ENTITY torbutton.prefs.sec_advanced_security_settings "การตั้งค่าความปลอดภัยชั้นสูง">
-<!ENTITY torbutton.circuit_display.title "การเชื่องโยง Tor ">
-<!ENTITY torbutton.circuit_display.new_circuit "แหล่งเชื่อมโยงข้อมูลใหม่สำหรับเว็บไซต์นี้">
-
-<!-- Onion services strings.  Strings are kept here for ease of translation. -->
-<!ENTITY torbutton.onionServices.authPrompt.tooltip "Open onion service client authentication prompt">
+<!ENTITY torbutton.button.tooltip "Click to initialize Torbutton">
+<!ENTITY torbutton.cookiedialog.title "Manage Cookie Protections">
+<!ENTITY torbutton.cookiedialog.lockCol "Protected">
+<!ENTITY torbutton.cookiedialog.domainCol "Host">
+<!ENTITY torbutton.cookiedialog.nameCol "Name">
+<!ENTITY torbutton.cookiedialog.pathCol "Path">
+<!ENTITY torbutton.cookiedialog.protectCookie "Protect Cookie">
+<!ENTITY torbutton.cookiedialog.removeCookie "Remove Cookie">
+<!ENTITY torbutton.cookiedialog.unprotectCookie "Unprotect Cookie">
+<!ENTITY torbutton.cookiedialog.removeAllBut "Remove All But Protected">
+<!ENTITY torbutton.cookiedialog.saveAllCookies "Protect New Cookies">
+<!ENTITY torbutton.cookiedialog.doNotSaveAllCookies "Do Not Protect New Cookies">
diff --git a/chrome/locale/th/torbutton.properties b/chrome/locale/th/torbutton.properties
index 44d26298..cea42065 100644
--- a/chrome/locale/th/torbutton.properties
+++ b/chrome/locale/th/torbutton.properties
@@ -1,70 +1,27 @@
-torbutton.circuit_display.internet = อินเทอร์เน็ต
-torbutton.circuit_display.ip_unknown = หมายเลข IP ที่ไม่รู้จัก
-torbutton.circuit_display.onion_site = ไซต์ Onion
-torbutton.circuit_display.this_browser = เบราว์เซอร์นี้
-torbutton.circuit_display.relay = รีเลย์
-torbutton.circuit_display.tor_bridge = สะพาน
-torbutton.circuit_display.unknown_country = ไม่ทราบประเทศ
-torbutton.circuit_display.guard = การ์ด
-torbutton.circuit_display.guard_note = [การ์ด] โหนดของคุณอาจไม่เปลี่ยนแปลง
-torbutton.circuit_display.learn_more = เรียนรู้เพิ่มเติม
-torbutton.content_sizer.margin_tooltip = Tor Browser เพิ่มระยะขอบนี้เพื่อทำให้ความกว้างและความสูงของหน้าต่างคุณโดดเด่นน้อยลง และลดความสามารถของบุคคลอื่นในการติดตามคุณทางออนไลน์
-torbutton.panel.tooltip.disabled = คลิกเพื่อเปิดใช้ Tor
-torbutton.panel.tooltip.enabled = คลิกเพื่อปิด Tor
-torbutton.panel.label.disabled = ปิดใช้ Tor อยู่
-torbutton.panel.label.enabled = เปิดใช้ Tor อยู่
-extensions.torbutton at torproject.org.description = Torbutton มีปุ่มให้ปรับแต่งการตั้งค่า Tor และล้างข้อมูลการดูเว็บส่วนบุคคลอย่างรวดเร็วและง่ายดาย
-torbutton.popup.external.title = ดาวน์โหลดไฟล์ภายนอก
-torbutton.popup.external.app = Tor Browser ไม่สามารถแสดงไฟล์นี้ คุณต้องเปิดมันในโปรแกรมอื่น\n\n
-torbutton.popup.external.note = ไฟล์บางชนิดอาจทำให้โปรแกรมเชื่อมต่อกับอินเทอร์เน็ตโดยไม่ผ่าน Tor\n\n
-torbutton.popup.external.suggest = เพื่อความปลอดภัย คุณควรเปิดไฟล์ขณะออฟไลน์หรือใช้ Tor Live CD เช่น Tails\n
-torbutton.popup.launch = ดาวน์โหลดไฟล์
+torbutton.panel.tooltip.disabled = Click to enable Tor
+torbutton.panel.tooltip.enabled = Click to disable Tor
+torbutton.panel.label.disabled = Tor Disabled
+torbutton.panel.label.enabled = Tor Enabled
+extensions.torbutton at torproject.org.description = Torbutton provides a button to configure Tor settings and quickly and easily clear private browsing data.
+torbutton.popup.external.title = Load external content?
+torbutton.popup.external.app = An external application is needed to handle:\n\n
+torbutton.popup.external.note = \n\nNOTE: External applications are NOT Tor safe by default and can unmask you!\n
+torbutton.popup.external.suggest = \nIf this file is untrusted, you should either save it to view while offline or in a VM,\nor consider using a transparent Tor proxy like Tails LiveCD or torsocks.\n
+torbutton.popup.launch = Launch application
 torbutton.popup.cancel = ยกเลิก
-torbutton.popup.dontask = ดาวน์โหลดแฟ้มโดยอัตโนมัติตั้งแต่บัดนี้เป็นต้นไป
-torbutton.popup.no_newnym = Torbutton ไม่สามารถให้อัตลักษณ์ใหม่กับคุณได้อย่างปลอดภัย มันไม่สามารถเข้าถึง Tor Control Port ได้\n\nคุณกำลังเปิดให้ Tor Browser Bundle ทำงานอยู่หรือไม่?
-torbutton.security_settings.menu.title = ตั้งค่าความปลอดภัย
-torbutton.title.prompt_torbrowser = ข้อมูล Torbutton ที่สำคัญ
-torbutton.popup.prompt_torbrowser = Torbutton ทำงานต่างกันในขณะนี้ คุณไม่สามารถปิดมันได้ต่อไป\n\nเราทำการเปลี่ยนแปลงนี้เพราะมันไม่ปลอดภัยที่จะใช้ Torbutton ในเบราว์เซอร์ที่ไม่ได้เปิดใช้ Tor browser ในขเวลาเดียวกัน มีจุดบกพร่องหลายจุดที่เราไม่สามารถแก้ไขได้โดยวิธีอื่น\n\nถ้าคุณต้องการใช้ Firefox ได้ตามปกติ คุณต้องยกเลิกการติดตั้ง Torbutton และดาวน์โหลดชุดขยายรวมของ Tor Browser ซึ่งคุณสมบัติความเป็นส่วนตัวขà
 ¸­à¸‡ Tor Browser เหนือกว่าคุณสมบัติของ Firefox ปกติ แม้ Firefox ถูกจะใช้ด้วย Torbutton\n\nหากต้องการลบ Torbutton ไปที่ เครื่องมือ->Addons->Extensions และคลิกปุ่มลบออกที่อยู่ข้าง Torbutton.
-torbutton.popup.short_torbrowser = ข้อมูลสำคัญจาก Torbutton\n\nตอนนี้ Torbutton ถูกเปิดใช้ตลอดเวลา\n\nคลิกที่ Torbutton เพื่อดูข้อมูลเพิ่มเติม
+torbutton.popup.dontask = Always launch applications from now on
+torbutton.popup.prompted_language = To give you more privacy, Torbutton can request the English language version of web pages. This may cause web pages that you prefer to read in your native language to display in English instead.\n\nWould you like to request English language web pages for better privacy?
+torbutton.popup.no_newnym = Torbutton cannot safely give you a new identity. It does not have access to the Tor Control Port.\n\nAre you running Tor Browser Bundle?
+torbutton.title.prompt_torbrowser = Important Torbutton Information
+torbutton.popup.prompt_torbrowser = Torbutton works differently now: you can't turn it off any more.\n\nWe made this change because it isn't safe to use Torbutton in a browser that's also used for non-Tor browsing. There were too many bugs there that we couldn't fix any other way.\n\nIf you want to keep using Firefox normally, you should uninstall Torbutton and download Tor Browser Bundle. The privacy properties of Tor Browser are also superior to those of normal Firefox, even when Firefox is used with Torbutton.\n\nTo remove Torbutton, go to Tools->Addons->Extensions and then click the Remove button next to Torbutton.
+torbutton.popup.short_torbrowser = Important Torbutton Information!\n\nTorbutton is now always enabled.\n\nClick on the Torbutton for more information.
 
-torbutton.popup.confirm_plugins = ปลั๊กอินอย่าง Flash สามารถทำให้ความเป็นส่วนตัวและความเป็นนิรนามของคุณเสียไป\n\nพวกมันสามารถตัดผ่านข้าม Tor ไป และเปิดเผยตำแหน่งที่ตั้งและหมายเลข IP ของคุณ\n\nคุณแน่ใจไหมว่าต้องการจะเปิดใช้ปลั๊กอิน?\n\n
-torbutton.popup.never_ask_again = ไม่ต้องถามฉันอีก
-torbutton.popup.confirm_newnym = Tor Browser จะปิดหน้าต่างและแท็บทั้งหมด เซสชันของเว็บไซต์ทั้งหมดจะสูญหาย\n\nเริ่มใช้งาน Tor Browser ใหม่ตอนนี้เพื่อรีเซตข้อมูลประจำตัว
-
-torbutton.maximize_warning = การขยาย Tor Browser อนุญาตให้เว็บไซต์สามารถระบุขนาดหน้าจอของคุณ ซึ่งอาจถูกใช้ในการติดตามคุณ เราแนะนำให้คุณใช้หน้าต่าง Tor Browser ขนาดตามค่าเริ่มต้น 
+torbutton.popup.confirm_plugins = Plugins such as Flash can harm your privacy and anonymity.\n\nThey can also bypass Tor to reveal your current location and IP address.\n\nAre you sure you want to enable plugins?\n\n
+torbutton.popup.never_ask_again = Never ask me again
 
 # Canvas permission prompt. Strings are kept here for ease of translation.
-canvas.siteprompt=เว็บไซต์นี้ (%S) พยายามสกัด ข้อมูลรูปภาพพื้นที่ทำงาน HTML5 ซึ่งอาจถูกใช้ระบุคอมพิวเตอร์ของคุณโดยเฉพาะ\n\nควรให้ Tor Browser อนุญาตเว็บไซต์นี้สกัดข้อมูลรูปภาพพื้นที่ทำงาน HTML5 หรือไม่
-canvas.notNow=ไม่ใช่ตอนนี้
-canvas.notNowAccessKey=N
-canvas.allow=อนุญาตในอนาคต
+canvas.siteprompt=This website (%S) attempted to access image data on a canvas. Since canvas image data can be used to discover information about your computer, blank image data was returned this time.
+canvas.allow=Allow in the Future
 canvas.allowAccessKey=A
-canvas.never=ไม่เลยสำหรับเว็บไซต์นี้ (แนะนำ)
+canvas.never=Never for This Site
 canvas.neverAccessKey=e
-
-# Profile/startup error messages. Strings are kept here for ease of translation.
-# LOCALIZATION NOTE: %S is the application name.
-profileProblemTitle=ปัญหาโปรไฟล์ %S
-profileReadOnly=คุณไม่สามารถเรียกใช้ %S จากระบบไฟล์แบบอ่านเท่านั้น กรุณาคัดลอก %S ไปยังที่ตั้งอื่นก่อนลองใช้มัน
-profileReadOnlyMac=คุณไม่สามารถเรียกใช้ %S จากระบบไฟล์แบบอ่านเท่านั้น กรุณาคัดลอก %S ไปยังเดสก์ท็อปหรือแอปพลิเคชันก่อนลองใช้มัน
-profileAccessDenied=%S ไม่ได้รับอนุญาตให้เข้าถึงโปรไฟล์ กรุณาแก้ไขการอนุญาตระบบไฟล์ของคุณและลองใหม่อีกครั้ง
-profileMigrationFailed=การย้ายโปรไฟล์ %S ที่มีอยู่แล้วของคุณล้มเหลว\nการตั้งค่าใหม่จะถูกใช้
-
-# "Downloading update" string for the hamburger menu (see #28885).
-# This string is kept here for ease of translation.
-# LOCALIZATION NOTE: %S is the application name.
-updateDownloadingPanelUILabel=กำลังดาวน์โหลดอัปเดต %S
-
-# .Onion Page Info prompt.  Strings are kept here for ease of translation.
-pageInfo_OnionEncryptionWithBitsAndProtocol=การเชื่อมต่อเข้ารหัสลับ (Onion Service, %1$S, %2$S bit keys, %3$S)
-pageInfo_OnionEncryption=การเชื่อมต่อเข้ารหัสลับ (Onion Service)
-
-# Onion services strings.  Strings are kept here for ease of translation.
-# LOCALIZATION NOTE: %S will be replaced with the .onion address.
-onionServices.clientAuthMissing=Tor onion service missing client authorization
-onionServices.authPrompt.description=%S is requesting your private key.
-onionServices.authPrompt.keyPlaceholder=Enter your private key for this onion service
-onionServices.authPrompt.done=เสร็จสิ้น
-onionServices.authPrompt.doneAccessKey=d
-onionServices.authPrompt.invalidKey=Please enter a valid key (52 base32 characters or 44 base64 characters)
-onionServices.authPrompt.failedToSetKey=Unable to configure Tor with your key
diff --git a/chrome/locale/tr/torbutton.properties b/chrome/locale/tr/torbutton.properties
index 3ca2519d..1d643491 100644
--- a/chrome/locale/tr/torbutton.properties
+++ b/chrome/locale/tr/torbutton.properties
@@ -24,7 +24,7 @@ torbutton.popup.dontask = Bundan sonra dosyalar otomatik indirilsin
 torbutton.popup.no_newnym = Torbutton size yeni bir güvenli kimlik sağlayamadı. Tor Denetim Kapısına giriş yapılamıyor.\n\nTor Browser Bundle uygulamasını çalıştırdığınızdan emin olun.
 torbutton.security_settings.menu.title = Güvenlik Düzeyi Ayarı
 torbutton.title.prompt_torbrowser = Önemli Torbutton Bilgisi
-torbutton.popup.prompt_torbrowser = Torbutton şimdi farklı çalışıyor: artık kapatamıyorsunuz.\n\nBu değişikliği yapmamızın nedeni Tor dışında kullanılan başka bir tarayıcıda Torbutton kullanmanın güvenli olmaması. Başka türlü çözemeyeceğimiz birçok sorun vardı.\n\nFirefox tarayıcısını normal olarak kullanmak istiyorsanız, Torbutton uygulamasını kaldırıp Tor Browser Bundle paketini indirebilirsiniz. Tor Browser kişisel gizliliği koruma özellikleri normal Firefox tarayıcısına, hatta Torbutton ile kullanılan Firefox ikilisine göre çok daha üstündür.\n\nTorbutton uygulamasını kaldırmak için, Araçlar->Eklentiler->Uzantılar bölümüne gidin ve Torbutton uygulamasının yanındaki Kaldır düğmesine tıklayın.
+torbutton.popup.prompt_torbrowser = Torbutton şimdi farklı çalışıyor: artık kapatamıyorsunuz.\n\nBu değişikliği yapmamızın nedeni Tor dışında kullanılan başka bir tarayıcıda Torbutton kullanmanın güvenli olmaması. Başka türlü çözemeyeceğimiz birçok sorun vardı.\n\nFirefox tarayıcısını normal olarak kullanmak istiyorsanız, Torbutton uygulamasını kaldırıp Tor Browser Bundle paketini indirebilirsiniz. Tor Browser kişisel gizliliği koruma özellikleri normal Firefox tarayıcısına, hatta Torbutton ile kullanılan Firefox ikilisine göre çok daha üstündür.\n\nTorbutton uygulamasını kaldırmak için, Araçlar->Eklentiler->Uzantılar bölümüne gidin ve Torbutton yazılımının yanındaki Kaldır düğmesine tıklayın.
 torbutton.popup.short_torbrowser = Önemli Torbutton Bilgisi!\n\nTorbutton artık kapatılamayacak şekilde etkinleştirildi.\n\nAyrıntılı bilgi almak için Torbutton üzerine tıklayın.
 
 torbutton.popup.confirm_plugins = Flash gibi eklentiler gizliliğinizi ve anonim kimliğinizi zedeleyebilir.\n\nBu eklentiler Tor uygulamasını atlatarak geçerli konum ve IP adresinizi ortaya çıkarabilir.\n\nBu eklentileri etkinleştirmek istediğinize emin misiniz?\n
diff --git a/components/cookie-jar-selector.js b/components/cookie-jar-selector.js
new file mode 100644
index 00000000..79a66e8a
--- /dev/null
+++ b/components/cookie-jar-selector.js
@@ -0,0 +1,460 @@
+// Bug 1506 P1: This component is currently only used to protect
+// user-selected cookies from deletion. Moreover, all the E4X code is
+// deprecated and needs to be replaced with JSON.
+
+/*************************************************************************
+ * Cookie Jar Selector (JavaScript XPCOM component)
+ * Enables selection of separate cookie jars for (more) anonymous browsing.
+ * Designed as a component of FoxTor, http://cups.cs.cmu.edu/foxtor/
+ * Copyright 2006, distributed under the same (open source) license as FoxTor
+ *
+ * Contributor(s):
+ *         Collin Jackson <mozilla at collinjackson.com>
+ *
+ *************************************************************************/
+
+// Module specific constants
+const kMODULE_NAME = "Cookie Jar Selector";
+const kMODULE_CONTRACTID = "@torproject.org/cookie-jar-selector;1";
+const kMODULE_CID = Components.ID("e6204253-b690-4159-bfe8-d4eedab6b3be");
+
+ChromeUtils.import("resource://torbutton/modules/default-prefs.js", {})
+  .ensureDefaultPrefs();
+
+const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
+
+function Cookie(number,name,value,isDomain,host,rawHost,HttpOnly,path,isSecure,isSession,
+                expires,isProtected) {
+  this.number = number;
+  this.name = name;
+  this.value = value;
+  this.isDomain = isDomain;
+  this.host = host;
+  this.rawHost = rawHost;
+  this.isHttpOnly = HttpOnly;
+  this.path = path;
+  this.isSecure = isSecure;
+  this.isSession = isSession;
+  this.expires = expires;
+  this.isProtected = isProtected;
+}
+
+function CookieJarSelector() {
+  this.logger = Cc["@torproject.org/torbutton-logger;1"]
+      .getService(Ci.nsISupports).wrappedJSObject;
+
+  this.logger.log(3, "Component Load 5: New CookieJarSelector " + kMODULE_CONTRACTID);
+
+  this.prefs = Services.prefs;
+
+  var getProfileFile = function(filename) {
+    var loc = "ProfD"; // profile directory
+    var file = Services.dirsvc
+      .get(loc, Ci.nsIFile)
+      .clone();
+    file.append(filename); 
+    return file;
+  };
+
+  this.clearCookies = function() {
+    try {
+        Services.cookies.removeAll();
+    } catch (e) {
+        this.logger.log(4, "Cookie clearing exception: " + e);
+    }
+  };
+
+  this._cookiesToJS = function(getSession) {
+    var cookieManager = Services.cookies;
+    var cookiesEnum = cookieManager.enumerator;
+    var cookiesAsJS = [];
+    var count = 0;
+    while (cookiesEnum.hasMoreElements()) {
+        var nextCookie = cookiesEnum.getNext().QueryInterface(Ci.nsICookie2);
+        var JSCookie = new Cookie(count++, nextCookie.name, nextCookie.value, nextCookie.isDomain, nextCookie.host,
+                   (nextCookie.host.charAt(0)==".") ? nextCookie.host.substring(1,nextCookie.host.length) : nextCookie.host,
+                   nextCookie.isHttpOnly, nextCookie.path, nextCookie.isSecure, nextCookie.isSession, nextCookie.expires,
+                   false);
+        // Save either session or non-session cookies this time around:
+        if (JSCookie.isSession && getSession ||
+                !JSCookie.isSession && !getSession)
+            cookiesAsJS.push(JSCookie);
+    }
+    return cookiesAsJS;
+  };
+
+  this._loadCookiesFromJS = function(cookiesAsJS) {
+        if (typeof(cookiesAsJS) == "undefined" || !cookiesAsJS)
+            return;
+
+        var cookieManager = Services.cookies;
+
+        for (var i = 0; i < cookiesAsJS.length; i++) {
+            var cookie = cookiesAsJS[i];
+            //this.logger.log(2, "Loading cookie: "+host+":"+cname+" until: "+expiry);
+            cookieManager.add(cookie.host, cookie.path, cookie.name, cookie.value,
+                              cookie.isSecure, cookie.isHttpOnly, cookie.isSession,
+                              cookie.expires);
+        }
+  };
+
+  this._cookiesToFile = function(name) {
+    var file = getProfileFile("cookies-" + name + ".json");
+    var foStream = Cc["@mozilla.org/network/file-output-stream;1"]
+          .createInstance(Ci.nsIFileOutputStream);
+    foStream.init(file, 0x02 | 0x08 | 0x20, 0o666, 0);
+    var data = JSON.stringify(this["cookiesobj-" + name]);
+    foStream.write(data, data.length);
+    foStream.close();
+  };
+
+  // Start1506
+  this._protectedCookiesToFile = function(name) {
+    var file = getProfileFile("protected-" + name + ".json");
+    var foStream = Cc["@mozilla.org/network/file-output-stream;1"]
+        .createInstance(Ci.nsIFileOutputStream);
+    foStream.init(file, 0x02 | 0x08 | 0x20, 0o666, 0);
+    var data = JSON.stringify(this["protected-" + name]);
+    foStream.write(data, data.length);
+    foStream.close();
+  };
+
+  this.addProtectedCookie = function(cookie) {
+    var name = "tor";
+    var cookies = this.getProtectedCookies(name);
+
+    if (typeof(cookies) == "undefined" || cookies == null
+            || cookies.length == 0)
+      cookies = [];
+
+    if (cookie.isSession) {
+      // session cookies get fucked up expiry. Give it 1yr if
+      // the user wants to save their session cookies
+      cookie.expires = Date.now()/1000 + 365*24*60*60;
+    }
+
+    cookies.push(cookie);
+    this["protected-" + name] = cookies;
+
+    if (!this.prefs.getBoolPref("browser.privatebrowsing.autostart")) {
+      // save protected cookies to file
+      this._protectedCookiesToFile(name);
+    } else {
+      try {
+        var file = getProfileFile("protected-" + name + ".json");
+        if (file.exists()) {
+          file.remove(false);
+        }
+      } catch(e) {
+        this.logger.log(5, "Can't remove "+name+" cookie file: "+e);
+      }
+    }
+  };
+
+  this.getProtectedCookies = function(name) {
+      var file = getProfileFile("protected-" + name + ".json");
+      if (!file.exists()) {
+        return this["protected-" + name];
+      }
+      var data = "";
+      var fstream = Cc["@mozilla.org/network/file-input-stream;1"]
+          .createInstance(Ci.nsIFileInputStream);
+      var sstream = Cc["@mozilla.org/scriptableinputstream;1"]
+          .createInstance(Ci.nsIScriptableInputStream);
+      fstream.init(file, -1, 0, 0);
+      sstream.init(fstream); 
+
+      var str = sstream.read(4096);
+      while (str.length > 0) {
+          data += str;
+          str = sstream.read(4096);
+      }
+
+      sstream.close();
+      fstream.close();
+      try {
+          var ret = JSON.parse(data);
+      } catch(e) { // file has been corrupted; XXX: handle error differently
+          this.logger.log(5, "Cookies corrupted: "+e);
+          try {
+              file.remove(false); //XXX: is it necessary to remove it ?
+              var ret = null;
+          } catch(e2) {
+              this.logger.log(5, "Can't remove file "+e);
+          }
+      }
+      return ret;
+  };
+
+  this.protectCookies = function(cookies) {
+    var name = "tor";
+    this._writeProtectCookies(cookies,name);
+    if (!this.prefs.getBoolPref("browser.privatebrowsing.autostart")) {
+      // save protected cookies to file
+      this._protectedCookiesToFile(name);
+    } else {
+      try {
+        var file = getProfileFile("protected-" + name + ".json");
+        if (file.exists()) {
+          file.remove(false);
+        }
+      } catch(e) {
+        this.logger.log(5, "Can't remove "+name+" cookie file: "+e);
+      }
+    }
+  };
+
+  this._writeProtectCookies = function(cookies, name) {
+    for (var i = 0; i < cookies.length; i++) {
+        if (cookies[i].isSession) {
+            // session cookies get fucked up expiry. Give it 1yr if
+            // the user wants to save their session cookies
+            cookies[i].expires = Date.now()/1000 + 365*24*60*60;
+        }
+        cookies[i].isProtected = true;
+    }
+    this["protected-" + name] = cookies;
+  };
+  // End1506
+
+  this._cookiesFromFile = function(name) {
+      var file = getProfileFile("cookies-" + name + ".json");
+      if (!file.exists())
+          return null;
+      var data = "";
+      var fstream = Cc["@mozilla.org/network/file-input-stream;1"]
+          .createInstance(Ci.nsIFileInputStream);
+      var sstream = Cc["@mozilla.org/scriptableinputstream;1"]
+          .createInstance(Ci.nsIScriptableInputStream);
+      fstream.init(file, -1, 0, 0);
+      sstream.init(fstream); 
+
+      var str = sstream.read(4096);
+      while (str.length > 0) {
+          data += str;
+          str = sstream.read(4096);
+      }
+
+      sstream.close();
+      fstream.close();
+      try {
+          var ret = JSON.parse(data);
+      } catch(e) { // file has been corrupted; XXX: handle error differently
+          this.logger.log(5, "Cookies corrupted: "+e);
+          try {
+              file.remove(false); //XXX: is it necessary to remove it ?
+              var ret = null;
+          } catch(e2) {
+              this.logger.log(5, "Can't remove file "+e);
+          }
+      }
+      return ret;
+  };
+
+  this.saveCookies = function(name) {
+    // transition removes old tor-style cookie file
+    try {
+        var oldCookieFile = getProfileFile("cookies-"+name+".xml");
+        if (oldCookieFile.exists()) {
+            oldCookieFile.remove(false);
+        }
+    } catch(e) {
+        this.logger.log(5, "Can't remove old "+name+" file "+e);
+    }
+
+    // save cookies to JS objects
+    this["session-cookiesobj-" + name] = this._cookiesToJS(true);
+    this["cookiesobj-" + name] = this._cookiesToJS(false);
+
+    if (!this.prefs.getBoolPref("browser.privatebrowsing.autostart")) {
+        // save cookies to file
+        this._cookiesToFile(name);
+    } else {
+        // Clear the old file
+        try {
+            var file = getProfileFile("cookies-" + name + ".json");
+            if (file.exists()) {
+                file.remove(false);
+            }
+        } catch(e) {
+            this.logger.log(5, "Can't remove "+name+" cookie file "+e);
+        }
+    }
+
+    // ok, everything's fine
+    this.logger.log(2, "Cookies saved");
+  };
+
+  // Start1506
+  this.clearUnprotectedCookies = function(name) {
+    try {
+      var protCookies = this.getProtectedCookies(name);
+      if (protCookies == null || typeof(protCookies) == "undefined"
+              || protCookies.length == 0) {
+        //file does not exist - no protected cookies. Clear them all.
+        this.logger.log(3, "No protected cookies. Clearing all cookies.");
+        this.clearCookies();
+        return;
+      }
+      var cookiemanager = Services.cookies;
+
+      var enumerator = cookiemanager.enumerator;
+      var count = 0;
+      var protcookie = false;
+
+      while (enumerator.hasMoreElements()) {
+        var nextCookie = enumerator.getNext();
+        if (!nextCookie) break;
+
+        nextCookie = nextCookie.QueryInterface(Ci.nsICookie);
+        for (var i = 0; i < protCookies.length; i++) {
+          protcookie = protcookie || (nextCookie.host == protCookies[i].host &&
+                                      nextCookie.name == protCookies[i].name &&
+                                      nextCookie.path == protCookies[i].path);
+        }
+
+        if (!protcookie) {
+          cookiemanager.remove(nextCookie.host,
+                             nextCookie.name,
+                             nextCookie.path, false);
+        } else {
+          this.logger.log(3, "Found protected cookie for "+nextCookie.host);
+        }
+        protcookie = false;
+      }
+      // Emit cookie-changed event. This instructs other components to clear their identifiers
+      // (Specifically DOM storage and safe browsing, but possibly others)
+      var obsSvc = Services.obs;
+      obsSvc.notifyObservers(this, "cookie-changed", "cleared");
+    } catch (e) {
+      this.logger.log(5, "Error deleting unprotected cookies: " + e);
+    }
+  };
+  // End1506
+
+  this.loadCookies = function(name, deleteSavedCookieJar) {
+    // remove cookies before loading old ones
+    this.clearCookies();
+
+    if (!this.prefs.getBoolPref("browser.privatebrowsing.autostart")) {
+        // load cookies from file
+        this["cookiesobj-" + name] = this._cookiesFromFile(name);
+    }
+
+    //delete file if needed
+    if (deleteSavedCookieJar) { 
+        try {
+            var file = getProfileFile("cookies-" + name + ".json");
+            if (file.exists())
+                file.remove(false);
+        } catch(e) {
+            this.logger.log(5, "Can't remove saved "+name+" file "+e);
+        }
+    }
+
+    // load cookies from JS objects
+    this._loadCookiesFromJS(this["cookiesobj-"+name]);
+    this._loadCookiesFromJS(this["session-cookiesobj-"+name]);
+
+    // XXX: send a profile-do-change event?
+
+    // ok, everything's fine
+    this.logger.log(2, "Cookies reloaded");
+  };
+
+  // This JSObject is exported directly to chrome
+  this.wrappedJSObject = this;
+
+  // This timer is done so that in the event of a crash, we at least
+  // have recent cookies in a jar to reload from.
+  var jarThis = this;
+  this.timerCallback = {
+    cookie_changed: false,
+
+    QueryInterface: ChromeUtils.generateQI(["nsITimer"]),
+    notify() {
+       // this refers to timerCallback object. use jarThis to reference
+       // CookieJarSelector object.
+       if(!this.cookie_changed) {
+           jarThis.logger.log(2, "Got timer update, but no cookie change.");
+           return;
+       }
+       jarThis.logger.log(3, "Got timer update. Saving changed cookies to jar.");
+
+       this.cookie_changed = false;
+
+       jarThis.saveCookies("tor");
+       jarThis.logger.log(2, "Timer done. Cookies saved");
+    }
+  };
+
+}
+
+const nsIClassInfo = Ci.nsIClassInfo;
+const nsIObserver = Ci.nsIObserver;
+const nsITimer = Ci.nsITimer;
+
+// Start1506: You may or may not care about this:
+CookieJarSelector.prototype =
+{
+  QueryInterface: ChromeUtils.generateQI(["nsIClassInfo", "nsIObserver"]),
+
+  wrappedJSObject: null,  // Initialized by constructor
+
+  // make this an nsIClassInfo object
+  flags: nsIClassInfo.DOM_OBJECT,
+
+  _xpcom_categories: [{category:"profile-after-change"}],
+  classID: kMODULE_CID,
+  contractID: kMODULE_CONTRACTID,
+  classDescription: "CookieJarSelector",
+
+  // method of nsIClassInfo
+  getInterfaces: function(count) {
+    var interfaceList = [nsIClassInfo];
+    count.value = interfaceList.length;
+    return interfaceList;
+  },
+
+  // method of nsIClassInfo
+  getHelperForLanguage: function(count) { return null; },
+
+  // method of nsIObserver
+  observe : function(aSubject, aTopic, aData) {
+       switch(aTopic) { 
+        case "cookie-changed":
+            var prefs = Services.prefs;
+            this.timerCallback.cookie_changed = true;
+
+            if (aData == "added"
+                && prefs.getBoolPref("extensions.torbutton.cookie_auto_protect")
+                && !prefs.getBoolPref("extensions.torbutton.tor_memory_jar")) {
+              this.addProtectedCookie(aSubject.QueryInterface(Ci.nsICookie2));// protect the new cookie!
+            }
+            break;
+        case "profile-after-change":
+            var obsSvc = Services.obs;
+            obsSvc.addObserver(this, "cookie-changed");
+            // after profil loading, initialize a timer to call timerCallback
+            // at a specified interval
+            this.timer.initWithCallback(this.timerCallback, 60 * 1000, nsITimer.TYPE_REPEATING_SLACK); // 1 minute
+            this.logger.log(3, "Cookie jar selector got profile-after-change");
+            break;
+       }
+  },
+
+  timer:  Cc["@mozilla.org/timer;1"].createInstance(nsITimer),
+
+}
+
+/**
+* XPCOMUtils.generateNSGetFactory was introduced in Mozilla 2 (Firefox 4).
+* XPCOMUtils.generateNSGetModule is for Mozilla 1.9.2 (Firefox 3.6).
+*/
+if (XPCOMUtils.generateNSGetFactory)
+    var NSGetFactory = XPCOMUtils.generateNSGetFactory([CookieJarSelector]);
+else
+    var NSGetModule = XPCOMUtils.generateNSGetModule([CookieJarSelector]);
+
+// End1506
diff --git a/components/domain-isolator.js b/components/domain-isolator.js
index 3ed6e58f..f6a6d598 100644
--- a/components/domain-isolator.js
+++ b/components/domain-isolator.js
@@ -15,6 +15,9 @@ const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm
 let logger = Cc["@torproject.org/torbutton-logger;1"]
                .getService(Ci.nsISupports).wrappedJSObject;
 
+let { ensureDefaultPrefs } = ChromeUtils.import("resource://torbutton/modules/default-prefs.js", {});
+ensureDefaultPrefs();
+
 // Import crypto object (FF 37+).
 Cu.importGlobalProperties(["crypto"]);
 
diff --git a/components/dragDropFilter.js b/components/dragDropFilter.js
index f48d1b38..9d6f74c8 100644
--- a/components/dragDropFilter.js
+++ b/components/dragDropFilter.js
@@ -6,6 +6,8 @@
  *************************************************************************/
 
 
+ChromeUtils.import("resource://torbutton/modules/default-prefs.js", {}).ensureDefaultPrefs();
+
 const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 
diff --git a/components/external-app-blocker.js b/components/external-app-blocker.js
index 9d5cbd79..afd5c002 100644
--- a/components/external-app-blocker.js
+++ b/components/external-app-blocker.js
@@ -16,8 +16,6 @@ const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm
 const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 const { PromptUtils } = ChromeUtils.import("resource://gre/modules/SharedPromptUtils.jsm");
 
-let { torbutton_get_property_string } = ChromeUtils.import("resource://torbutton/modules/utils.js", {});
-
 // Module specific constants
 const kMODULE_NAME = "Torbutton External App Handler";
 const kCONTRACT_ID = "@torproject.org/torbutton-extAppBlocker;1";
@@ -84,13 +82,13 @@ ExternalAppBlocker.prototype =
       parentWin = Services.wm.getMostRecentWindow("navigator:browser");
     }
 
-    let title = torbutton_get_property_string("torbutton.popup.external.title");
-    let app = torbutton_get_property_string("torbutton.popup.external.app");
-    let note = torbutton_get_property_string("torbutton.popup.external.note");
-    let suggest = torbutton_get_property_string("torbutton.popup.external.suggest");
-    let launch = torbutton_get_property_string("torbutton.popup.launch");
-    let cancel = torbutton_get_property_string("torbutton.popup.cancel");
-    let dontask = torbutton_get_property_string("torbutton.popup.dontask");
+    let title = parentWin.torbutton_get_property_string("torbutton.popup.external.title");
+    let app = parentWin.torbutton_get_property_string("torbutton.popup.external.app");
+    let note = parentWin.torbutton_get_property_string("torbutton.popup.external.note");
+    let suggest = parentWin.torbutton_get_property_string("torbutton.popup.external.suggest");
+    let launch = parentWin.torbutton_get_property_string("torbutton.popup.launch");
+    let cancel = parentWin.torbutton_get_property_string("torbutton.popup.cancel");
+    let dontask = parentWin.torbutton_get_property_string("torbutton.popup.dontask");
 
     let args = {
       promptType:       "confirmEx",
diff --git a/components/startup-observer.js b/components/startup-observer.js
index d2d1d610..bf2f0f48 100644
--- a/components/startup-observer.js
+++ b/components/startup-observer.js
@@ -21,6 +21,7 @@ XPCOMUtils.defineLazyModuleGetters(this, {
   L10nRegistry: "resource://gre/modules/L10nRegistry.jsm",
 });
 
+ChromeUtils.import("resource://torbutton/modules/default-prefs.js", {}).ensureDefaultPrefs();
 let NoScriptControl = ChromeUtils.import("resource://torbutton/modules/noscript-control.js", {});
 
 // Module specific constants
@@ -28,22 +29,6 @@ const kMODULE_NAME = "Startup";
 const kMODULE_CONTRACTID = "@torproject.org/startup-observer;1";
 const kMODULE_CID = Components.ID("06322def-6fde-4c06-aef6-47ae8e799629");
 
-function cleanupCookies() {
-  const migratedPref = "extensions.torbutton.cookiejar_migrated";
-  if (!Services.prefs.getBoolPref(migratedPref, false)) {
-    // Cleanup stored cookie-jar-selector json files
-    const profileFolder = Services.dirsvc.get("ProfD", Ci.nsIFile).clone();
-    for (const file of profileFolder.directoryEntries) {
-      if (file.leafName.match(/^(cookies|protected)-.*[.]json$/)) {
-        try {
-          file.remove(false);
-        } catch (e) {}
-      }
-    }
-    Services.prefs.setBoolPref(migratedPref, true);
-  }
-}
-
 function StartupObserver() {
     this.logger = Cc["@torproject.org/torbutton-logger;1"]
                     .getService(Ci.nsISupports).wrappedJSObject;
@@ -77,8 +62,6 @@ function StartupObserver() {
       this.logger.log(4, "Early proxy change failed. Will try again at profile load. Error: "+e);
     }
 
-    cleanupCookies();
-
     // Using all possible locales so that we do not have to change this list every time we support
     // a new one.
     const allLocales = [
diff --git a/components/torbutton-logger.js b/components/torbutton-logger.js
index 1c946fa7..52fdfc23 100644
--- a/components/torbutton-logger.js
+++ b/components/torbutton-logger.js
@@ -13,6 +13,8 @@ const kMODULE_NAME = "Torbutton Logger";
 const kMODULE_CONTRACTID = "@torproject.org/torbutton-logger;1";
 const kMODULE_CID = Components.ID("f36d72c9-9718-4134-b550-e109638331d7");
 
+ChromeUtils.import("resource://torbutton/modules/default-prefs.js", {}).ensureDefaultPrefs();
+
 const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
 const { XPCOMUtils } = ChromeUtils.import("resource://gre/modules/XPCOMUtils.jsm");
 
diff --git a/defaults/preferences/preferences.js b/defaults/preferences/preferences.js
new file mode 100644
index 00000000..acea0a3d
--- /dev/null
+++ b/defaults/preferences/preferences.js
@@ -0,0 +1,58 @@
+// debug prefs
+pref("extensions.torbutton.loglevel",4);
+pref("extensions.torbutton.logmethod",1); // 0=stdout, 1=errorconsole, 2=debuglog
+
+// Display prefs
+pref("extensions.torbutton.display_circuit", true);
+pref("extensions.torbutton at torproject.org.description", "chrome://torbutton/locale/torbutton.properties");
+pref("extensions.torbutton.updateNeeded", false);
+
+// Tor check and proxy prefs
+pref("extensions.torbutton.test_enabled",true);
+pref("extensions.torbutton.test_url","https://check.torproject.org/?TorButton=true");
+pref("extensions.torbutton.local_tor_check",true);
+pref("extensions.torbutton.versioncheck_url","https://www.torproject.org/projects/torbrowser/RecommendedTBBVersions");
+pref("extensions.torbutton.versioncheck_enabled",true);
+pref("extensions.torbutton.use_nontor_proxy",false);
+
+// State prefs:
+pref("extensions.torbutton.startup",false);
+pref("extensions.torbutton.inserted_button",false);
+pref("extensions.torbutton.inserted_security_level",false);
+
+// TODO: This is just part of a stopgap until #14429 gets properly implemented.
+// See #7255 for details. We display the warning three times to make sure the
+// user did not click on it by accident.
+pref("extensions.torbutton.maximize_warnings_remaining", 3);
+
+// Security prefs:
+pref("extensions.torbutton.cookie_protections",true);
+pref("extensions.torbutton.cookie_auto_protect",false);
+pref("extensions.torbutton.clear_http_auth",true);
+pref("extensions.torbutton.close_newnym",true);
+pref("extensions.torbutton.resize_new_windows",false);
+pref("extensions.torbutton.startup_state", 2); // 0=non-tor, 1=tor, 2=last
+pref("extensions.torbutton.tor_memory_jar",false);
+pref("extensions.torbutton.nontor_memory_jar",false);
+pref("extensions.torbutton.launch_warning",true);
+
+// Opt out of Firefox addon pings:
+// https://developer.mozilla.org/en/Addons/Working_with_AMO
+pref("extensions.torbutton at torproject.org.getAddons.cache.enabled", false);
+
+// Security Slider
+pref("extensions.torbutton.security_slider", 4);
+pref("extensions.torbutton.security_custom", false);
+
+pref("extensions.torbutton.prompt_torbrowser", true);
+pref("extensions.torbutton.confirm_plugins", true);
+pref("extensions.torbutton.confirm_newnym", true);
+
+pref("extensions.torbutton.noscript_inited", false);
+pref("extensions.torbutton.noscript_persist", false);
+
+// Browser home page:
+pref("browser.startup.homepage", "chrome://torbutton/content/locale/non-localized.properties");
+
+// This pref specifies an ad-hoc "version" for various pref update hacks we need to do
+pref("extensions.torbutton.pref_fixup_version", 0);
diff --git a/import-translations.sh b/import-translations.sh
index 06060a3c..b4c22295 100755
--- a/import-translations.sh
+++ b/import-translations.sh
@@ -2,7 +2,7 @@
 
 # This var comes from the TBB locale list.
 # XXX: Find some way to keep this, tor-launcher, and Tor Browser in sync
-BUNDLE_LOCALES="ar ca cs da de el es-AR es-ES fa fr ga-IE he hu id is it ja ka ko lt nb-NO mk ms nl pl pt-BR ro ru sv-SE th tr vi zh-CN zh-TW"
+BUNDLE_LOCALES="ar ca cs da de el es-AR es-ES fa fr ga-IE he hu id is it ja ka ko nb-NO mk nl pl pt-BR ro ru sv-SE tr vi zh-CN zh-TW"
 
 # XXX: Basque (eu) by request in #10687.
 # This is not used for official builds, but should remain so Basque XPIs can be
diff --git a/jar.mn b/jar.mn
index 45c8c9b8..6697b543 100644
--- a/jar.mn
+++ b/jar.mn
@@ -6,6 +6,7 @@ torbutton.jar:
 
  content/       (chrome/content/*)
  components/    (components/*)
+ defaults/      (defaults/*)
  modules/       (modules/*)
  skin/          (chrome/skin/*)
 
@@ -59,12 +60,8 @@ torbutton.jar:
  locale/ka/ (chrome/locale/ka/*)
 % locale torbutton ko %locale/ko/
  locale/ko/ (chrome/locale/ko/*)
-% locale torbutton lt %locale/lt/
- locale/lt/ (chrome/locale/lt/*)
 % locale torbutton mk %locale/mk/
  locale/mk/ (chrome/locale/mk/*)
-% locale torbutton ms %locale/ms/
- locale/ms/ (chrome/locale/ms/*)
 % locale torbutton nb-NO %locale/nb-NO/
  locale/nb-NO/ (chrome/locale/nb-NO/*)
 % locale torbutton nl %locale/nl/
@@ -79,8 +76,6 @@ torbutton.jar:
  locale/ru/ (chrome/locale/ru/*)
 % locale torbutton sv-SE %locale/sv-SE/
  locale/sv-SE/ (chrome/locale/sv-SE/*)
-% locale torbutton th %locale/th/
- locale/th/ (chrome/locale/th/*)
 % locale torbutton tr %locale/tr/
  locale/tr/ (chrome/locale/tr/*)
 % locale torbutton vi %locale/vi/
@@ -102,6 +97,9 @@ torbutton.jar:
 % component {06322def-6fde-4c06-aef6-47ae8e799629} %components/startup-observer.js
 % contract @torproject.org/startup-observer;1 {06322def-6fde-4c06-aef6-47ae8e799629}
 
+% component {e6204253-b690-4159-bfe8-d4eedab6b3be} %components/cookie-jar-selector.js
+% contract @torproject.org/cookie-jar-selector;1 {e6204253-b690-4159-bfe8-d4eedab6b3be}
+
 % component {5d57312b-5d8c-4169-b4af-e80d6a28a72e} %components/torCheckService.js
 % contract @torproject.org/torbutton-torCheckService;1 {5d57312b-5d8c-4169-b4af-e80d6a28a72e}
 
@@ -111,6 +109,8 @@ torbutton.jar:
 % component {e33fd6d4-270f-475f-a96f-ff3140279f68} %components/domain-isolator.js
 % contract @torproject.org/domain-isolator;1 {e33fd6d4-270f-475f-a96f-ff3140279f68}
 
+% category profile-after-change CookieJarSelector @torproject.org/cookie-jar-selector;1
+
 % category profile-after-change StartupObserver @torproject.org/startup-observer;1
 % category profile-after-change DomainIsolator @torproject.org/domain-isolator;1
 % category profile-after-change DragDropFilter @torproject.org/torbutton-dragDropFilter;1
diff --git a/modules/default-prefs.js b/modules/default-prefs.js
new file mode 100644
index 00000000..5ea549f4
--- /dev/null
+++ b/modules/default-prefs.js
@@ -0,0 +1,36 @@
+let loaded = false;
+
+function ensureDefaultPrefs () {
+  if (loaded) {
+    return;
+  }
+  const { Services } = ChromeUtils.import("resource://gre/modules/Services.jsm");
+  const kDefaultPreferences = "resource://torbutton/defaults/preferences/preferences.js";
+  const defaultPrefBranch = Services.prefs.getDefaultBranch(null);
+
+  const context = {
+    pref: function (aPrefName, aValue) {
+      const aValueType = typeof aValue;
+      if (aValueType === "boolean") {
+        defaultPrefBranch.setBoolPref(aPrefName, aValue);
+      } else if (aValueType === "number") {
+        defaultPrefBranch.setIntPref(aPrefName, aValue);
+      } else if (aValueType === "string") {
+        defaultPrefBranch.setCharPref(aPrefName, aValue);
+      } else {
+        Services.console.logStringMessage(
+          `Preference ${aPrefName} with value ${aValue} has an invalid value type`);
+      }
+
+      // Disable the External App Blocker on Android
+      if ((aPrefName === "extensions.torbutton.launch_warning") &&
+          (Services.appinfo.OS === "Android")) {
+        defaultPrefBranch.setBoolPref(aPrefName, false);
+      }
+    }
+  };
+  Services.scriptloader.loadSubScript(kDefaultPreferences, context);
+  loaded = true;
+}
+
+let EXPORTED_SYMBOLS = ["ensureDefaultPrefs"];
diff --git a/modules/security-prefs.js b/modules/security-prefs.js
index 7fb2e0c4..f61f24aa 100644
--- a/modules/security-prefs.js
+++ b/modules/security-prefs.js
@@ -33,7 +33,6 @@ const kSecuritySettings = {
   "gfx.font_rendering.opentype_svg.enabled" : [,  false, false, false, true ],
   "svg.disabled" :                            [,  true,  false, false, false],
   "javascript.options.asmjs" :                [,  false, false, false, true ],
-  "javascript.options.wasm" :                 [,  false, false, false, true ],
 };
 
 // The Security Settings prefs in question.
diff --git a/modules/tor-control-port.js b/modules/tor-control-port.js
index 1b0a79ad..9f6dbeb6 100644
--- a/modules/tor-control-port.js
+++ b/modules/tor-control-port.js
@@ -7,15 +7,10 @@
 //
 // To import the module, use
 //
-//  let { configureControlPortModule, controller } =
-//                Components.utils.import("path/to/tor-control-port.js", {});
-//
-// See the second-to-last function defined in this file:
-//   configureControlPortModule(ipcFile, host, port, password)
-// for usage of the configureControlPortModule function.
+//  let { controller } = Components.utils.import("path/to/tor-control-port.js", {});
 //
 // See the last function defined in this file:
-//   controller(onError)
+//   controller(ipcFile, host, port, password, onError)
 // for usage of the controller function.
 
 /* jshint esnext: true */
@@ -234,16 +229,7 @@ io.matchRepliesToCommands = function (asyncSend, dispatcher) {
     let [command, replyCallback, errorCallback] = commandQueue.shift();
     if (message.match(/^2/) && replyCallback) replyCallback(message);
     if (message.match(/^[45]/) && errorCallback) {
-      let myErr = new Error(command + " -> " + message);
-      // Add Tor-specific information to the Error object.
-      let idx = message.indexOf(' ');
-      if (idx > 0) {
-        myErr.torStatusCode = message.substring(0, idx);
-        myErr.torMessage = message.substring(idx);
-      } else {
-        myErr.torStatusCode = message;
-      }
-      errorCallback(myErr);
+      errorCallback(new Error(command + " -> " + message));
     }
   });
   // Create and return a version of sendCommand that returns a Promise.
@@ -576,24 +562,6 @@ info.getConf = function (aControlSocket, key) {
                        .then(info.getMultipleResponseValues);
 };
 
-// ## onionAuth
-// A namespace for functions related to tor's ONION_CLIENT_AUTH_* commands.
-let onionAuth = {};
-
-// __onionAuth.add(controlSocket, hsAddress, b64PrivateKey, nickname, isPermanent)__.
-// Sends a ONION_CLIENT_AUTH_ADD command to add a private key to the
-// Tor configuration.
-onionAuth.add = function (aControlSocket, hsAddress, b64PrivateKey,
-                          nickname, isPermanent) {
-  const keyType = "x25519";
-  let cmd = `onion_client_auth_add ${hsAddress} ${keyType}:${b64PrivateKey}`;
-  if (nickname)
-    cmd += ` ClientName=${nickname}`;
-  if (isPermanent)
-    cmd += " Flags=Permanent";
-  return aControlSocket.sendCommand(cmd);
-};
-
 // ## event
 // Handlers for events
 
@@ -649,9 +617,6 @@ tor.controller = function (ipcFile, host, port, password, onError) {
       isOpen = true;
   return { getInfo : key => info.getInfo(socket, key),
            getConf : key => info.getConf(socket, key),
-           onionAuthAdd : (hsAddress, b64PrivateKey, nickname, isPermanent) =>
-                            onionAuth.add(socket, hsAddress, b64PrivateKey,
-                                          nickname, isPermanent),
            watchEvent : (type, filter, onData) =>
                           event.watchEvent(socket, type, filter, onData),
            isOpen : () => isOpen,
@@ -661,53 +626,29 @@ tor.controller = function (ipcFile, host, port, password, onError) {
 
 // ## Export
 
-let controlPortInfo = {};
-
-// __configureControlPortModule(ipcFile, host, port, password)__.
-// Sets Tor control port connection parameters to be used in future calls to
-// the controller() function. Example:
-//     configureControlPortModule(undefined, "127.0.0.1", 9151, "MyPassw0rd");
-var configureControlPortModule = function (ipcFile, host, port, password) {
-  controlPortInfo.ipcFile = ipcFile;
-  controlPortInfo.host = host;
-  controlPortInfo.port = port || 9151;
-  controlPortInfo.password = password;
-};
-
-// __controller(onError)__.
-// Instantiates and returns a controller object that is connected and
-// authenticated to a Tor ControlPort using the connection parameters
-// provided in the most recent call to configureControlPortModule(), if
-// the controller doesn't yet exist. Otherwise returns the existing
-// controller to the given ipcFile or host:port.
+// __controller(ipcFile, host, port, password, onError)__.
+// Instantiates and returns a controller object connected to a tor ControlPort
+// on ipcFile or at host:port, authenticating with the given password, if
+// the controller doesn't yet exist. Otherwise returns the existing controller
+// to the given ipcFile or host:port.
 // onError is called with an error object as its single argument whenever
 // an error occurs. Example:
 //
 //     // Get the controller
-//     let c = controller(
+//     let c = controller(undefined, "127.0.0.1", 9151, "MyPassw0rd",
 //                    function (error) { console.log(error.message || error); });
 //     // Send command and receive `250` reply or error message in a promise:
 //     let replyPromise = c.getInfo("ip-to-country/16.16.16.16");
 //     // Close the controller permanently
 //     c.close();
-var controller = function (onError) {
-  if (!controlPortInfo.ipcFile && !controlPortInfo.host)
-    throw new Error("Please call configureControlPortModule first");
-
-  const dest = (controlPortInfo.ipcFile)
-               ? `unix:${controlPortInfo.ipcFile.path}`
-               : `${controlPortInfo.host}:${controlPortInfo.port}`;
-  const maybeController = tor.controllerCache[dest];
-  if (maybeController && maybeController.isOpen())
-    return maybeController;
-
-  tor.controllerCache[dest] = tor.controller(controlPortInfo.ipcFile,
-                                             controlPortInfo.host,
-                                             controlPortInfo.port,
-                                             controlPortInfo.password,
-                                             onError);
-  return tor.controllerCache[dest];
+var controller = function (ipcFile, host, port, password, onError) {
+  let dest = (ipcFile) ? "unix:" + ipcFile.path : host + ":" + port,
+      maybeController = tor.controllerCache[dest];
+  return (tor.controllerCache[dest] =
+           (maybeController && maybeController.isOpen()) ?
+             maybeController :
+             tor.controller(ipcFile, host, port, password, onError));
 };
 
-// Export functions for external use.
-var EXPORTED_SYMBOLS = ["configureControlPortModule", "controller"];
+// Export the controller function for external use.
+var EXPORTED_SYMBOLS = ["controller"];
diff --git a/modules/utils.js b/modules/utils.js
index b726342b..0caf475f 100644
--- a/modules/utils.js
+++ b/modules/utils.js
@@ -239,58 +239,6 @@ var getDomainForBrowser = (browser) => {
   return fpd;
 };
 
-var m_tb_torlog = Cc["@torproject.org/torbutton-logger;1"]
-.getService(Ci.nsISupports).wrappedJSObject;
-
-var m_tb_string_bundle = torbutton_get_stringbundle();
-
-function torbutton_safelog(nLevel, sMsg, scrub) {
-    m_tb_torlog.safe_log(nLevel, sMsg, scrub);
-    return true;
-}
-
-function torbutton_log(nLevel, sMsg) {
-    m_tb_torlog.log(nLevel, sMsg);
-
-    // So we can use it in boolean expressions to determine where the
-    // short-circuit is..
-    return true;
-}
-
-// load localization strings
-function torbutton_get_stringbundle()
-{
-    var o_stringbundle = false;
-
-    try {
-        var oBundle = Services.strings;
-        o_stringbundle = oBundle.createBundle("chrome://torbutton/locale/torbutton.properties");
-    } catch(err) {
-        o_stringbundle = false;
-    }
-    if (!o_stringbundle) {
-        torbutton_log(5, 'ERROR (init): failed to find torbutton-bundle');
-    }
-
-    return o_stringbundle;
-}
-
-function torbutton_get_property_string(propertyname)
-{
-    try {
-        if (!m_tb_string_bundle) {
-            m_tb_string_bundle = torbutton_get_stringbundle();
-        }
-
-        return m_tb_string_bundle.GetStringFromName(propertyname);
-    } catch(e) {
-        torbutton_log(4, "Unlocalized string "+propertyname);
-    }
-
-    return propertyname;
-}
-
 // Export utility functions for external use.
 let EXPORTED_SYMBOLS = ["bindPref", "bindPrefAndInit", "getEnv", "getLocale", "getDomainForBrowser",
-                        "getPrefValue", "observe", "showDialog", "show_torbrowser_manual", "unescapeTorString",
-                        "torbutton_safelog", "torbutton_log", "torbutton_get_property_string"];
+                        "getPrefValue", "observe", "showDialog", "show_torbrowser_manual", "unescapeTorString"];
diff --git a/moz.build b/moz.build
index 376c9976..843cee0d 100644
--- a/moz.build
+++ b/moz.build
@@ -4,3 +4,6 @@
 # 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/.
 JAR_MANIFESTS += ['jar.mn']
+JS_PREFERENCE_FILES += [
+    'defaults/preferences/preferences.js',
+]



More information about the tbb-commits mailing list