]> git.pld-linux.org Git - packages/thunderbird.git/commitdiff
- restored UI locale forcing, users are stupid and shouldn't be able to do
authorhawk <hawk@pld-linux.org>
Mon, 18 Aug 2008 15:21:38 +0000 (15:21 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
  what they want, let system think for them

Changed files:
    icedove.sh -> 1.4

icedove.sh

index dde3a013f583c737c9c3e4ae3dff1a7aa05eceed..bbdbbcda273d2639d0cdc0fec3bd434f33eb0e17 100644 (file)
@@ -12,7 +12,38 @@ if [ ! -d $HOME/.icedove ]; then
        fi
 fi
 
-ICEDOVE="$LIBDIR/icedove"
+MOZARGS=
+MOZLOCALE="$(/usr/bin/locale | grep "^LC_MESSAGES=" | \
+               sed -e "s|LC_MESSAGES=||g" -e "s|\"||g" )"
+for MOZLANG in $(echo $LANGUAGE | tr ":" " ") $MOZLOCALE; do
+       eval MOZLANG="$(echo $MOZLANG | sed -e "s|_\([^.]*\).*|-\1|g")"
+
+       if [ -f $LIBDIR/chrome/$MOZLANG.jar ]; then
+               MOZARGS="-UILocale $MOZLANG"
+               break
+       fi
+done
+
+if [ -z "$MOZARGS" ]; then
+       # try harder
+       for MOZLANG in $(echo $LANGUAGE | tr ":" " ") $MOZLOCALE; do
+               eval MOZLANG="$(echo $MOZLANG | sed -e "s|_.*||g")"
+
+               LANGFILE=$(echo ${MOZILLA_FIVE_HOME}/chrome/${MOZLANG}*.jar \
+                               | sed 's/\s.*//g' )
+               if [ -f "$LANGFILE" ]; then
+                       MOZLANG=$(basename "$LANGFILE" | sed 's/\.jar//')
+                       MOZARGS="-UILocale $MOZLANG"
+                       break
+               fi
+       done
+fi
+
+if [ -n "$MOZARGS" ]; then
+       ICEDOVE="$LIBDIR/icedove $MOZARGS"
+else
+       ICEDOVE="$LIBDIR/icedove"
+fi
 
 if [ "$1" == "-remote" ]; then
        $ICEDOVE "$@"
This page took 1.182715 seconds and 4 git commands to generate.