KissCount/tools/generate_locales.sh

26 lines
576 B
Bash
Raw Permalink Normal View History

2010-08-06 22:03:53 +02:00
#!/bin/bash
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
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