From e1fa01ec3d603131f9f48a1e75beb0851d75b1ce Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Wed, 24 Feb 2010 13:55:11 +0000 Subject: Added fix for #559960 --- firefox.sh.in | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'firefox.sh.in') diff --git a/firefox.sh.in b/firefox.sh.in index 803f74d..9c160d8 100644 --- a/firefox.sh.in +++ b/firefox.sh.in @@ -182,11 +182,16 @@ if [ $MOZILLA_DOWN -ne 0 ]; then rm `cat $FEDORA_LANGPACK_CONFIG` > /dev/null 2>&1 rm $FEDORA_LANGPACK_CONFIG > /dev/null 2>&1 fi + + # Get locale from system + CURRENT_LOCALE=$LC_ALL + CURRENT_LOCALE=${CURRENT_LOCALE:-$LC_MESSAGES} + CURRENT_LOCALE=${CURRENT_LOCALE:-$LANG} # Try without a local variant first, then with a local variant # So that pt-BR doesn't try to use pt for example - SHORTMOZLOCALE=`echo $LC_MESSAGES | sed "s|_\([^.]*\).*||g"` - MOZLOCALE=`echo $LC_MESSAGES | sed "s|_\([^.]*\).*|-\1|g"` + SHORTMOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*||g"` + MOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*|-\1|g"` # Try to link global langpacks to an extension directory if [ -f $MOZ_LANGPACKS_DIR/langpack-${SHORTMOZLOCALE}@firefox.mozilla.org/chrome/$SHORTMOZLOCALE.jar ]; then -- cgit