3
# This script is used for translations using .po files.
4
# It updates .pot files after changes in the original English
6
# The script 'merge_xml' should be run before this script!
8
if [ "$1" = "--help" ] ; then
13
if [ -z "`which xml2pot 2>/dev/null`" ] ; then
14
echo "ERR: xml2pot not found, please install the poxml package"
19
if [ -z "$PO_USEBUILD" ] ; then
20
WORKDIR="./integrated"
23
WORKDIR="$BUILDDIR/build.po"
24
PODIR="$BUILDDIR/build.po"
26
SOURCEDIR="$WORKDIR/en"
29
[ -d $SOURCE ] || exit 1
32
# This check is broken!
33
if [ -n "$(find $PODIR/pot/ -name *.pot 2>/dev/null)" ] ; then
34
echo "Deleting old POT files..."
38
for XML in `find $SOURCEDIR -name "*.xml"` ; do
39
echo "Creating new POT file for $XML"
40
POT=$(basename $XML .xml).pot
42
xml2pot $XML >$PODIR/pot/$POT
44
if [ $RC -ne 0 ] ; then
46
echo "Error: error $RC while executing xml2pot"