Localisation conversion script now detects which version lrelease is available in the system
FossilOrigin-Name: 4286422aff75481222f2855360bdc6c18c588e38
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user