Fixed langpacks (#580444)

This commit is contained in:
Martin Stransky 2010-04-13 10:05:18 +00:00
parent 67a437329d
commit 7ff0535028
2 changed files with 12 additions and 4 deletions

View File

@ -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

View File

@ -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 <stransky@redhat.com> - 3.0.4-2
- Fixed langpacks (#580444)
* Tue Mar 30 2010 Jan Horak <jhorak@redhat.com> - 3.0.4-1
- Update to 3.0.4