Debian Codegraph @

tools/update-pot

raw symbols SCIP
1 #!/bin/bash
2
3 XGETTEXT=xgettext
4 DOMAIN=7kaa
5 DIR=$(pwd)
6 PODIR=po
7 DATADIR=data
8 XGETTEXT_OPTIONS="--keyword=_ --keyword=N_"
9 POTFILES=${PODIR}/POTFILES.in
10 GENPOT=tools/genpot
11
12 if [ ! -e $DATADIR ]; then
13 echo "Could not find the ${DATADIR} directory -- please run this from the top source directory"
14 exit 1
15 fi
16
17 ${XGETTEXT} --default-domain=${DOMAIN} --directory=${DIR} \
18 --add-comments=TRANSLATORS: ${XGETTEXT_OPTIONS} \
19 --files-from=${POTFILES} --output ${PODIR}/${DOMAIN}.src.pot
20
21 ${GENPOT} ${DATADIR} | msguniq > ${PODIR}/${DOMAIN}.res.pot
22
23 msgcat ${PODIR}/7kaa.src.pot ${PODIR}/7kaa.res.pot > ${PODIR}/7kaa.pot
24
25 # Update translations to reflect new template.
26 for i in `grep -v '^#' ${PODIR}/LINGUAS`; do
27 echo Updating $i.po;
28 msgmerge --update --lang=$i ${PODIR}/$i.po ${PODIR}/7kaa.pot
29 done