#!/bin/sh

if test $# -eq 0 ; then
    echo "Usage: $0 /path/to/qtdir/bin"
    exit 1
fi

echo -n "Generating project file for translations..."

$1/qmake -project -o translations.pro
echo "done"

# awk -f trans.awk translations/languages >> translations.pro

# Compile the po and ts format translations into the qm files that lprof
# requires to actually load its translations.

echo -n "Compiling po and ts files..."
$1/lrelease translations.pro
mkdir data/translations
cp translations/*.qm data/translations/

# clean up
rm -f translations/*.qm
rm -f translations.pro
echo "done"
