summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rwxr-xr-xaddLanguage.sh4
1 files changed, 1 insertions, 3 deletions
diff --git a/addLanguage.sh b/addLanguage.sh
index 7d8a296..e321804 100755
--- a/addLanguage.sh
+++ b/addLanguage.sh
@@ -17,19 +17,17 @@ if [ "$1x" == "x" ] ; then
17fi 17fi
18 18
19for i in `find . -name "*.pro"` ; do 19for i in `find . -name "*.pro"` ; do
20 grep TRANSLATIONS $i > /dev/null 20 grep TRANSLATIONS $i > /dev/null
21 if [ "$?" != 0 ] ; then 21 if [ "$?" != 0 ] ; then
22 echo "$i: No Translations" 22 echo "$i: No Translations"
23 else 23 else
24 grep "../i18n/$LANG/" $i > /dev/null 24 grep "../i18n/$LANG/" $i > /dev/null
25 if [ "$?" == 0 ] ; then 25 if [ "$?" == 0 ] ; then
26 echo "$i: $LANG already there" 26 echo "$i: $LANG already there"
27 else 27 else
28 echo "$i: Adding $LANG" 28 echo "$i: Adding $LANG"
29 perl -p -i.bak -e 's/^(TRANSLATIONS\s+)(([^+])?=)(.+?i18n\/)(.+?)(\/.+?)$/$1$2$4$5$6\n$1+=$4'$LANG'$6/' $i 29 perl -p -i.bak -e 's/^(TRANSLATIONS\s*\+?=\s*)(.+?i18n\/)(.+?)(\/.+?\.ts)(.*)$/$1$2$3$4 \\\n\t $2'$LANG'$4$5/' $i
30 fi 30 fi
31 fi 31 fi
32done 32done
33 33
34
35