7 ALL_LINGUAS="de_DE el_GR en es_ES fr_FR it_IT ja_JP ko_KR nl_NL pt_PT ru_RU tr_TR zh_CN zh_HK zh_TW"
9 XGETTEXT=/usr/bin/xgettext
10 MSGMERGE=/usr/bin/msgmerge
12 echo -n "Make ${APPNAME}.pot "
13 if [ ! -e $POTFILES ] ; then
14 echo "$POTFILES not found"
18 $XGETTEXT --default-domain=${APPNAME} --directory=${SRCROOT} \
19 --add-comments --keyword=_ --keyword=N_ --files-from=$POTFILES
25 if [ ! -f ${APPNAME}.po ]; then
26 echo "No such file: ${APPNAME}.po"
30 rm -f ${APPNAME}.pot && mv ${APPNAME}.po ${APPNAME}.pot
33 for LANG in $ALL_LINGUAS; do
36 if [ ! -e $LANG.po ] ; then
37 sed 's/CHARSET/UTF-8/g' ${APPNAME}.pot > ${LANG}.po
38 echo "${LANG}.po created"
40 if $MSGMERGE ${LANG}.po ${APPNAME}.pot -o ${LANG}.new.po ; then
41 if cmp ${LANG}.po ${LANG}.new.po > /dev/null 2>&1; then
44 if mv -f ${LANG}.new.po ${LANG}.po; then
47 echo "msgmerge for $LANG.po failed: cannot move $LANG.new.po to $LANG.po" 1>&2
53 echo "msgmerge for $LANG failed!"