[QGIS Commit] r12333 - in trunk/qgis: scripts src/ui

svn_qgis at osgeo.org svn_qgis at osgeo.org
Thu Dec 3 16:00:26 EST 2009


Author: macho
Date: 2009-12-03 16:00:25 -0500 (Thu, 03 Dec 2009)
New Revision: 12333

Modified:
   trunk/qgis/scripts/update_ts_files.sh
   trunk/qgis/src/ui/qgspgsourceselectbase.ui
Log:
restoring accidantly updated files - sorry for that


Modified: trunk/qgis/scripts/update_ts_files.sh
===================================================================
--- trunk/qgis/scripts/update_ts_files.sh	2009-12-03 20:47:55 UTC (rev 12332)
+++ trunk/qgis/scripts/update_ts_files.sh	2009-12-03 21:00:25 UTC (rev 12333)
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
 # Update the translation files with strings used in QGIS
 # 1. create a clean Qt .pro file for the project
 # 2. run lupdate using the .pro file from step 1
@@ -7,18 +7,53 @@
 # name is reserved for the Windows qmake project file
 # update_ts_files.sh,v 1.3 2004/07/14 18:16:24 gsherman Exp
 
+set -e
+
 PATH=$QTDIR/bin:$PATH
 
 #first tar the qt_xx.ts files in i18n folder such that lupdate does not 
 #merge the qgis strings to them
 echo Creating qt_ts.tar
-tar -cvf i18n/qt_ts.tar i18n/qt_*.ts
-rm i18n/qt_*.ts
+tar --remove-files -cvf i18n/qt_ts.tar i18n/qt_*.ts
+exclude=
+opts=
+for i in "$@"; do
+  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
+fi
+echo Updating python translations
+cd python
+pylupdate4 utils.py -ts python-i18n.ts
+perl ../scripts/ts2cpp.pl python-i18n.ts python-i18n.cpp
+rm python-i18n.ts
+cd ..
+for i in python/plugins/*/CMakeLists.txt; do
+	cd ${i%/*}
+	pylupdate4 $(find . -name "*.py" -o -name "*.ui") -ts python-i18n.ts
+	perl ../../../scripts/ts2cpp.pl python-i18n.ts python-i18n.cpp
+	rm python-i18n.ts
+	cd ../../..
+done
 echo Creating qmake project file
-qmake -project -o qgis_ts.pro
+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
 echo Removing qmake project file
 rm qgis_ts.pro
 echo Unpacking qt_ts.tar
-tar -xvf i18n/qt_ts.tar
+tar -xvf i18n/qt_ts.tar 
+rm i18n/qt_ts.tar
+if [ -f i18n/qgis_ts.tar ]; then
+  echo Unpacking i18n/qgis_ts.tar
+  tar -xvf i18n/qgis_ts.tar 
+  rm i18n/qgis_ts.tar
+fi

Modified: trunk/qgis/src/ui/qgspgsourceselectbase.ui
===================================================================
--- trunk/qgis/src/ui/qgspgsourceselectbase.ui	2009-12-03 20:47:55 UTC (rev 12332)
+++ trunk/qgis/src/ui/qgspgsourceselectbase.ui	2009-12-03 21:00:25 UTC (rev 12333)
@@ -165,7 +165,7 @@
    <item>
     <widget class="QDialogButtonBox" name="buttonBox">
      <property name="standardButtons">
-      <set>QDialogButtonBox::Cancel|QDialogButtonBox::Help|QDialogButtonBox::Open</set>
+      <set>QDialogButtonBox::Close|QDialogButtonBox::Help</set>
      </property>
     </widget>
    </item>
@@ -195,30 +195,14 @@
    <slot>reject()</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>265</x>
-     <y>449</y>
+     <x>353</x>
+     <y>446</y>
     </hint>
     <hint type="destinationlabel">
-     <x>399</x>
-     <y>310</y>
+     <x>404</x>
+     <y>421</y>
     </hint>
    </hints>
   </connection>
-  <connection>
-   <sender>buttonBox</sender>
-   <signal>accepted()</signal>
-   <receiver>QgsPgSourceSelectBase</receiver>
-   <slot>accept()</slot>
-   <hints>
-    <hint type="sourcelabel">
-     <x>368</x>
-     <y>450</y>
-    </hint>
-    <hint type="destinationlabel">
-     <x>401</x>
-     <y>377</y>
-    </hint>
-   </hints>
-  </connection>
  </connections>
 </ui>



More information about the QGIS-commit mailing list