]> git.pld-linux.org Git - packages/firefox.git/blobdiff - mozilla-firefox.sh
- don't expand $PATH and $LD_LIBRARY_PATH at compile time for firefox-chrome+xpcom...
[packages/firefox.git] / mozilla-firefox.sh
index 05f25ba423f0eaf59a0ea6869a0332b32a3f4519..71edd8debc1ce403a216a1f7fe4c3d16440e1579 100644 (file)
@@ -8,23 +8,35 @@ else
 fi
 
 MOZILLA_FIVE_HOME=$LIBDIR
+
+MOZLOCALE="$(/usr/bin/locale | grep "^LC_MESSAGES=" | sed -e "s|LC_MESSAGES=||g" -e "s|\"||g" )"
+eval MOZLOCALE="$(echo $MOZLOCALE | sed -e "s|_\([^.]*\).*|-\1|g")"
+
+[ -f $MOZILLA_FIVE_HOME/chrome/$MOZLOCALE.jar ] && MOZARGS="-UILocale $MOZLOCALE"
+
+if [ -n "$MOZARGS" ]; then
+       FIREFOX="$LIBDIR/firefox $MOZARGS"
+else
+       FIREFOX="$LIBDIR/firefox"
+fi
+
 if [ "$1" == "-remote" ]; then
-       $LIBDIR/firefox "$@"
+       $FIREFOX "$@"
 else
-       PING=`$LIBDIR/firefox -remote 'ping()' 2>&1 >/dev/null`
+       PING=`$FIREFOX -remote 'ping()' 2>&1 >/dev/null`
        if [ -n "$PING" ]; then
                if [ -f "`pwd`/$1" ]; then
-                       $LIBDIR/firefox "file://`pwd`/$1"
+                       $FIREFOX "file://`pwd`/$1"
                else
-                       $LIBDIR/firefox "$@"
+                       $FIREFOX "$@"
                fi
        else
                if [ -z "$1" ]; then
-                       $LIBDIR/firefox -remote 'xfeDoCommand (openBrowser)'
+                       $FIREFOX -remote 'xfeDoCommand (openBrowser)'
                elif [ "$1" == "-mail" ]; then
-                       $LIBDIR/firefox -remote 'xfeDoCommand (openInbox)'
+                       $FIREFOX -remote 'xfeDoCommand (openInbox)'
                elif [ "$1" == "-compose" ]; then
-                       $LIBDIR/firefox -remote 'xfeDoCommand (composeMessage)'
+                       $FIREFOX -remote 'xfeDoCommand (composeMessage)'
                else
                        if [ -f "`pwd`/$1" ]; then
                                URL="file://`pwd`/$1"
@@ -33,9 +45,9 @@ else
                        fi
                        grep browser.tabs.opentabfor.middleclick ~/.mozilla/firefox/*/prefs.js | grep true > /dev/null
                        if [ 0 -eq 0 ]; then
-                               $LIBDIR/firefox -remote "OpenUrl($URL,new-tab)"
+                               $FIREFOX -remote "OpenUrl($URL,new-tab)"
                        else
-                               $LIBDIR/firefox -remote "OpenUrl($URL,new-window)"
+                               $FIREFOX -remote "OpenUrl($URL,new-window)"
                        fi
                fi
        fi
This page took 0.037357 seconds and 4 git commands to generate.