2010-08-06 22:03:53 +02:00
|
|
|
#!/bin/bash
|
2012-02-26 14:24:04 +01:00
|
|
|
|
|
|
|
function check_tool()
|
|
|
|
{
|
|
|
|
which $1 > /dev/null
|
|
|
|
if [ $? == 1 ] ; then
|
|
|
|
echo "$1 is missing" ;
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
for p in find xgettext poeditor lconvert lrelease ; do
|
|
|
|
check_tool $p
|
|
|
|
done
|
|
|
|
|
2010-08-06 22:03:53 +02:00
|
|
|
CPP_FILE_LIST=`find src -name '*.cpp' -print`
|
2015-06-20 18:22:51 +02:00
|
|
|
xgettext --from-code utf-8 -d kisscount -s --keyword=_ -p ./resources/po -o kisscount.pot $CPP_FILE_LIST
|
|
|
|
for po in ./resources/po/*.po ; do
|
2012-02-26 14:24:04 +01:00
|
|
|
ts=`echo $po | sed s/po$/ts/`
|
|
|
|
poeditor $po
|
|
|
|
echo lconvert -locations relative $po -o $ts
|
|
|
|
lconvert -locations relative $po -o $ts
|
|
|
|
lrelease $ts
|
|
|
|
rm -f $ts
|
|
|
|
done
|