| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | |
| 3 | XGETTEXT=xgettext |
| 4 | DOMAIN=7kaa |
| 5 | DIR=$(pwdscip-shell system . . 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 [scip-shell system . . `[`. ! -e $DATADIR ]; then |
| 13 | echoscip-shell system . . 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} | msguniqscip-shell system . . msguniq. > ${PODIR}/${DOMAIN}.res.pot |
| 22 | |
| 23 | msgcatscip-shell system . . msgcat. ${PODIR}/7kaa.src.pot ${PODIR}/7kaa.res.pot > ${PODIR}/7kaa.pot |
| 24 | |
| 25 | # Update translations to reflect new template. |
| 26 | for i in `grepscip-shell system . . grep. -v '^#' ${PODIR}/LINGUAS`; do |
| 27 | echoscip-shell system . . echo. Updating $i.po; |
| 28 | msgmergescip-shell system . . msgmerge. --update --lang=$i ${PODIR}/$i.po ${PODIR}/7kaa.pot |
| 29 | done |