summaryrefslogtreecommitdiffstats
path: root/firefox.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'firefox.sh.in')
-rw-r--r--firefox.sh.in10
1 files changed, 7 insertions, 3 deletions
diff --git a/firefox.sh.in b/firefox.sh.in
index 5abd280..55f31f4 100644
--- a/firefox.sh.in
+++ b/firefox.sh.in
@@ -180,8 +180,7 @@ if [ $MOZILLA_DOWN -ne 0 ]; then
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
+ # Try with a local variant first, then without a local variant
SHORTMOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*||g"`
MOZLOCALE=`echo $CURRENT_LOCALE | sed "s|_\([^.]*\).*|-\1|g"`
@@ -190,6 +189,11 @@ if [ $MOZILLA_DOWN -ne 0 ]; then
local langpack=langpack-${language}@firefox.mozilla.org.xpi
if [ -f $MOZ_LANGPACKS_DIR/$langpack ]; then
rm -rf $MOZ_EXTENSIONS_PROFILE_DIR/$langpack
+ # If the target file is a symlink (the fallback langpack),
+ # install the original file instead of the fallback one
+ if [ -h $MOZ_LANGPACKS_DIR/$langpack ]; then
+ langpack=`readlink $MOZ_LANGPACKS_DIR/$langpack`
+ fi
ln -s $MOZ_LANGPACKS_DIR/$langpack \
$MOZ_EXTENSIONS_PROFILE_DIR/$langpack
echo $MOZ_EXTENSIONS_PROFILE_DIR/$langpack > $FEDORA_LANGPACK_CONFIG
@@ -198,7 +202,7 @@ if [ $MOZILLA_DOWN -ne 0 ]; then
return 1
}
- create_langpack_link $SHORTMOZLOCALE || create_langpack_link $MOZLOCALE || true
+ create_langpack_link $MOZLOCALE || create_langpack_link $SHORTMOZLOCALE || true
fi
# Prepare command line arguments