3 PACKAGE=ug-setting-mobile-ap-ug
7 #ALL_LINGUAS= am az be ca cs da de el en_CA en_GB es et fi fr hr hu it ja ko lv mk ml ms nb ne nl pa pl pt pt_BR ru rw sk sl sr sr@Latn sv ta tr uk vi zh_CN zh_TW
8 ALL_LINGUAS="en_US en_GB ja ko zh_CN"
10 XGETTEXT=/usr/bin/xgettext
11 MSGMERGE=/usr/bin/msgmerge
13 echo -n "Make ${PACKAGE}.pot "
14 if [ ! -e $POTFILES ] ; then
15 echo "$POTFILES not found"
19 $XGETTEXT --default-domain=${PACKAGE} --directory=${SRCROOT} \
20 --add-comments --keyword=_ --keyword=N_ --files-from=$POTFILES
26 if [ ! -f ${PACKAGE}.po ]; then
27 echo "No such file: ${PACKAGE}.po"
31 rm -f ${PACKAGE}.pot && mv ${PACKAGE}.po ${PACKAGE}.pot
34 for LANG in $ALL_LINGUAS; do
37 if [ ! -e $LANG.po ] ; then
38 sed 's/CHARSET/UTF-8/g' ${PACKAGE}.pot > ${LANG}.po
39 echo "${LANG}.po created"
41 if $MSGMERGE ${LANG}.po ${PACKAGE}.pot -o ${LANG}.new.po ; then
42 if cmp ${LANG}.po ${LANG}.new.po > /dev/null 2>&1; then
45 if mv -f ${LANG}.new.po ${LANG}.po; then
48 echo "msgmerge for $LANG.po failed: cannot move $LANG.new.po to $LANG.po" 1>&2
54 echo "msgmerge for $LANG failed!"