Commit 9deac60a authored by Tails developers's avatar Tails developers

Properly localize the Tor Launcher.

parent 3c4aa9e7
......@@ -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/browser-locale.js \
"${HOME}"/.tor-launcher/TorBrowser/Data/Browser/profile.default/preferences/locale.js
ln -s /var/lib/tails-user-session/tor-launcher-locale.js \
"${HOME}"/.tor-launcher/TorBrowser/Data/Browser/profile.default/preferences/0000locale.js
fi
exec_firefox -app "${HOME}"/.tor-launcher/tor-launcher-standalone/application.ini
--- chroot.orig/etc/gdm3/PostLogin/Default 2014-09-16 17:00:27.948165188 +0000
+++ chroot/etc/gdm3/PostLogin/Default 2014-09-16 19:21:06.556288346 +0000
@@ -130,6 +130,21 @@
--- chroot.orig/etc/gdm3/PostLogin/Default 2014-10-03 02:16:53.170723099 +0200
+++ chroot/etc/gdm3/PostLogin/Default 2014-10-03 02:14:07.235916994 +0200
@@ -130,6 +130,32 @@
XKBOPTIONS="$TAILS_XKBOPTIONS"
EOF
......@@ -15,9 +15,20 @@
+else
+ BROWSER_LOCALE="en-US"
+fi
+TOR_LAUNCHER_LOCALES_DIR=/usr/share/tor-launcher-standalone/chrome/locale
+if [ -e "${TOR_LAUNCHER_LOCALES_DIR}/${LONG_LOCALE}" ]; then
+ TOR_LAUNCHER_LOCALE="${LONG_LOCALE}"
+elif [ -e "${TOR_LAUNCHER_LOCALES_DIR}/${SHORT_LOCALE}" ]; then
+ TOR_LAUNCHER_LOCALE="${SHORT_LOCALE}"
+else
+ TOR_LAUNCHER_LOCALE="en-US"
+fi
+echo "pref(\"general.useragent.locale\", \"${BROWSER_LOCALE}\");" > \
+ /var/lib/tails-user-session/browser-locale.js
+chmod 664 /var/lib/tails-user-session/browser-locale.js
+echo "pref(\"general.useragent.locale\", \"${TOR_LAUNCHER_LOCALE}\");" > \
+ /var/lib/tails-user-session/tor-launcher-locale.js
+chmod 664 /var/lib/tails-user-session/browser-locale.js \
+ /var/lib/tails-user-session/tor-launcher-locale.js
+
### Persistence
......
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