Commit 046485db authored by Tails developers's avatar Tails developers

Use the new, improved localization code for the browsers and Tor Launcher.

parent 39772eda
......@@ -2,7 +2,7 @@
set -e
# Import exec_firefox()
# Import exec_firefox() and configure_best_tor_launcher_locale()
. /usr/local/lib/tails-shell-library/tor-browser.sh
# The Tor Browser hardcodes the default profile dir to ../.. from the
......@@ -24,7 +24,7 @@ IsRelative=1
Path=profile.default
EOF
mkdir -p "${HOME}"/.tor-launcher/TorBrowser/Data/Browser/profile.default/preferences
ln -s /var/lib/tails-user-session/tor-launcher-locale.js \
"${HOME}"/.tor-launcher/TorBrowser/Data/Browser/profile.default/preferences/0000locale.js
configure_best_tor_launcher_locale "${HOME}"/.tor-launcher/TorBrowser/Data/Browser/profile.default
fi
exec_firefox -app "${HOME}"/.tor-launcher/tor-launcher-standalone/application.ini
......@@ -11,7 +11,7 @@ export TEXTDOMAIN
PROFILE="${HOME}/.tor-browser/profile.default"
# Import exec_firefox()
# Import exec_firefox() and configure_best_tor_browser_locale()
. /usr/local/lib/tails-shell-library/tor-browser.sh
ask_for_confirmation() {
......@@ -36,6 +36,8 @@ start_browser() {
/usr/local/bin/generate-tor-browser-profile
fi
configure_best_tor_browser_locale "${PROFILE}"
if [ -z "$XAUTHORITY" ]; then
XAUTHORITY=~/.Xauthority
export XAUTHORITY
......
......@@ -22,7 +22,9 @@ BROWSER_USER=i2pbrowser
TBB_PREFS="/etc/tor-browser/profile/preferences"
START_PAGE="http://127.0.0.1:7657"
# Import the TBB_INSTALL, TBB_EXT and TBB_PROFILE variables
# Import the TBB_INSTALL, TBB_EXT and TBB_PROFILE variables, and
# exec_firefox(), configure_xulrunner_app_locale() and
# guess_best_tor_browser_locale()
. /usr/local/lib/tails-shell-library/tor-browser.sh
NOSCRIPT="${TBB_EXT}/{73a6fe31-595d-460b-a920-fcc0f8843232}.xpi"
......@@ -174,8 +176,8 @@ configure_chroot () {
${BROWSER_PREF_DIR}/extension-overrides.js
# Localization
cat /var/lib/tails-user-session/browser-locale.js >> "${BROWSER_PREFS}"
BEST_LOCALE="$(guess_best_tor_browser_locale)"
configure_xulrunner_app_locale "${BROWSER_PROFILE}" "${BEST_LOCALE}"
# Prevent File -> Print or CTRL+P from causing the browser to hang
# for several minutes while trying to communicate with CUPS, since
......
......@@ -18,7 +18,9 @@ CLEARNET_USER=clearnet
# Import tor_is_working()
. /usr/local/lib/tails-shell-library/tor.sh
# Import the TBB_INSTALL, TBB_EXT and TBB_PROFILE variables
# Import the TBB_INSTALL, TBB_EXT and TBB_PROFILE variables, and
# exec_firefox(), configure_xulrunner_app_locale() and
# guess_best_tor_browser_locale()
. /usr/local/lib/tails-shell-library/tor-browser.sh
WARNING_PAGE='/usr/share/doc/tails/website/misc/unsafe_browser_warning'
......@@ -165,7 +167,8 @@ configure_chroot () {
mkdir -p "$(dirname "${CLEARNET_PREFS}")"
# Localization
cat /var/lib/tails-user-session/browser-locale.js >> "${CLEARNET_PREFS}"
BEST_LOCALE="$(guess_best_tor_browser_locale)"
configure_xulrunner_app_locale "${CLEARNET_PROFILE}" "${BEST_LOCALE}"
# Disable proxying in the chroot
echo 'pref("network.proxy.type", 0);' >> "${CLEARNET_PREFS}"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment