#!/bin/sh

# This script is used for translations using .po files.
# It creates .xml files from the translated .po files.

if [ "$1" = "--help" ] ; then
    echo "Usage: $0 <language>"
    exit 0
fi

language=${1:-pl}

BUILDDIR="./build"
if [ -z "$PO_USEBUILD" ] ; then
    WORKDIR="./integrated"
    PODIR="./po"
else
    WORKDIR="$BUILDDIR/build.po"
    PODIR="$BUILDDIR/build.po"
fi
SOURCEDIR="$WORKDIR/en"
# Don't overwrite XML translations committed to SVN
if [ -d "./$language/.svn" ] ; then
    TARGETDIR=                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               