commit:     faa765690ad00cb1725a1047cfca1a41861883db
Author:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 12 22:42:08 2019 +0000
Commit:     Thomas Deutschmann <whissi <AT> gentoo <DOT> org>
CommitDate: Sat Jan 12 22:42:22 2019 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=faa76569

www-client/firefox-bin: fix localization

Package-Manager: Portage-2.3.55, Repoman-2.3.12
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org>

 www-client/firefox-bin/files/all-gentoo-2.js             | 12 ++++++++++++
 ...ox-bin-60.4.0.ebuild => firefox-bin-60.4.0-r1.ebuild} | 16 +++++-----------
 ...ox-bin-64.0.2.ebuild => firefox-bin-64.0.2-r1.ebuild} | 14 ++++----------
 3 files changed, 21 insertions(+), 21 deletions(-)

diff --git a/www-client/firefox-bin/files/all-gentoo-2.js 
b/www-client/firefox-bin/files/all-gentoo-2.js
new file mode 100644
index 00000000000..29e34ca753a
--- /dev/null
+++ b/www-client/firefox-bin/files/all-gentoo-2.js
@@ -0,0 +1,12 @@
+// Ensure preference can't be changed by users
+lockPref("app.update.auto", false);
+lockPref("app.update.enabled", false);
+
+// Allow user to change based on needs
+defaultPref("browser.display.use_system_colors", true);
+defaultPref("spellchecker.dictionary_path", "/usr/share/myspell");
+defaultPref("browser.shell.checkDefaultBrowser", false);
+defaultPref("intl.locale.requested", "");
+
+// Preferences that should be reset every session
+pref("browser.EULA.override", true);

diff --git a/www-client/firefox-bin/firefox-bin-60.4.0.ebuild 
b/www-client/firefox-bin/firefox-bin-60.4.0-r1.ebuild
similarity index 92%
rename from www-client/firefox-bin/firefox-bin-60.4.0.ebuild
rename to www-client/firefox-bin/firefox-bin-60.4.0-r1.ebuild
index 371ab74243b..ebbc9c13129 100644
--- a/www-client/firefox-bin/firefox-bin-60.4.0.ebuild
+++ b/www-client/firefox-bin/firefox-bin-60.4.0-r1.ebuild
@@ -1,4 +1,4 @@
-# Copyright 1999-2018 Gentoo Authors
+# Copyright 1999-2019 Gentoo Authors
 # Distributed under the terms of the GNU General Public License v2
 
 EAPI=6
@@ -123,18 +123,12 @@ src_install() {
        insinto ${MOZILLA_FIVE_HOME}/defaults/pref/
        doins "${FILESDIR}"/local-settings.js
        insinto ${MOZILLA_FIVE_HOME}
-       newins "${FILESDIR}"/all-gentoo-1.js all-gentoo.js
+       newins "${FILESDIR}"/all-gentoo-2.js all-gentoo.js
 
        # Install language packs
-       MOZ_INSTALL_L10N_XPIFILE="1" mozlinguas_src_install
-
-       local LANG=${LINGUAS%% *}
-       if [[ -n ${LANG} && ${LANG} != "en" ]]; then
-               elog "Setting default locale to ${LANG}"
-               echo "pref(\"intl.locale.requested\", \"${LANG}\");" \
-                       >> 
"${ED}${MOZILLA_FIVE_HOME}"/defaults/pref/${PN}-prefs.js || \
-                       die "sed failed to change locale"
-       fi
+       MOZEXTENSION_TARGET="distribution/extensions" \
+               MOZ_INSTALL_L10N_XPIFILE="1" \
+               mozlinguas_src_install
 
        # Create /usr/bin/firefox-bin
        dodir /usr/bin/

diff --git a/www-client/firefox-bin/firefox-bin-64.0.2.ebuild 
b/www-client/firefox-bin/firefox-bin-64.0.2-r1.ebuild
similarity index 93%
rename from www-client/firefox-bin/firefox-bin-64.0.2.ebuild
rename to www-client/firefox-bin/firefox-bin-64.0.2-r1.ebuild
index 0fbbe4c781d..0567f8c5f39 100644
--- a/www-client/firefox-bin/firefox-bin-64.0.2.ebuild
+++ b/www-client/firefox-bin/firefox-bin-64.0.2-r1.ebuild
@@ -123,18 +123,12 @@ src_install() {
        insinto ${MOZILLA_FIVE_HOME}/defaults/pref/
        doins "${FILESDIR}"/local-settings.js
        insinto ${MOZILLA_FIVE_HOME}
-       newins "${FILESDIR}"/all-gentoo-1.js all-gentoo.js
+       newins "${FILESDIR}"/all-gentoo-2.js all-gentoo.js
 
        # Install language packs
-       MOZ_INSTALL_L10N_XPIFILE="1" mozlinguas_src_install
-
-       local LANG=${LINGUAS%% *}
-       if [[ -n ${LANG} && ${LANG} != "en" ]]; then
-               elog "Setting default locale to ${LANG}"
-               echo "pref(\"intl.locale.requested\", \"${LANG}\");" \
-                       >> 
"${ED}${MOZILLA_FIVE_HOME}"/defaults/pref/${PN}-prefs.js || \
-                       die "sed failed to change locale"
-       fi
+       MOZEXTENSION_TARGET="distribution/extensions" \
+               MOZ_INSTALL_L10N_XPIFILE="1" \
+               mozlinguas_src_install
 
        # Create /usr/bin/firefox-bin
        dodir /usr/bin/

Reply via email to