#!/bin/bash # translate.sh # # Usage: # # ./locale/translate.sh # # This script should be run by # # * PphWiki maintainers, before making a distribution # * Translators, after making a translation update # if [ ! -f index.php ]; then echo Usage: ./locale/translate.sh exit 2 fi ALL_LINGUAS="nl es de sv it" xgettext -L C++ -o locale/po/phpwiki.pot admin.php lib/*php podir=locale/po for i in $ALL_LINGUAS; do po=$podir/$i.po pot=$podir/phpwiki.pot locale=locale/$i/LC_MESSAGES msgmerge -o $po $po $pot mkdir -p $locale msgfmt -o $locale/phpwiki.mo $po awk -- ' BEGIN { msgid=""; msgstr=""; print (""); } ' $po > $locale/phpwiki.php done