From 7d3db2fda548faa6855dd76fa1dd0bc41283314b Mon Sep 17 00:00:00 2001 From: Martin Stransky Date: Apr 13 2010 10:11:26 +0000 Subject: Fixed langpacks (#580444) --- diff --git a/thunderbird.sh.in b/thunderbird.sh.in index fde87c0..0630fd3 100644 --- a/thunderbird.sh.in +++ b/thunderbird.sh.in @@ -88,11 +88,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}@thunderbird.mozilla.org/chrome/$SHORTMOZLOCALE.jar ]; then @@ -104,7 +109,7 @@ if [ $MOZILLA_DOWN -ne 0 ]; then $MOZ_EXTENSIONS_PROFILE_DIR/langpack-${SHORTMOZLOCALE}@thunderbird.mozilla.org echo "$MOZ_EXTENSIONS_PROFILE_DIR/langpack-${SHORTMOZLOCALE}@thunderbird.mozilla.org" > $FEDORA_LANGPACK_CONFIG fi - elif [ -f $MOZ_EXTENSIONS_DIR/langpack-${MOZLOCALE}@thunderbird.mozilla.org/chrome/$MOZLOCALE.jar ]; then + elif [ -f $MOZ_LANGPACKS_DIR/langpack-${MOZLOCALE}@thunderbird.mozilla.org/chrome/$MOZLOCALE.jar ]; then if [ -d $MOZ_EXTENSIONS_PROFILE_DIR/langpack-${MOZLOCALE}@thunderbird.mozilla.org ]; then rmdir "$MOZ_EXTENSIONS_PROFILE_DIR/langpack-${MOZLOCALE}@thunderbird.mozilla.org" > /dev/null 2>&1 fi diff --git a/thunderbird.spec b/thunderbird.spec index 7006286..d7d114f 100644 --- a/thunderbird.spec +++ b/thunderbird.spec @@ -24,7 +24,7 @@ Summary: Mozilla Thunderbird mail/newsgroup client Name: thunderbird Version: 3.0.4 -Release: 1%{?dist} +Release: 2%{?dist} URL: http://www.mozilla.org/projects/thunderbird/ License: MPLv1.1 or GPLv2+ or LGPLv2+ Group: Applications/Internet @@ -431,6 +431,9 @@ fi #=============================================================================== %changelog +* Tue Apr 13 2010 Martin Stransky - 3.0.4-2 +- Fixed langpacks (#580444) + * Tue Mar 30 2010 Jan Horak - 3.0.4-1 - Update to 3.0.4