[QGIS Commit] r12244 - trunk/qgis/scripts

svn_qgis at osgeo.org svn_qgis at osgeo.org
Tue Nov 24 15:18:28 EST 2009


Author: jef
Date: 2009-11-24 15:18:28 -0500 (Tue, 24 Nov 2009)
New Revision: 12244

Modified:
   trunk/qgis/scripts/update_ts_files.sh
Log:
allow lupdate options like -no-obsolete on update_ts_files.sh

Modified: trunk/qgis/scripts/update_ts_files.sh
===================================================================
--- trunk/qgis/scripts/update_ts_files.sh	2009-11-24 20:17:34 UTC (rev 12243)
+++ trunk/qgis/scripts/update_ts_files.sh	2009-11-24 20:18:28 UTC (rev 12244)
@@ -16,8 +16,13 @@
 echo Creating qt_ts.tar
 tar --remove-files -cvf i18n/qt_ts.tar i18n/qt_*.ts
 exclude=
+opts=
 for i in "$@"; do
-  exclude="$exclude --exclude i18n/qgis_$i.ts"
+  if [ -f "i18n/qgis_$i.ts" ]; then
+    exclude="$exclude --exclude i18n/qgis_$i.ts"
+  else
+    opts=" $i"
+  fi
 done
 if [ -n "$exclude" ]; then
   tar --remove-files -cvf i18n/qgis_ts.tar i18n/qgis_*.ts$exclude
@@ -38,7 +43,7 @@
 echo Creating qmake project file
 qmake -project -o qgis_ts.pro -nopwd src python i18n
 echo Updating translation files
-lupdate -verbose qgis_ts.pro
+lupdate$opts -verbose qgis_ts.pro
 echo Removing temporary python translation files
 perl -i.bak -ne 'print unless /^\s+<location.*python-i18n\.cpp.*$/;' i18n/qgis_*.ts
 rm python/python-i18n.cpp python/plugins/*/python-i18n.cpp i18n/qgis_*.ts.bak



More information about the QGIS-commit mailing list