Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Language Pack for Thunderbird Lightning
"languages": {
"LANG": {
"chrome_resources": {
"calendar": "chrome/LANG/locale/LANG/calendar/",
"lightning": "chrome/LANG/locale/LANG/lightning/",
"gdata-provider": "chrome/LANG/locale/LANG/gdata/"
"version": "VERSION"
"applications": {
"gecko": {
"strict_min_version": "MINVER",
"id": "",
"strict_max_version": "MAXVER"
"langpack_id": "cal-LANG",
"version": "VERSION",
"name": "LANGUAGE (LANG) Language Pack for Lightning",
"manifest_version": 2,
"sources": {
"browser": {
"base_path": "browser/"
"author": "PACKAGER",
"description": "Language pack for Thunderbird Lightning for LANG"
# modify for your language as available at
pkgdesc="$_langname language files for Thunderbird Calendar"
source=("manifest.json" "thunderbird-cal-$_lang::hg+$_lang")
pkgver() {
cd "thunderbird-cal-$_lang"
printf "%s+%s+%s" $(date -u -d "$(hg log -l1 -T "{date|isodatesec}")" +"%Y%m%d%H%M%S") $_tbmin $_tbmax
build() {
rm -r build
mkdir -p build/"$langpath"
sed -e "s/VERSION/${pkgver}/g" \
-e "s/MINVER/$_tbmin/g" \
-e "s/MAXVER/$_tbmax/g" \
-e "s/LANGUAGE/$_langname/g" \
-e "s/LANG/$_lang/g" \
-e "s\$PACKAGER\$$PACKAGER\$g" \
manifest.json > build/manifest.json
mkdir -p build/defaults/preferences
sed -n "/@AB_CD@/d;/^pref/p" $_src/calendar/lightning-l10n.js >build/defaults/preferences/lightning-l10n.js
cp -a $_src/calendar/chrome/* build/"$langpath"
cd build
mv "$langpath"/calendar/providers/gdata "$langpath"/gdata
mv "$langpath"/calendar/providers/wcap/* "$langpath"/calendar/
rm -r "$langpath"/calendar/providers
bsdtar --format zip -c -f ../langpack-cal-$_lang\ *
package() {
install -Dm644 -t $pkgdir/usr/lib/thunderbird/extensions/ langpack-cal-$_lang\

This comment has been minimized.

Copy link

michaldybczak commented Dec 31, 2018

How to make a package or extension from it? I copied both files to a folder and run makepkg but got an error in build and since this should be .xpi file it should be done differently. How?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.