Commit 8b7dbd13 authored by intrigeri's avatar intrigeri
Browse files

Set localization Tor Browser prefs directly in prefs.js (refs: #15023)

preferences/0000locale.js is apparently ignored.
parent 5c24f2e0
...@@ -114,7 +114,7 @@ while IFS=: read MOZILLA_LOCALE LOCATION LOCALIZED_LANG; do ...@@ -114,7 +114,7 @@ while IFS=: read MOZILLA_LOCALE LOCATION LOCALIZED_LANG; do
echo "Trying to make search plugin '${PLUGIN}' the default for ${MOZILLA_LOCALE} but it unexpectedly wasn't the one we generated earlier" >&2 echo "Trying to make search plugin '${PLUGIN}' the default for ${MOZILLA_LOCALE} but it unexpectedly wasn't the one we generated earlier" >&2
exit 1 exit 1
fi fi
set_mozilla_pref "${LOCALE_PROFILE_FILE}" "${KEY}" "\"${PLUGIN}\"" set_mozilla_pref "${LOCALE_PROFILE_FILE}" "${KEY}" "\"${PLUGIN}\"" "user_pref"
done done
TBB_DICTIONARIES_DIR="${TBB_INSTALL}/dictionaries" TBB_DICTIONARIES_DIR="${TBB_INSTALL}/dictionaries"
unset SPELLCHECKER_LOCALE unset SPELLCHECKER_LOCALE
...@@ -133,7 +133,8 @@ while IFS=: read MOZILLA_LOCALE LOCATION LOCALIZED_LANG; do ...@@ -133,7 +133,8 @@ while IFS=: read MOZILLA_LOCALE LOCATION LOCALIZED_LANG; do
fi fi
set_mozilla_pref "${LOCALE_PROFILE_FILE}" \ set_mozilla_pref "${LOCALE_PROFILE_FILE}" \
"spellchecker.dictionary" \ "spellchecker.dictionary" \
"\"${SPELLCHECKER_LOCALE}\"" "\"${SPELLCHECKER_LOCALE}\"" \
"user_pref"
HOMEPAGE="https://tails.boum.org/home/" HOMEPAGE="https://tails.boum.org/home/"
if echo "${TAILS_WIKI_SUPPORTED_LANGUAGES}" | grep -qw "${LANG_CODE}"; then if echo "${TAILS_WIKI_SUPPORTED_LANGUAGES}" | grep -qw "${LANG_CODE}"; then
HOMEPAGE="${HOMEPAGE}index.${LANG_CODE}.html" HOMEPAGE="${HOMEPAGE}index.${LANG_CODE}.html"
......
...@@ -90,7 +90,7 @@ configure_xulrunner_app_locale() { ...@@ -90,7 +90,7 @@ configure_xulrunner_app_locale() {
locale="${2}" locale="${2}"
mkdir -p "${profile}"/preferences mkdir -p "${profile}"/preferences
echo "pref(\"general.useragent.locale\", \"${locale}\");" > \ echo "pref(\"general.useragent.locale\", \"${locale}\");" > \
"${profile}"/preferences/0000locale.js "${profile}"/prefs.js
} }
configure_best_tor_browser_locale() { configure_best_tor_browser_locale() {
...@@ -99,7 +99,7 @@ configure_best_tor_browser_locale() { ...@@ -99,7 +99,7 @@ configure_best_tor_browser_locale() {
best_locale="$(guess_best_tor_browser_locale)" best_locale="$(guess_best_tor_browser_locale)"
configure_xulrunner_app_locale "${profile}" "${best_locale}" configure_xulrunner_app_locale "${profile}" "${best_locale}"
cat "/etc/tor-browser/locale-profiles/${best_locale}.js" \ cat "/etc/tor-browser/locale-profiles/${best_locale}.js" \
>> "${profile}/preferences/0000locale.js" >> "${profile}/prefs.js"
} }
configure_best_tor_launcher_locale() { configure_best_tor_launcher_locale() {
......
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