[QGIS Commit] r11365 - trunk/qgis/python/plugins/fTools/tools

svn_qgis at osgeo.org svn_qgis at osgeo.org
Thu Aug 13 16:43:27 EDT 2009


Author: cfarmer
Date: 2009-08-13 16:43:26 -0400 (Thu, 13 Aug 2009)
New Revision: 11365

Modified:
   trunk/qgis/python/plugins/fTools/tools/doPointDistance.py
   trunk/qgis/python/plugins/fTools/tools/doPointsInPolygon.py
   trunk/qgis/python/plugins/fTools/tools/doSelectByLocation.py
   trunk/qgis/python/plugins/fTools/tools/doSumLines.py
Log:
Applies patch to add several new strings from the fTools modules to the qgis_xx.ts files; Patch provided by Carlos Davila

Modified: trunk/qgis/python/plugins/fTools/tools/doPointDistance.py
===================================================================
--- trunk/qgis/python/plugins/fTools/tools/doPointDistance.py	2009-08-13 19:17:03 UTC (rev 11364)
+++ trunk/qgis/python/plugins/fTools/tools/doPointDistance.py	2009-08-13 20:43:26 UTC (rev 11365)
@@ -1,4 +1,4 @@
-#-----------------------------------------------------------
+#-----------------------------------------------------------
 # 
 # Create Point Distance Matrix
 #
@@ -49,7 +49,7 @@
 		QObject.connect(self.inPoint1, SIGNAL("currentIndexChanged(QString)"), self.update1)
 		QObject.connect(self.inPoint2, SIGNAL("currentIndexChanged(QString)"), self.update2)
 		# populate layer list
-		self.setWindowTitle("Distance matrix")
+		self.setWindowTitle(self.tr("Distance matrix"))
 		self.progressBar.setValue(0)
 		mapCanvas = self.iface.mapCanvas()
 		for i in range(mapCanvas.layerCount()):
@@ -104,7 +104,7 @@
 			self.outFile.clear()
 			self.compute(point1, point2, field1, field2, outPath, matType, nearest, self.progressBar)
 			self.progressBar.setValue(100)
-			addToTOC = QMessageBox.information(self, "Create Point Distance Matrix", "Created output matrix:\n" + outPath)
+			addToTOC = QMessageBox.information(self, "Create Point Distance Matrix", self.tr("Created output matrix:\n") + outPath)
 		self.progressBar.setValue(0)
 
 	def saveFile(self):

Modified: trunk/qgis/python/plugins/fTools/tools/doPointsInPolygon.py
===================================================================
--- trunk/qgis/python/plugins/fTools/tools/doPointsInPolygon.py	2009-08-13 19:17:03 UTC (rev 11364)
+++ trunk/qgis/python/plugins/fTools/tools/doPointsInPolygon.py	2009-08-13 20:43:26 UTC (rev 11365)
@@ -1,4 +1,4 @@
-#-----------------------------------------------------------
+#-----------------------------------------------------------
 # 
 # Points in Polygon
 #
@@ -44,7 +44,7 @@
 		# Set up the user interface from Designer.
 		self.setupUi(self)
 		QObject.connect(self.toolOut, SIGNAL("clicked()"), self.outFile)
-		self.setWindowTitle("Points in polygon")
+		self.setWindowTitle(self.tr("Points in polygon"))
 		# populate layer list
 		self.progressBar.setValue(0)
 		mapCanvas = self.iface.mapCanvas()
@@ -78,7 +78,7 @@
 				outName = outName.left(outName.length() - 4)
 			self.compute(inPoly, inPts, inField, outPath, self.progressBar)
 			self.outShape.clear()
-			addToTOC = QMessageBox.question(self, "Count Points in Polygons", "Created output Shapefile:\n" + outPath 
+			addToTOC = QMessageBox.question(self, "Count Points in Polygons", self.tr("Created output Shapefile:\n") + outPath 
 			+ "\n\nWould you like to add the new layer to the TOC?", QMessageBox.Yes, QMessageBox.No, QMessageBox.NoButton)
 			if addToTOC == QMessageBox.Yes:
 				self.vlayer = QgsVectorLayer(outPath, unicode(outName), "ogr")
@@ -154,7 +154,7 @@
 				if vlayer.isValid():
 					return vlayer
 				else:
-					QMessageBox.information(self, "Counts Points In Polygons", "Vector layer is not valid")
+					QMessageBox.information(self, "Counts Points In Polygons", self.tr("Vector layer is not valid"))
 
 	def getFieldList(self, vlayer):
 		fProvider = vlayer.dataProvider()

Modified: trunk/qgis/python/plugins/fTools/tools/doSelectByLocation.py
===================================================================
--- trunk/qgis/python/plugins/fTools/tools/doSelectByLocation.py	2009-08-13 19:17:03 UTC (rev 11364)
+++ trunk/qgis/python/plugins/fTools/tools/doSelectByLocation.py	2009-08-13 20:43:26 UTC (rev 11365)
@@ -1,4 +1,4 @@
-from PyQt4.QtCore import *
+from PyQt4.QtCore import *
 from PyQt4.QtGui import *
 
 from qgis.core import *
@@ -21,7 +21,7 @@
 				self.inPolygon.addItem(layer.name())
 				self.inPoint.addItem(layer.name())
 		self.updateUI()
-		self.cmbModify.addItems(["creating new selection", "adding to current selection", "removing from current selection"])
+		self.cmbModify.addItems([self.tr("creating new selection"), self.tr("adding to current selection"), self.tr("removing from current selection")])
 
 	def updateUI(self):
 		self.label_5.setVisible(False)
@@ -29,12 +29,12 @@
 		self.outShape.setVisible(False)
 		self.toolOut.setVisible(False)
 		self.label_2.setVisible(False)
-		self.setWindowTitle("Select by location")
-		self.label_3.setText("Select features in:")
-		self.label_4.setText("that intersect features in:")
+		self.setWindowTitle(self.tr("Select by location"))
+		self.label_3.setText(self.tr("Select features in:"))
+		self.label_4.setText(self.tr("that intersect features in:"))
 		self.label_mod = QLabel(self)
 		self.label_mod.setObjectName("label_mod")
-		self.label_mod.setText("Modify current selection by:")
+		self.label_mod.setText(self.tr("Modify current selection by:"))
 		self.cmbModify = QComboBox(self)
 		self.cmbModify.setObjectName("cmbModify")
 		self.gridlayout.addWidget(self.label_mod,2,0,1,1)
@@ -43,9 +43,9 @@
 
 	def accept(self):
 		if self.inPolygon.currentText() == "":
-			QMessageBox.information(self, "Select by location", "Please specify input layer")
+			QMessageBox.information(self, "Select by location", self.tr( "Please specify input layer"))
 		elif self.inPoint.currentText() == "":
-			QMessageBox.information(self, "Select by location", "Please specify select layer")
+			QMessageBox.information(self, "Select by location", self.tr("Please specify select layer"))
 		else:
 			inPoly = self.inPolygon.currentText()
 			inPts = self.inPoint.currentText()

Modified: trunk/qgis/python/plugins/fTools/tools/doSumLines.py
===================================================================
--- trunk/qgis/python/plugins/fTools/tools/doSumLines.py	2009-08-13 19:17:03 UTC (rev 11364)
+++ trunk/qgis/python/plugins/fTools/tools/doSumLines.py	2009-08-13 20:43:26 UTC (rev 11365)
@@ -1,4 +1,4 @@
-#-----------------------------------------------------------
+#-----------------------------------------------------------
 # 
 # Sum Lines In Polygons
 #
@@ -44,7 +44,7 @@
 		# Set up the user interface from Designer.
 		self.setupUi(self)
 		QObject.connect(self.toolOut, SIGNAL("clicked()"), self.outFile)
-		self.setWindowTitle("Sum line lengths")
+		self.setWindowTitle(self.tr("Sum line lengths"))
 		# populate layer list
 		self.progressBar.setValue(0)
 		mapCanvas = self.iface.mapCanvas()



More information about the QGIS-commit mailing list