[Pkg-privacy-commits] [torbrowser-launcher] 19/28: Add 'Force downloading English version of Tor Browser' setting
Ulrike Uhlig
u-guest at moszumanska.debian.org
Sun Jul 10 21:18:17 UTC 2016
This is an automated email from the git hooks/post-receive script.
u-guest pushed a commit to branch debian/sid
in repository torbrowser-launcher.
commit 0446ea9c8863710a202a84ce30885b3b8289afa6
Author: Micah Lee <micah at micahflee.com>
Date: Fri Jul 8 14:27:45 2016 -0700
Add 'Force downloading English version of Tor Browser' setting
---
torbrowser_launcher/common.py | 7 ++++++-
torbrowser_launcher/settings.py | 11 +++++++++++
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/torbrowser_launcher/common.py b/torbrowser_launcher/common.py
index 836b7ab..5242eb3 100644
--- a/torbrowser_launcher/common.py
+++ b/torbrowser_launcher/common.py
@@ -70,6 +70,10 @@ class Common:
self.architecture = 'x86_64' if '64' in platform.architecture()[0] else 'i686'
# figure out the language
+ if hasattr(self, 'settings') and self.settings['force_en-US']:
+ self.language = 'en-US'
+ return
+
available_languages = ['en-US', 'ar', 'de', 'es-ES', 'fa', 'fr', 'it', 'ko', 'nl', 'pl', 'pt-PT', 'ru', 'vi', 'zh-CN']
default_locale = locale.getlocale(locale.LC_MESSAGES)[0]
if default_locale is None:
@@ -195,7 +199,8 @@ class Common:
'download_over_tor': False,
'modem_sound': False,
'tor_socks_address': 'tcp:127.0.0.1:9050',
- 'mirror': self.default_mirror
+ 'mirror': self.default_mirror,
+ 'force_en-US': False,
}
if os.path.isfile(self.paths['settings_file']):
diff --git a/torbrowser_launcher/settings.py b/torbrowser_launcher/settings.py
index 7c782df..6ef4d6f 100644
--- a/torbrowser_launcher/settings.py
+++ b/torbrowser_launcher/settings.py
@@ -101,6 +101,16 @@ class Settings:
self.modem_checkbox.set_tooltip_text(_("This option requires python-pygame to be installed"))
self.modem_checkbox.show()
+ # force en-US, only display if language isn't already en-US
+ if self.common.language != 'en-US':
+ self.force_en_checkbox = gtk.CheckButton(_("Force downloading English version of Tor Browser"))
+ if self.common.settings['force_en-US']:
+ self.force_en_checkbox.set_active(True)
+ else:
+ self.force_en_checkbox.set_active(False)
+ self.settings_box.pack_start(self.force_en_checkbox, True, True, 0)
+ self.force_en_checkbox.show()
+
# Tor SOCKS address
self.tor_addr_box = gtk.HBox(False, 10)
self.settings_box.pack_start(self.tor_addr_box, True, True, 0)
@@ -227,6 +237,7 @@ class Settings:
# checkbox options
self.common.settings['download_over_tor'] = self.tor_download_checkbox.get_active()
self.common.settings['modem_sound'] = self.modem_checkbox.get_active()
+ self.common.settings['force_en-US'] = self.force_en_checkbox.get_active()
self.common.settings['tor_socks_address'] = self.tor_addr.get_text()
# figure out the selected mirror
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-privacy/packages/torbrowser-launcher.git
More information about the Pkg-privacy-commits
mailing list