2011-04-02

Slitaz -- firefox 4.0 / langpack



Env:slitaz-cooking-firefox.iso
http://mirror.slitaz.org/iso/cooking/flavors/slitaz-cooking-firefox.iso 2011-Apr-02 14:04:07

UPDATE:20110407

Use the code below to change locale of firefox in shell:
sed -i '/pref/s/en-US/zh-TW/' /etc/firefox/pref/firefox-l10n.js

VS.

tux@slitaz:~$ sed -i s'/'"en-US"'/'"zh-TW"'/' .mozilla/firefox/*.default/prefs.js
tux@slitaz:~$ grep '"zh-TW"' .mozilla/firefox/*.default/prefs.js
user_pref("general.useragent.locale", "zh-TW");
tux@slitaz:~$


----
root@slitaz:~# cat /etc/firefox/pref/firefox-l10n.js
cat: can't open '/etc/firefox/pref/firefox-l10n.js': No such file or directory
root@slitaz:~# ls -l /etc/firefox/pref/
total 8
-rw-r--r-- 1 root root 133 Apr 3 2011 channel-prefs.js
-rw-r--r-- 1 root root 868 Apr 3 2011 firefox.js
root@slitaz:~# cat /var/lib/tazpkg/installed/firefox-langpack-zh_TW/receipt
# SliTaz package receipt.

PACKED_SIZE="180.0K"
UNPACKED_SIZE="1.3M"
PACKAGE="firefox-langpack-zh_TW"
VERSION="4.0"
CATEGORY="network"
SHORT_DESC="Chinese Language Package for firefox"
MAINTAINER="lufeng369@gmail.com"
DEPENDS="firefox"
WEB_SITE="http://www.mozilla.com"
LANG=`echo $PACKAGE | cut -d'-' -f3 | tr '_' '-'`
LANG_DIR="langpack-$LANG@firefox.mozilla.org"
TARBALL="$LANG.xpi"
WGET_URL="http://releases.mozilla.org/pub/mozilla.org/firefox/releases/$VERSION/linux-i686/xpi/$TARBALL"

# Rules to gen a SliTaz package suitable for Tazpkg.
genpkg_rules()
{
EXTDIR="$fs/usr/lib/$SOURCE-$VERSION/extensions/$LANG_DIR"
mkdir -p $EXTDIR
cp -a $src/* $EXTDIR
}

post_install()
{
echo ""
echo "Use the code below to change locale of firefox in shell:"
echo "sed -i '/pref/s/en-US/$LANG/' /etc/firefox/pref/firefox-l10n.js"
echo ""
}

# md5sum of cooking stuff :
# d1bbb9e1b4b50202224805d1c56a0828 receipt
root@slitaz:~#
.