Localisation conversion script now detects which version lrelease is available in the system

FossilOrigin-Name: 4286422aff75481222f2855360bdc6c18c588e38
This commit is contained in:
kostas
2015-03-28 09:56:25 +00:00
parent a540921de5
commit 342f553703
3 changed files with 20 additions and 8 deletions

View File

@ -3,6 +3,18 @@ SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
PRJDIR=$SCRIPTDIR/..
INTLDIR=$SCRIPTDIR
# Detect lrelease tool
if hash lrelease-qt5 2>/dev/null; then
LRELEASE="lrelease-qt5"
elif hash lrelease 2>/dev/null; then
LRELEASE="lrelease"
else
echo "lrelease not found"
exit 1
fi
echo "Using ${LRELEASE}"
echo "Converting localizations"
rm -rf $PRJDIR/rsrc/intl
@ -16,7 +28,7 @@ do
# the original text in the code
if [ "$BASE" != "en_US" ]; then
echo "$TARGET"
lrelease-qt5 $i -qm $PRJDIR/rsrc/intl/$BASE.qm
$LRELEASE $i -qm $PRJDIR/rsrc/intl/$BASE.qm
fi
done