]> git.pld-linux.org Git - packages/firefox.git/commitdiff
- added runtime language support
authorjack <jack@pld-linux.org>
Sat, 19 Feb 2005 16:25:03 +0000 (16:25 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
Changed files:
    mozilla-firefox.sh -> 1.3

mozilla-firefox.sh

index 05f25ba423f0eaf59a0ea6869a0332b32a3f4519..9eb12ac4b54f3d14bface80c7b8347a4356abacc 100644 (file)
@@ -8,23 +8,34 @@ else
 fi
 
 MOZILLA_FIVE_HOME=$LIBDIR
+
+MOZLOCALE=`echo $LANG | sed "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 +44,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.043172 seconds and 4 git commands to generate.