2014-01-27 19:29:20 +01:00
|
|
|
#!/bin/bash
|
|
|
|
#
|
2014-02-26 21:30:19 +01:00
|
|
|
# Generates list of all translations for qmake .pro and .qrc files
|
2014-01-27 19:29:20 +01:00
|
|
|
|
|
|
|
# Plugins translations
|
|
|
|
PLUGINS="`ls -d ../src/plugins/*/translations`"
|
|
|
|
|
|
|
|
for dir in $PLUGINS
|
|
|
|
do
|
|
|
|
echo -e "$dir\n"
|
|
|
|
echo "TRANSLATIONS += \\"
|
|
|
|
|
|
|
|
for translation in $dir/*.ts
|
|
|
|
do
|
|
|
|
[[ "$translation" == *empty.ts ]] && continue
|
|
|
|
echo " `echo $translation | awk 'BEGIN{FS="/"}{printf "%s/%s",$5,$6}'` \\"
|
|
|
|
done
|
|
|
|
|
2014-02-26 21:30:19 +01:00
|
|
|
echo -e "\n"
|
|
|
|
|
|
|
|
for translation in $dir/*.ts
|
|
|
|
do
|
|
|
|
[[ "$translation" == *empty.ts ]] && continue
|
2017-02-13 22:31:38 +01:00
|
|
|
echo " <file>locale/`echo $translation | awk 'BEGIN{FS="/"}{print substr($6,0,length($6)-3)}'`.qm</file>"
|
2014-02-26 21:30:19 +01:00
|
|
|
done
|
|
|
|
|
2014-01-27 19:29:20 +01:00
|
|
|
echo -e "\n\n"
|
|
|
|
done
|
|
|
|
|
|
|
|
# App translations
|
|
|
|
echo -e "../translations\n"
|
|
|
|
echo "TRANSLATIONS += \\"
|
|
|
|
|
|
|
|
for translation in ../translations/*.ts
|
|
|
|
do
|
|
|
|
[[ "$translation" == *empty.ts ]] && continue
|
|
|
|
echo " `echo $translation | awk 'BEGIN{FS="/"}{printf "$$PWD/%s",$3}'` \\"
|
|
|
|
done
|
|
|
|
|
|
|
|
echo -e "\n\n"
|
|
|
|
|