Skip to content

Commit 1d5ca8d

Browse files
author
jef
committed
remove location from temporary python translation files from ts files
git-svn-id: http://svn.osgeo.org/qgis/trunk@10998 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 6b915bf commit 1d5ca8d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

scripts/update_ts_files.sh

+7-4
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
# name is reserved for the Windows qmake project file
88
# update_ts_files.sh,v 1.3 2004/07/14 18:16:24 gsherman Exp
99

10+
set -e
11+
1012
PATH=$QTDIR/bin:$PATH
1113

1214
#first tar the qt_xx.ts files in i18n folder such that lupdate does not
@@ -17,17 +19,18 @@ rm i18n/qt_*.ts
1719
echo Updating python plugin translations
1820
for i in python/plugins/*/.; do
1921
cd $i
20-
pylupdate4 $(find . -name "*.py") -ts i18n.ts
21-
perl ../../../scripts/ts2cpp.pl i18n.ts i18n.cpp
22-
rm i18n.ts
22+
pylupdate4 $(find . -name "*.py") -ts python-i18n.ts
23+
perl ../../../scripts/ts2cpp.pl python-i18n.ts python-i18n.cpp
24+
rm python-i18n.ts
2325
cd ../../..
2426
done
2527
echo Creating qmake project file
2628
qmake -project -o qgis_ts.pro -nopwd src python i18n
2729
echo Updating translation files
2830
lupdate -verbose qgis_ts.pro
2931
echo Removing temporary python plugin translation files
30-
rm python/plugins/*/i18n.cpp
32+
perl -i.bak -pe '$_="" if /^\s+<location.*python-i18n\.cpp.*$/;' i18n/qgis_*.ts
33+
rm python/plugins/*/python-i18n.cpp i18n/qgis_*.ts.bak
3134
echo Removing qmake project file
3235
rm qgis_ts.pro
3336
echo Unpacking qt_ts.tar

0 commit comments

Comments
 (0)