[QGIS Commit] r12655 - in trunk/qgis/python/plugins/fTools: . tools

svn_qgis at osgeo.org svn_qgis at osgeo.org
Thu Dec 31 04:57:30 EST 2009


Author: jef
Date: 2009-12-31 04:57:28 -0500 (Thu, 31 Dec 2009)
New Revision: 12655

Modified:
   trunk/qgis/python/plugins/fTools/doAbout.py
   trunk/qgis/python/plugins/fTools/tools/doDefineProj.py
   trunk/qgis/python/plugins/fTools/tools/doGeometry.py
   trunk/qgis/python/plugins/fTools/tools/doGeoprocessing.py
   trunk/qgis/python/plugins/fTools/tools/doIntersectLines.py
   trunk/qgis/python/plugins/fTools/tools/doJoinAttributes.py
   trunk/qgis/python/plugins/fTools/tools/doMeanCoords.py
   trunk/qgis/python/plugins/fTools/tools/doPointDistance.py
   trunk/qgis/python/plugins/fTools/tools/doPointsInPolygon.py
   trunk/qgis/python/plugins/fTools/tools/doRandPoints.py
   trunk/qgis/python/plugins/fTools/tools/doRandom.py
   trunk/qgis/python/plugins/fTools/tools/doReProject.py
   trunk/qgis/python/plugins/fTools/tools/doRegPoints.py
   trunk/qgis/python/plugins/fTools/tools/doSelectByLocation.py
   trunk/qgis/python/plugins/fTools/tools/doSpatialJoin.py
   trunk/qgis/python/plugins/fTools/tools/doSubsetSelect.py
   trunk/qgis/python/plugins/fTools/tools/doSumLines.py
   trunk/qgis/python/plugins/fTools/tools/doVectorGrid.py
   trunk/qgis/python/plugins/fTools/tools/doVectorSplit.py
   trunk/qgis/python/plugins/fTools/tools/doVisual.py
Log:
ftools i18n update

Modified: trunk/qgis/python/plugins/fTools/doAbout.py
===================================================================
--- trunk/qgis/python/plugins/fTools/doAbout.py	2009-12-30 17:25:58 UTC (rev 12654)
+++ trunk/qgis/python/plugins/fTools/doAbout.py	2009-12-31 09:57:28 UTC (rev 12655)
@@ -36,51 +36,42 @@
 		self.textEdit.setText(self.getText())
 
 	def getText(self):
-		aboutText = QString("The goal of fTools is to provide a one-stop resource for many common vector-based GIS tasks, ")
-		aboutText.append("without the need for additional software, libraries, or complex workarounds.\n\n")
-		aboutText.append("fTools is designed to extend the functionality of Quantum GIS using only core QGIS and python ")
-		aboutText.append("libraries. It provides a growing suite of spatial data management and analysis functions that are ")
-		aboutText.append("both quick and functional. In addition, the geoprocessing functions of  Dr. Horst Duester and ")
-		aboutText.append("Stefan Ziegler have been incorporated to futher facilitate and streamline GIS based research and analysis.\n\n")
-		aboutText.append("If you would like to report a bug, make suggestions for improving fTools, or have a question about ")
-		aboutText.append("the tools, please email me: carson.farmer at gmail.com\n\n")
-		licenceString = QString("LICENSING INFORMATION:\n")
-		licenceString.append("fTools is copyright (C) 2009  Carson J.Q. Farmer\n")
-		licenceString.append("Geoprocessing functions adapted from 'Geoprocessing Plugin',\n")
-		licenceString.append("(C) 2008 by Dr. Horst Duester, Stefan Ziegler\n\n")
-		licenceString.append("licensed under the terms of GNU GPL 2\n")
-		licenceString.append("This program is free software; you can redistribute it and/or modify")
-		licenceString.append("it under the terms of the GNU General Public License as published by")
-		licenceString.append("the Free Software Foundation; either version 2 of the License, or")
-		licenceString.append("(at your option) any later version.\n")
-		licenceString.append("This program is distributed in the hope that it will be useful,")
-		licenceString.append("but WITHOUT ANY WARRANTY; without even the implied warranty of")
-		licenceString.append("MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the")
-		licenceString.append("GNU General Public License for more details.\n")
-		licenceString.append("You should have received a copy of the GNU General Public License along")
-		licenceString.append("with this program; if not, write to the Free Software Foundation, Inc.,")
-		licenceString.append("51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n\n")
-		aknowledgeString = QString("AKNOWLEDGEMENTS:\n")
-		aknowledgeString.append("The following individuals (whether they know it or not) have contributed ")
-		aknowledgeString.append("ideas, help, testing, code, and guidence towards this project, and I thank them.\n")
-		aknowledgeString.append("Hawthorn Beyer\n")
-		aknowledgeString.append("Borys Jurgiel\n")
-		aknowledgeString.append("Tim Sutton\n")
-		aknowledgeString.append("Barry Rowlingson\n")
-		aknowledgeString.append("Horst Duester and Stefan Ziegler\n")
-		aknowledgeString.append("Paolo Cavallini\n")
-		aknowledgeString.append("Aaron Racicot\n")
-		aknowledgeString.append("Colin Robertson\n")
-		aknowledgeString.append("Agustin Lobo\n")		
-		aknowledgeString.append("Jurgen E. Fischer\n")
-		aknowledgeString.append("QGis developer and user communities\n")
-		aknowledgeString.append("Folks on #qgis at freenode.net\n")
-		aknowledgeString.append("All those who have reported bugs/fixes/suggestions/comments/etc.")
-		return QString(aboutText.append(licenceString.append(aknowledgeString)))
+		return self.tr("""
+The goal of fTools is to provide a one-stop resource for many common vector-based GIS tasks, without the need for additional software, libraries, or complex workarounds.
 
+fTools is designed to extend the functionality of Quantum GIS using only core QGIS and python libraries. It provides a growing suite of spatial data management and analysis functions that are both quick and functional. In addition, the geoprocessing functions of  Dr. Horst Duester and Stefan Ziegler have been incorporated to futher facilitate and streamline GIS based research and analysis.
+
+If you would like to report a bug, make suggestions for improving fTools, or have a question about the tools, please email me: carson.farmer at gmail.com
+
+LICENSING INFORMATION:
+fTools is copyright (C) 2009  Carson J.Q. Farmer
+Geoprocessing functions adapted from 'Geoprocessing Plugin',
+(C) 2008 by Dr. Horst Duester, Stefan Ziegler
+
+licensed under the terms of GNU GPL 2
+This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
+This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
+You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+ACKNOWLEDGEMENTS:
+The following individuals (whether they know it or not) have contributed ideas, help, testing, code, and guidence towards this project, and I thank them.
+Hawthorn Beyer
+Borys Jurgiel
+Tim Sutton
+Barry Rowlingson
+Horst Duester and Stefan Ziegler
+Paolo Cavallini
+Aaron Racicot
+Colin Robertson
+Agustin Lobo
+Jurgen E. Fischer
+QGis developer and user communities
+Folks on #qgis at freenode.net
+All those who have reported bugs/fixes/suggestions/comments/etc.
+""")
+
 	def openWeb(self):
 		webbrowser.open("http://www.ftools.ca/")
 
 	def openHelp(self):
 		webbrowser.open(currentPath + "/ftools_help.xml")
-		

Modified: trunk/qgis/python/plugins/fTools/tools/doDefineProj.py
===================================================================
--- trunk/qgis/python/plugins/fTools/tools/doDefineProj.py	2009-12-30 17:25:58 UTC (rev 12654)
+++ trunk/qgis/python/plugins/fTools/tools/doDefineProj.py	2009-12-31 09:57:28 UTC (rev 12655)
@@ -17,7 +17,7 @@
 		self.outShape.setVisible(False)
 		self.label_2.setVisible(False)
 		self.label_2.setEnabled(False)
-		self.setWindowTitle("Define current projection")
+		self.setWindowTitle(self.tr("Define current projection"))
 		QObject.connect(self.btnProjection, SIGNAL("clicked()"), self.outProjFile)
 		QObject.connect(self.inShape, SIGNAL("currentIndexChanged(QString)"), self.updateProj1)
 		QObject.connect(self.cmbLayer, SIGNAL("currentIndexChanged(QString)"), self.updateProj2)
@@ -42,11 +42,11 @@
 
 	def accept(self):
 		if self.inShape.currentText() == "":
-			QMessageBox.information(self, "Define current projection", "No input shapefile specified")
+			QMessageBox.information(self, self.tr("Define current projection"), self.tr("No input shapefile specified"))
 		elif self.txtProjection.text() == "" and self.rdoProjection.isChecked():
-			QMessageBox.information(self, "Define current projection", "Please specify spatial reference system")
+			QMessageBox.information(self, self.tr("Define current projection"), self.tr("Please specify spatial reference system"))
 		elif self.cmbLayer.currentText() == "" and self.rdoLayer.isChecked():
-			QMessageBox.information(self, "Define current projection", "Please specify spatial reference system")
+			QMessageBox.information(self, self.tr("Define current projection"), self.tr("Please specify spatial reference system"))
 		else:
 			self.progressBar.setValue(5)
 			inName = self.inShape.currentText()
@@ -54,7 +54,7 @@
 			vLayer = self.getVectorLayerByName(inName)
 			self.progressBar.setValue(30)
 			if vLayer == "Error":
-				QMessageBox.information(self, "Define current projection", "Cannot define projection for PostGIS data...yet!")
+				QMessageBox.information(self, self.tr("Define current projection"), self.tr("Cannot define projection for PostGIS data...yet!"))
 			else:
 				srsDefine = QgsCoordinateReferenceSystem()
 				if self.rdoProjection.isChecked():
@@ -64,7 +64,7 @@
 					destLayer = self.getVectorLayerByName(self.cmbLayer.currentText())
 					srsDefine = destLayer.srs()
 				if srsDefine == vLayer.srs():
-					QMessageBox.information(self, "Define current projection", "Identical output spatial reference system chosen")
+					QMessageBox.information(self, self.tr("Define current projection"), self.tr("Identical output spatial reference system chosen"))
 				else:
 					provider = vLayer.dataProvider()
 					self.progressBar.setValue(35)
@@ -74,7 +74,7 @@
 						inPath = inPath.left(inPath.length() - 4)
 					self.progressBar.setValue(55)
 					if not srsDefine.isValid():
-						QMessageBox.information(self, "Define current projection", "Output spatial reference system is not valid")
+						QMessageBox.information(self, self.tr("Define current projection"), self.tr("Output spatial reference system is not valid"))
 					else:
 						self.progressBar.setValue(60)
 						outputWkt = srsDefine.toWkt()
@@ -87,26 +87,25 @@
 						mLayer = self.getMapLayerByName(inName)
 						self.progressBar.setValue(90)
 						if not mLayer.isValid():
-							QMessageBox.information(self, "Define current projection", "Unable to dynamically define projection.\n"
-				        	+ "Please reload layer manually for projection definition to take effect.")
+							QMessageBox.information(self, self.tr("Define current projection"), self.tr("Unable to dynamically define projection.\nPlease reload layer manually for projection definition to take effect."))
 						else:
 							self.progressBar.setValue(95)
 							mLayer.setCrs(srsDefine)
 							self.progressBar.setValue(100)
-							QMessageBox.information(self, "Define current projection", "Defined Projection For:\n" + inPath + ".shp")
+							QMessageBox.information(self, self.tr("Define current projection"), self.tr("Defined Projection For:\n%1.shp").arg( inPath ) )
 		self.progressBar.setValue(0)
 
 	def outProjFile(self):
 		format = QString( "<h2>%1</h2>%2 <br/> %3" )
 		header = QString( "Define layer CRS:" )
-		sentence1 = QString( "Please select the projection system that defines the current layer." )
-		sentence2 = QString( "Layer CRS information will be updated to the selected CRS." )
+		sentence1 = self.tr( "Please select the projection system that defines the current layer." )
+		sentence2 = self.tr( "Layer CRS information will be updated to the selected CRS." )
 		self.projSelect = QgsGenericProjectionSelector(self, Qt.Widget)
 		self.projSelect.setMessage( format.arg( header ).arg( sentence1 ).arg( sentence2 ))
 		if self.projSelect.exec_():
 			projString = self.projSelect.selectedProj4String()
 			if projString == "":
-				QMessageBox.information(self, "Export to new projection", "No Valid CRS selected")
+				QMessageBox.information(self, self.tr("Export to new projection"), self.tr("No Valid CRS selected"))
 				return
 			else:
 				self.txtProjection.clear()

Modified: trunk/qgis/python/plugins/fTools/tools/doGeometry.py
===================================================================
--- trunk/qgis/python/plugins/fTools/tools/doGeometry.py	2009-12-30 17:25:58 UTC (rev 12654)
+++ trunk/qgis/python/plugins/fTools/tools/doGeometry.py	2009-12-31 09:57:28 UTC (rev 12655)
@@ -33,13 +33,13 @@
 
   def accept(self):
     if self.inShape.currentText() == "":
-      QMessageBox.information(self, "Geometry", self.tr( "Please specify input vector layer" ) )
+      QMessageBox.information(self, self.tr("Geometry"), self.tr( "Please specify input vector layer" ) )
     elif self.outShape.text() == "":
-      QMessageBox.information(self, "Geometry", self.tr( "Please specify output shapefile" ) )
+      QMessageBox.information(self, self.tr("Geometry"), self.tr( "Please specify output shapefile" ) )
     elif self.lineEdit.isVisible() and self.lineEdit.value() <= 0.00:
-      QMessageBox.information(self, "Geometry", self.tr( "Please specify valid tolerance value" ) )
+      QMessageBox.information(self, self.tr("Geometry"), self.tr( "Please specify valid tolerance value" ) )
     elif self.cmbField.isVisible() and self.cmbField.currentText() == "":
-      QMessageBox.information(self, "Geometry", self.tr( "Please specify valid UID field" ) )
+      QMessageBox.information(self, self.tr("Geometry"), self.tr( "Please specify valid UID field" ) )
     else:
       self.outShape.clear()
       self.geometry( self.inShape.currentText(), self.lineEdit.value(), self.cmbField.currentText() )
@@ -148,14 +148,14 @@
     check = QFile( self.shapefileName )
     if check.exists():
       if not QgsVectorFileWriter.deleteShapeFile( self.shapefileName ):
-        QMessageBox.warning( self, "Geoprocessing", self.tr( "Unable to delete existing shapefile." ) )
+        QMessageBox.warning( self, self.tr("Geoprocessing"), self.tr( "Unable to delete existing shapefile." ) )
         return
     self.testThread = geometryThread( self.iface.mainWindow(), self, self.myFunction, vlayer, myParam, 
     myField, self.shapefileName, self.encoding )
     QObject.connect( self.testThread, SIGNAL( "runFinished(PyQt_PyObject)" ), self.runFinishedFromThread )
     QObject.connect( self.testThread, SIGNAL( "runStatus(PyQt_PyObject)" ), self.runStatusFromThread )
     QObject.connect( self.testThread, SIGNAL( "runRange(PyQt_PyObject)" ), self.runRangeFromThread )
-    self.cancel_close.setText( "Cancel" )
+    self.cancel_close.setText( self.tr("Cancel") )
     QObject.connect( self.cancel_close, SIGNAL( "clicked()" ), self.cancelThread )
     self.testThread.start()
 
@@ -165,21 +165,18 @@
   def runFinishedFromThread( self, success ):
     self.testThread.stop()
     if success == "math_error":
-      QMessageBox.warning( self, "Geometry", self.tr( "Error processing specified tolerance!" ) + "\n"
-      + self.tr( "Please choose larger tolerance..." ) )
+      QMessageBox.warning( self, self.tr("Geometry"), self.tr("Error processing specified tolerance!\nPlease choose larger tolerance...") )
       if not QgsVectorFileWriter.deleteShapeFile( self.shapefileName ):
-        QMessageBox.warning( self, "Geometry", self.tr( "Unable to delete incomplete shapefile." ) )
+        QMessageBox.warning( self, self.tr("Geometry"), self.tr( "Unable to delete incomplete shapefile." ) )
     else: 
       self.cancel_close.setText( "Close" )
       QObject.disconnect( self.cancel_close, SIGNAL( "clicked()" ), self.cancelThread )
       if success:
-        addToTOC = QMessageBox.question( self, "Geometry", self.tr( "Created output shapefile:" ) + "\n" + 
-        unicode( self.shapefileName ) + "\n\n" + self.tr( "Would you like to add the new layer to the TOC?" ), 
-        QMessageBox.Yes, QMessageBox.No, QMessageBox.NoButton )
+        addToTOC = QMessageBox.question( self, self.tr("Geometry"), self.tr( "Created output shapefile:\n%1\n\nWould you like to add the new layer to the TOC?" ).arg( unicode( self.shapefileName ) ), QMessageBox.Yes, QMessageBox.No, QMessageBox.NoButton )
         if addToTOC == QMessageBox.Yes:
           ftools_utils.addShapeToCanvas( unicode( self.shapefileName ) )
       else:
-        QMessageBox.warning( self, "Geometry", self.tr( "Error writing output shapefile." ) )
+        QMessageBox.warning( self, self.tr("Geometry"), self.tr( "Error writing output shapefile." ) )
         
   def runStatusFromThread( self, status ):
     self.progressBar.setValue( status )
@@ -755,20 +752,20 @@
       plp = "Poly"
       ( found, index1 ) = self.checkForField( nameList, "AREA" )           
       if not found:
-        field = QgsField( "AREA", QVariant.Double, "double", 10, 6, "Polygon area" )
+        field = QgsField( "AREA", QVariant.Double, "double", 10, 6, self.tr("Polygon area") )
         index1 = len( fieldList.keys() )
         fieldList[ index1 ] = field        
       ( found, index2 ) = self.checkForField( nameList, "PERIMETER" )
         
       if not found:
-        field = QgsField( "PERIMETER", QVariant.Double, "double", 10, 6, "Polygon perimeter" )
+        field = QgsField( "PERIMETER", QVariant.Double, "double", 10, 6, self.tr("Polygon perimeter") )
         index2 = len( fieldList.keys() )
         fieldList[ index2 ] = field         
     elif geomType == QGis.Line:
       plp = "Line"
       (found, index1) = self.checkForField(nameList, "LENGTH")
       if not found:
-        field = QgsField("LENGTH", QVariant.Double, "double", 10, 6, "Line length")
+        field = QgsField("LENGTH", QVariant.Double, "double", 10, 6, self.tr("Line length") )
         index1 = len(fieldList.keys())
         fieldList[index1] = field
       index2 = index1
@@ -776,12 +773,12 @@
       plp = "Point"
       (found, index1) = self.checkForField(nameList, "XCOORD")
       if not found:
-        field = QgsField("XCOORD", QVariant.Double, "double", 10, 6, "Point x coordinate")
+        field = QgsField("XCOORD", QVariant.Double, "double", 10, 6, self.tr("Point x coordinate") )
         index1 = len(fieldList.keys())
         fieldList[index1] = field
       (found, index2) = self.checkForField(nameList, "YCOORD")
       if not found:
-        field = QgsField("YCOORD", QVariant.Double, "double", 10, 6, "Point y coordinate")
+        field = QgsField("YCOORD", QVariant.Double, "double", 10, 6, self.tr("Point y coordinate") )
         index2 = len(fieldList.keys())
         fieldList[index2] = field
     return (fieldList, index1, index2)

Modified: trunk/qgis/python/plugins/fTools/tools/doGeoprocessing.py
===================================================================
--- trunk/qgis/python/plugins/fTools/tools/doGeoprocessing.py	2009-12-30 17:25:58 UTC (rev 12654)
+++ trunk/qgis/python/plugins/fTools/tools/doGeoprocessing.py	2009-12-31 09:57:28 UTC (rev 12655)
@@ -54,24 +54,24 @@
   
   def accept( self ):
     if self.inShapeA.currentText() == "":
-      QMessageBox.warning( self, "Geoprocessing", self.tr( "Please specify an input layer" ) )
+      QMessageBox.warning( self, self.tr("Geoprocessing"), self.tr( "Please specify an input layer" ) )
     elif self.inShapeB.isVisible() and self.inShapeB.currentText() == "":
-      QMessageBox.warning( self, "Geoprocessing", self.tr( "Please specify a difference/intersect/union layer" ) )
+      QMessageBox.warning( self, self.tr("Geoprocessing"), self.tr( "Please specify a difference/intersect/union layer" ) )
     elif self.param.isEnabled() and self.param.isVisible() and self.param.text() == "":
-      QMessageBox.warning( self, "Geoprocessing", self.tr( "Please specify valid buffer value" ) )
+      QMessageBox.warning( self, self.tr("Geoprocessing"), self.tr( "Please specify valid buffer value" ) )
     elif self.attrib.isEnabled() and self.attrib.isVisible() and self.attrib.currentText() == "":
-      QMessageBox.warning( self, "Geoprocessing", self.tr( "Please specify dissolve field" ) )
+      QMessageBox.warning( self, self.tr("Geoprocessing"), self.tr( "Please specify dissolve field" ) )
     elif self.outShape.text() == "":
-      QMessageBox.warning( self, "Geoprocessing", self.tr( "Please specify output shapefile" ) )
+      QMessageBox.warning( self, self.tr("Geoprocessing"), self.tr( "Please specify output shapefile" ) )
     else:
       changedLayerA = ftools_utils.getVectorLayerByName( self.inShapeA.currentText() )
       changedLayerB = ftools_utils.getVectorLayerByName( self.inShapeB.currentText() )
       # check for selection in layer A
       if self.useSelectedA.isChecked() and changedLayerA.selectedFeatureCount() == 0:
-        QMessageBox.warning( self, "Geoprocessing", self.tr( "No features selected, please uncheck 'Use selected' or make a selection" ) )
+        QMessageBox.warning( self, self.tr("Geoprocessing"), self.tr( "No features selected, please uncheck 'Use selected' or make a selection" ) )
       # check for selection in layer B
       elif self.inShapeB.isVisible() and self.useSelectedB.isChecked() and changedLayerB.selectedFeatureCount() == 0:
-        QMessageBox.warning( self, "Geoprocessing", self.tr( "No features selected, please uncheck 'Use selected' or make a selection" ) )
+        QMessageBox.warning( self, self.tr("Geoprocessing"), self.tr( "No features selected, please uncheck 'Use selected' or make a selection" ) )
       else:
         self.outShape.clear()
         if self.attrib.isEnabled():
@@ -177,14 +177,14 @@
     check = QFile( self.shapefileName )
     if check.exists():
       if not QgsVectorFileWriter.deleteShapeFile( self.shapefileName ):
-        QMessageBox.warning( self, "Geoprocessing", self.tr( "Unable to delete existing shapefile." ) )
+        QMessageBox.warning( self, self.tr("Geoprocessing"), self.tr( "Unable to delete existing shapefile." ) )
         return
     self.testThread = geoprocessingThread( self.iface.mainWindow(), self, self.myFunction, myLayerA, 
     myLayerB, myParam, myMerge, mySelectionA, mySelectionB, self.shapefileName, self.encoding )
     QObject.connect( self.testThread, SIGNAL( "runFinished(PyQt_PyObject)" ), self.runFinishedFromThread )
     QObject.connect( self.testThread, SIGNAL( "runStatus(PyQt_PyObject)" ), self.runStatusFromThread )
     QObject.connect( self.testThread, SIGNAL( "runRange(PyQt_PyObject)" ), self.runRangeFromThread )
-    self.cancel_close.setText( "Cancel" )
+    self.cancel_close.setText( self.tr("Cancel") )
     QObject.connect( self.cancel_close, SIGNAL( "clicked()" ), self.cancelThread )
     self.testThread.start()
     return True
@@ -194,7 +194,7 @@
   
   def runFinishedFromThread( self, results ):
     self.testThread.stop()
-    self.cancel_close.setText( "Close" )
+    self.cancel_close.setText( self.tr("Close") )
     QObject.disconnect( self.cancel_close, SIGNAL( "clicked()" ), self.cancelThread )
     if not results[2] or not results[1] or not results [0]:
       out_text = self.tr( "\nWarnings:" )
@@ -210,8 +210,7 @@
       out_text = out_text + self.tr( "\nGEOS geoprocessing error: One or more input features have invalid geometry.")
     else:
       out_text = ""
-    addToTOC = QMessageBox.question( self, "Geoprocessing", self.tr( "Created output shapefile:" ) + "\n"
-    + unicode( self.shapefileName ) + out_text + end_text, QMessageBox.Yes, QMessageBox.No, QMessageBox.NoButton )
+    addToTOC = QMessageBox.question( self, self.tr("Geoprocessing"), self.tr( "Created output shapefile:\n%1\n\n%2%3" ).arg( unicode( self.shapefileName ) ).arg( out_text ).arg( end_text ), QMessageBox.Yes, QMessageBox.No, QMessageBox.NoButton )
     if addToTOC == QMessageBox.Yes:
       ftools_utils.addShapeToCanvas( unicode( self.shapefileName ) )
     

Modified: trunk/qgis/python/plugins/fTools/tools/doIntersectLines.py
===================================================================
--- trunk/qgis/python/plugins/fTools/tools/doIntersectLines.py	2009-12-30 17:25:58 UTC (rev 12654)
+++ trunk/qgis/python/plugins/fTools/tools/doIntersectLines.py	2009-12-31 09:57:28 UTC (rev 12655)
@@ -47,7 +47,7 @@
 		QObject.connect(self.toolOut, SIGNAL("clicked()"), self.outFile)
 		QObject.connect(self.inLine1, SIGNAL("currentIndexChanged(QString)"), self.update1)
 		QObject.connect(self.inLine2, SIGNAL("currentIndexChanged(QString)"), self.update2)
-		self.setWindowTitle("Line intersections")
+		self.setWindowTitle( self.tr("Line intersections") )
 		# populate layer list
 		self.progressBar.setValue(0)
 		mapCanvas = self.iface.mapCanvas()
@@ -74,15 +74,15 @@
 
 	def accept(self):
 		if self.inLine1.currentText() == "":
-			QMessageBox.information(self, "Locate Line Intersections", "Please specify input line layer")
+			QMessageBox.information(self, self.tr("Locate Line Intersections"), self.tr("Please specify input line layer") )
 		elif self.outShape.text() == "":
-			QMessageBox.information(self, "Locate Line Intersections", "Please specify output shapefile")
+			QMessageBox.information(self, self.tr("Locate Line Intersections"), self.tr("Please specify output shapefile") )
 		elif self.inLine2.currentText() == "":
-			QMessageBox.information(self, "Locate Line Intersections", "Please specify line intersect layer")
+			QMessageBox.information(self, self.tr("Locate Line Intersections"), self.tr("Please specify line intersect layer") )
 		elif self.inField1.currentText() == "":
-			QMessageBox.information(self, "Locate Line Intersections", "Please specify input unique ID field")
+			QMessageBox.information(self, self.tr("Locate Line Intersections"), self.tr("Please specify input unique ID field") )
 		elif self.inField2.currentText() == "":
-			QMessageBox.information(self, "Locate Line Intersections", "Please specify intersect unique ID field")
+			QMessageBox.information(self, self.tr("Locate Line Intersections"), self.tr("Please specify intersect unique ID field") )
 		else:
 			line1 = self.inLine1.currentText()
 			line2 = self.inLine2.currentText()
@@ -98,8 +98,7 @@
 			self.outShape.clear()
 			self.compute(line1, line2, field1, field2, outPath, self.progressBar)
 			self.progressBar.setValue(100)
-			addToTOC = QMessageBox.question(self, "Generate Centroids", "Created output point Shapefile:\n" + outPath 
-			+ "\n\nWould you like to add the new layer to the TOC?", QMessageBox.Yes, QMessageBox.No, QMessageBox.NoButton)
+			addToTOC = QMessageBox.question(self, self.tr("Generate Centroids"), self.tr("Created output point shapefile:\n%1\n\nWould you like to add the new layer to the TOC?").arg( outPath ), QMessageBox.Yes, QMessageBox.No, QMessageBox.NoButton)
 			if addToTOC == QMessageBox.Yes:
 				self.vlayer = QgsVectorLayer(outPath, unicode(outName), "ogr")
 				QgsMapLayerRegistry.instance().addMapLayer(self.vlayer)
@@ -185,7 +184,7 @@
 				if vlayer.isValid():
 					return vlayer
 				else:
-					QMessageBox.information(self, "Locate Line Intersections", "Vector layer is not valid")
+					QMessageBox.information(self, self.tr("Locate Line Intersections"), self.tr("Vector layer is not valid") )
 
 	def getFieldList(self, vlayer):
 		fProvider = vlayer.dataProvider()

Modified: trunk/qgis/python/plugins/fTools/tools/doJoinAttributes.py
===================================================================
--- trunk/qgis/python/plugins/fTools/tools/doJoinAttributes.py	2009-12-30 17:25:58 UTC (rev 12654)
+++ trunk/qgis/python/plugins/fTools/tools/doJoinAttributes.py	2009-12-31 09:57:28 UTC (rev 12655)
@@ -51,7 +51,7 @@
 		QObject.connect(self.toolTable, SIGNAL("clicked()"), self.inFile)
 		QObject.connect(self.rdoTable, SIGNAL("clicked()"), self.updateTableFields)
 		QObject.connect(self.rdoVector, SIGNAL("clicked()"), self.jupdate)
-		self.setWindowTitle("Join attributes")
+		self.setWindowTitle( self.tr("Join attributes") )
 		# populate layer list
 		self.progressBar.setValue(0)
 		mapCanvas = self.iface.mapCanvas()
@@ -77,17 +77,17 @@
 		
 	def accept(self):
 		if self.inShape.currentText() == "":
-			QMessageBox.information(self, "Join Attributes", "Please specify target vector layer")
+			QMessageBox.information(self, self.tr("Join Attributes"), self.tr("Please specify target vector layer"))
 		elif self.outShape.text() == "":
-			QMessageBox.information(self, "Join Attributes", "Please specify output shapefile")
+			QMessageBox.information(self, self.tr("Join Attributes"), self.tr("Please specify output shapefile"))
 		elif self.joinShape.currentText() == "" and self.rdoVector.isChecked():
-			QMessageBox.information(self, "Join Attributes", "Please specify join vector layer")
+			QMessageBox.information(self, self.tr("Join Attributes"), self.tr("Please specify join vector layer"))
 		elif self.inField.currentText() == "":
-			QMessageBox.information(self, "Join Attributes", "Please specify target join field")
+			QMessageBox.information(self, self.tr("Join Attributes"), self.tr("Please specify target join field"))
 		elif self.joinField.currentText() == "":
-			QMessageBox.information(self, "Join Attributes", "Please specify join field")
+			QMessageBox.information(self, self.tr("Join Attributes"), self.tr("Please specify join field"))
 		elif self.inTable.text() == "" and self.rdoTable.isChecked():
-			QMessageBox.information(self, "Join Attributes", "Please specify input table")
+			QMessageBox.information(self, self.tr("Join Attributes"), self.tr("Please specify input table"))
 		else:
 			keep = self.rdoKeep.isChecked()
 			inName = self.inShape.currentText()
@@ -108,8 +108,7 @@
 				outName = outName.left(outName.length() - 4)
 			self.compute(inName, inField, joinName, joinField, outPath, keep, useTable, self.progressBar)
 			self.outShape.clear()
-			addToTOC = QMessageBox.question(self, "Join Attributes", "Created output Shapefile:\n" + self.shapefileName 
-			+ "\n\nWould you like to add the new layer to the TOC?", QMessageBox.Yes, QMessageBox.No, QMessageBox.NoButton)
+			addToTOC = QMessageBox.question(self, self.tr("Join Attributes"), self.tr("Created output shapefile:\n%1\n\nWould you like to add the new layer to the TOC?").arg( unicode(self.shapefileName) ), QMessageBox.Yes, QMessageBox.No, QMessageBox.NoButton)
 			if addToTOC == QMessageBox.Yes:
 				vlayer = QgsVectorLayer(self.shapefileName, outName, "ogr")
 				QgsMapLayerRegistry.instance().addMapLayer(vlayer)
@@ -126,7 +125,7 @@
 		self.outShape.clear()
 		fileDialog = QFileDialog()
 		fileDialog.setConfirmOverwrite(False)
-		outName = fileDialog.getOpenFileName(self, "Join Table",".", "DBase Files (*.dbf)")
+		outName = fileDialog.getOpenFileName(self, self.tr("Join Table"), ".", "DBase Files (*.dbf)")
 		fileCheck = QFile(outName)
 		if fileCheck.exists():
 			filePath = QFileInfo(outName).absoluteFilePath()
@@ -136,7 +135,7 @@
 				self.inTable.insert(filePath)
 				self.updateTableFields()
 		else:
-			QMessageBox.warning(self, "Join Attributes", "Input table does not exist")
+			QMessageBox.warning(self, self.tr("Join Attributes"), self.tr("Input table does not exist"))
 
 	def updateTableFields(self):
 		if self.inTable.text() != "":
@@ -250,7 +249,7 @@
 				qtype = QVariant.Double
 			length = info[1]
 			prec = info[2]
-			field = QgsField(name, qtype, ntype, length, prec, "joined fields")
+			field = QgsField(name, qtype, ntype, length, prec, self.tr("joined fields"))
 			fieldList[item] = field
 			item = item + 1
 		return (fieldList, index2)
@@ -292,7 +291,7 @@
 				if vlayer.isValid():
 					return vlayer
 				else:
-					QMessageBox.information(self, "Join Attributes", "Vector layer is not valid")
+					QMessageBox.information(self, self.tr("Join Attributes"), self.tr("Vector layer is not valid"))
 
 	def getFieldList(self, vlayer):
 		fProvider = vlayer.dataProvider()

Modified: trunk/qgis/python/plugins/fTools/tools/doMeanCoords.py
===================================================================
--- trunk/qgis/python/plugins/fTools/tools/doMeanCoords.py	2009-12-30 17:25:58 UTC (rev 12654)
+++ trunk/qgis/python/plugins/fTools/tools/doMeanCoords.py	2009-12-31 09:57:28 UTC (rev 12655)
@@ -25,18 +25,18 @@
 
 	def updateUi(self):
 		if self.function == 1:
-			self.setWindowTitle("Mean coordinates")
+			self.setWindowTitle( self.tr("Mean coordinates") )
 			self.sizeValue.setVisible(False)
 			self.label_size.setVisible(False)
 		elif self.function == 2:
-			self.setWindowTitle("Standard distance")
+			self.setWindowTitle( self.tr("Standard distance") )
 		self.resize(381, 100)
 
 	def update(self, inputLayer):
 		self.weightField.clear()
 		self.uniqueField.clear()
-		self.weightField.addItem("(Optional) Weight field")
-		self.uniqueField.addItem("(Optional) Unique ID field")
+		self.weightField.addItem( self.tr("(Optional) Weight field") )
+		self.uniqueField.addItem( self.tr("(Optional) Unique ID field") )
 		self.changedLayer = self.getVectorLayerByName(inputLayer)
 		changedField = self.getFieldList(self.changedLayer)
 		for i in changedField:
@@ -46,9 +46,9 @@
 
 	def accept(self):
 		if self.inShape.currentText() == "":
-			QMessageBox.information(self, "Coordinate statistics", "No input vector layer specified")
+			QMessageBox.information(self, self.tr("Coordinate statistics"), self.tr("No input vector layer specified"))
 		elif self.outShape.text() == "":
-			QMessageBox.information(self, "Coordinate statistics", "Please specify output shapefile")
+			QMessageBox.information(self, self.tr("Coordinate statistics"), self.tr("Please specify output shapefile"))
 		else:
 			inName = self.inShape.currentText()
 			outPath = self.outShape.text()
@@ -62,8 +62,7 @@
 			self.compute(inName, outPath, self.weightField.currentText(), self.sizeValue.value(), self.uniqueField.currentText())
 			self.progressBar.setValue(100)
 			self.outShape.clear()
-			addToTOC = QMessageBox.question(self, "Coordinate statistics", "Created output point Shapefile:\n" + outPath
-				+ "\n\nWould you like to add the new layer to the TOC?", QMessageBox.Yes, QMessageBox.No, QMessageBox.NoButton)
+			addToTOC = QMessageBox.question(self, self.tr("Coordinate statistics"), self.tr("Created output point shapefile:\n%1\n\nWould you like to add the new layer to the TOC?").arg( outPath ), QMessageBox.Yes, QMessageBox.No, QMessageBox.NoButton)
 			if addToTOC == QMessageBox.Yes:
 				self.vlayer = QgsVectorLayer(outPath, unicode(outName), "ogr")
 				if self.vlayer.geometryType() == QGis.Point:

Modified: trunk/qgis/python/plugins/fTools/tools/doPointDistance.py
===================================================================
--- trunk/qgis/python/plugins/fTools/tools/doPointDistance.py	2009-12-30 17:25:58 UTC (rev 12654)
+++ trunk/qgis/python/plugins/fTools/tools/doPointDistance.py	2009-12-31 09:57:28 UTC (rev 12655)
@@ -75,15 +75,15 @@
 
 	def accept(self):
 		if self.inPoint1.currentText() == "":
-			QMessageBox.information(self, "Create Point Distance Matrix", "Please specify input point layer")
+			QMessageBox.information(self, self.tr("Create Point Distance Matrix"), self.tr("Please specify input point layer"))
 		elif self.outFile.text() == "":
-			QMessageBox.information(self, "Create Point Distance Matrix", "Please specify output file")
+			QMessageBox.information(self, self.tr("Create Point Distance Matrix"), self.tr("Please specify output file"))
 		elif self.inPoint2.currentText() == "":
-			QMessageBox.information(self, "Create Point Distance Matrix", "Please specify target point layer")
+			QMessageBox.information(self, self.tr("Create Point Distance Matrix"), self.tr("Please specify target point layer"))
 		elif self.inField1.currentText() == "":
-			QMessageBox.information(self, "Create Point Distance Matrix", "Please specify input unique ID field")
+			QMessageBox.information(self, self.tr("Create Point Distance Matrix"), self.tr("Please specify input unique ID field"))
 		elif self.inField2.currentText() == "":
-			QMessageBox.information(self, "Create Point Distance Matrix", "Please specify target unique ID field")
+			QMessageBox.information(self, self.tr("Create Point Distance Matrix"), self.tr("Please specify target unique ID field"))
 		else:
 			point1 = self.inPoint1.currentText()
 			point2 = self.inPoint2.currentText()
@@ -223,7 +223,7 @@
 				if vlayer.isValid():
 					return vlayer
 				else:
-					QMessageBox.information(self, "Locate Line Intersections", "Vector layer is not valid")
+					QMessageBox.information(self, self.tr("Locate Line Intersections"), self.tr("Vector layer is not valid"))
 
 	def getFieldList(self, vlayer):
 		fProvider = vlayer.dataProvider()

Modified: trunk/qgis/python/plugins/fTools/tools/doPointsInPolygon.py
===================================================================
--- trunk/qgis/python/plugins/fTools/tools/doPointsInPolygon.py	2009-12-30 17:25:58 UTC (rev 12654)
+++ trunk/qgis/python/plugins/fTools/tools/doPointsInPolygon.py	2009-12-31 09:57:28 UTC (rev 12655)
@@ -44,7 +44,7 @@
 		# Set up the user interface from Designer.
 		self.setupUi(self)
 		QObject.connect(self.toolOut, SIGNAL("clicked()"), self.outFile)
-		self.setWindowTitle(self.tr("Points in polygon"))
+		self.setWindowTitle(self.tr("Count Points in Polygon"))
 		# populate layer list
 		self.progressBar.setValue(0)
 		mapCanvas = self.iface.mapCanvas()
@@ -58,13 +58,13 @@
 		
 	def accept(self):
 		if self.inPolygon.currentText() == "":
-			QMessageBox.information(self, "Count Points In Polyon", "Please specify input polygon vector layer")
+			QMessageBox.information(self, self.tr("Count Points In Polygon"), self.tr("Please specify input polygon vector layer"))
 		elif self.outShape.text() == "":
-			QMessageBox.information(self, "Count Points In Polygon", "Please specify output shapefile")
+			QMessageBox.information(self, self.tr("Count Points In Polygon"), self.tr("Please specify output shapefile"))
 		elif self.inPoint.currentText() == "":
-			QMessageBox.information(self, "Count Points In Polygon", "Please specify input point vector layer")
+			QMessageBox.information(self, self.tr("Count Points In Polygon"), self.tr("Please specify input point vector layer"))
 		elif self.lnField.text() == "":
-			QMessageBox.information(self, "Count Points In Polygon", "Please specify output count field")
+			QMessageBox.information(self, self.tr("Count Points In Polygon"), self.tr("Please specify output count field"))
 		else:
 			inPoly = self.inPolygon.currentText()
 			inPts = self.inPoint.currentText()
@@ -78,8 +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", 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)
+			addToTOC = QMessageBox.question(self, self.tr("Count Points in Polygon"), self.tr("Created output shapefile:\n%1\n\nWould you like to add the new layer to the TOC?").arg(unicode(outPath)), QMessageBox.Yes, QMessageBox.No, QMessageBox.NoButton)
 			if addToTOC == QMessageBox.Yes:
 				self.vlayer = QgsVectorLayer(outPath, unicode(outName), "ogr")
 				QgsMapLayerRegistry.instance().addMapLayer(self.vlayer)
@@ -98,7 +97,7 @@
 		polyProvider = polyLayer.dataProvider()
 		pointProvider = pointLayer.dataProvider()
 		if polyProvider.crs() <> pointProvider.crs():
-			QMessageBox.warning(self, "CRS warning!", "Warning: Input layers have non-matching CRS.\nThis may cause unexpected results.")
+			QMessageBox.warning(self, self.tr("CRS warning!"), self.tr("Warning: Input layers have non-matching CRS.\nThis may cause unexpected results."))
 		allAttrs = polyProvider.attributeIndexes()
 		polyProvider.select(allAttrs)
 		allAttrs = pointProvider.attributeIndexes()
@@ -107,7 +106,7 @@
 		index = polyProvider.fieldNameIndex(unicode(inField))
 		if index == -1:
 			index = polyProvider.fieldCount()
-			field = QgsField(unicode(inField), QVariant.Int, "real", 24, 15, "point count field")
+			field = QgsField(unicode(inField), QVariant.Int, "real", 24, 15, self.tr("point count field"))
 			fieldList[index] = field
 		sRs = polyProvider.crs()
 		check = QFile(self.shapefileName)
@@ -154,7 +153,7 @@
 				if vlayer.isValid():
 					return vlayer
 				else:
-					QMessageBox.information(self, "Counts Points In Polygons", self.tr("Vector layer is not valid"))
+					QMessageBox.information(self, self.tr("Counts Points In Polygon"), self.tr("Vector layer is not valid"))
 
 	def getFieldList(self, vlayer):
 		fProvider = vlayer.dataProvider()

Modified: trunk/qgis/python/plugins/fTools/tools/doRandPoints.py
===================================================================
--- trunk/qgis/python/plugins/fTools/tools/doRandPoints.py	2009-12-30 17:25:58 UTC (rev 12654)
+++ trunk/qgis/python/plugins/fTools/tools/doRandPoints.py	2009-12-31 09:57:28 UTC (rev 12655)
@@ -46,7 +46,7 @@
         QObject.connect(self.toolOut, SIGNAL("clicked()"), self.outFile)
         QObject.connect(self.inShape, SIGNAL("currentIndexChanged(QString)"), self.update)
         self.progressBar.setValue(0)
-        self.setWindowTitle("Random points")
+        self.setWindowTitle(self.tr("Random Points"))
         mapCanvas = self.iface.mapCanvas()
         for i in range(mapCanvas.layerCount()):
             layer = mapCanvas.layer(i)
@@ -79,9 +79,9 @@
 # when 'OK' button is pressed, gather required inputs, and initiate random points generation            
     def accept(self):
 	if self.inShape.currentText() == "":
-	    QMessageBox.information(self, "Random Points", "No input layer specified")
+	    QMessageBox.information(self, self.tr("Random Points"), self.tr("No input layer specified"))
 	elif self.outShape.text() == "":
-	    QMessageBox.information(self, "Random Points", "Please specify output shapefile")
+	    QMessageBox.information(self, self.tr("Random Points"), self.tr("Please specify output shapefile"))
 	else:
 		inName = self.inShape.currentText()
 		self.progressBar.setValue(1)
@@ -98,23 +98,23 @@
 		if mLayer.type() == mLayer.VectorLayer:
 			inLayer = QgsVectorLayer(unicode(mLayer.source(),'latin1'),  unicode(mLayer.name(),'latin1'),  unicode(mLayer.dataProvider().name()))
 			if self.rdoUnstratified.isChecked():
-				design = "unstratified"
+				design = self.tr("unstratified")
 				value = self.spnUnstratified.value()
 			elif self.rdoStratified.isChecked():
-				design = "stratified"
+				design = self.tr("stratified")
 				value = self.spnStratified.value()
 			elif self.rdoDensity.isChecked():
-				design = "density"
+				design = self.tr("density")
 				value = self.spnDensity.value()
 			else:
-				design = "field"
+				design = self.tr("field")
 				value = unicode(self.cmbField.currentText())
 		elif mLayer.type() == mLayer.RasterLayer:
 			inLayer = QgsRasterLayer(unicode(mLayer.source(),'latin1'), unicode(mLayer.name(),'latin1'))
-			design = "unstratified"
+			design = self.tr("unstratified")
 			value = self.spnUnstratified.value()
 		else:
-			QMessageBox.information(self, "Random Points", "Unknown layer type...")
+			QMessageBox.information(self, self.tr("Random Points"), self.tr("Unknown layer type..."))
 		if self.chkMinimum.isChecked():
 			minimum = self.spnMinimum.value()
 		else:
@@ -123,8 +123,7 @@
 		self.randomize(inLayer, outPath, minimum, design, value, self.progressBar)
 		self.progressBar.setValue(100)
 		self.outShape.clear()
-		addToTOC = QMessageBox.question(self, "Random Points", "Created output point Shapefile:\n" + outPath 
-			+ "\n\nWould you like to add the new layer to the TOC?", QMessageBox.Yes, QMessageBox.No, QMessageBox.NoButton)
+		addToTOC = QMessageBox.question(self, self.tr("Random Points"), self.tr("Created output point shapefile:\n%1\n\nWould you like to add the new layer to the TOC?").arg(outPath), QMessageBox.Yes, QMessageBox.No, QMessageBox.NoButton)
 		if addToTOC == QMessageBox.Yes:
 			self.vlayer = QgsVectorLayer(outPath, unicode(outName), "ogr")
 			QgsMapLayerRegistry.instance().addMapLayer(self.vlayer)
@@ -181,7 +180,7 @@
 				if vlayer.isValid():
 					return vlayer
 				else:
-					QMessageBox.information(self, "Generate Centroids", "Vector layer is not valid")
+					QMessageBox.information(self, self.tr("Generate Centroids"), self.tr("Vector layer is not valid"))
 	
 # Get map layer by name from TOC     
     def getMapLayerByName(self, myName):
@@ -204,7 +203,7 @@
 
     def randomize(self, inLayer, outPath, minimum, design, value, progressBar):
 		outFeat = QgsFeature()
-		if design == "unstratified":
+		if design == self.tr("unstratified"):
 			ext = inLayer.extent()
 			if inLayer.type() == inLayer.RasterLayer: bound = ext
 			else: bound = self.createSinglePolygon(inLayer, progressBar)
@@ -245,10 +244,10 @@
 		add = 60.00 / sProvider.featureCount()
 		while sProvider.nextFeature(sFeat):
 			sGeom = sFeat.geometry()
-			if design == "density":
+			if design == self.tr("density"):
 				sDistArea = QgsDistanceArea()
 				value = int(round(numRand * sDistArea.measure(sGeom)))
-			elif design == "field":
+			elif design == self.tr("field"):
 				sAtMap = sFeat.attributeMap()
 				value = sAtMap[index].toInt()[0]
 			else:

Modified: trunk/qgis/python/plugins/fTools/tools/doRandom.py
===================================================================
--- trunk/qgis/python/plugins/fTools/tools/doRandom.py	2009-12-30 17:25:58 UTC (rev 12654)
+++ trunk/qgis/python/plugins/fTools/tools/doRandom.py	2009-12-31 09:57:28 UTC (rev 12655)
@@ -12,7 +12,7 @@
         # Set up the user interface from Designer.
         self.setupUi(self)
         QObject.connect(self.inShape, SIGNAL("currentIndexChanged(QString)"), self.changed)
-        self.setWindowTitle("Random selection")
+        self.setWindowTitle(self.tr("Random selection"))
         # populate layer list
         self.progressBar.setValue(0)
         mapCanvas = self.iface.mapCanvas()
@@ -29,7 +29,7 @@
 
     def accept(self):
 	if self.inShape.currentText() == "":
-	    QMessageBox.information(self, "Random Selection Tool", "No input shapefile specified")
+	    QMessageBox.information(self, self.tr("Random Selection Tool"), self.tr("No input shapefile specified"))
 	else:
             self.progressBar.setValue(10)
             inName = self.inShape.currentText()

Modified: trunk/qgis/python/plugins/fTools/tools/doReProject.py
===================================================================
--- trunk/qgis/python/plugins/fTools/tools/doReProject.py	2009-12-30 17:25:58 UTC (rev 12654)
+++ trunk/qgis/python/plugins/fTools/tools/doReProject.py	2009-12-31 09:57:28 UTC (rev 12655)
@@ -16,7 +16,7 @@
 		QObject.connect(self.btnProjection, SIGNAL("clicked()"), self.outProjFile)
 		QObject.connect(self.inShape, SIGNAL("currentIndexChanged(QString)"), self.updateProj1)
 		QObject.connect(self.cmbLayer, SIGNAL("currentIndexChanged(QString)"), self.updateProj2)
-		self.setWindowTitle("Export to new projection")
+		self.setWindowTitle( self.tr("Export to new projection") )
 		self.progressBar.setValue(0)
 		mapCanvas = self.iface.mapCanvas()
 		for i in range(mapCanvas.layerCount()):
@@ -37,13 +37,13 @@
 
 	def accept(self):
 		if self.inShape.currentText() == "":
-			QMessageBox.information(self, "Export to new projection", "No input layer specified")
+			QMessageBox.information(self, self.tr("Export to new projection"), self.tr("No input layer specified"))
 		elif self.outShape.text() == "":
-			QMessageBox.information(self, "Export to new projection", "Please specify output shapefile")
+			QMessageBox.information(self, self.tr("Export to new projection"), self.tr("Please specify output shapefile"))
 		elif self.txtProjection.text() == "" and self.rdoProjection.isChecked():
-			QMessageBox.information(self, "Define current projection", "Please specify spatial reference system")
+			QMessageBox.information(self, self.tr("Define current projection"), self.tr("Please specify spatial reference system"))
 		elif self.cmbLayer.currentText() == "" and self.rdoLayer.isChecked():
-			QMessageBox.information(self, "Define current projection", "Please specify spatial reference system")
+			QMessageBox.information(self, self.tr("Define current projection"), self.tr("Please specify spatial reference system"))
 		else:
 			inName = self.inShape.currentText()
 			self.progressBar.setValue(5)
@@ -58,8 +58,7 @@
 			if self.reProject(inName, unicode(outPath), unicode(outProj), self.rdoProjection.isChecked(), self.progressBar):
 				self.outShape.clear()
 				self.progressBar.setValue(100)
-				addToTOC = QMessageBox.question(self, "Export to new projection", "Created projected shapefile:\n" + outPath
-				+ "\n\nWould you like to add the new layer to the TOC?", QMessageBox.Yes, QMessageBox.No, QMessageBox.NoButton)
+				addToTOC = QMessageBox.question(self, self.tr("Export to new projection"), self.tr("Created projected shapefile:\n%1\n\nWould you like to add the new layer to the TOC?").arg( outPath ), QMessageBox.Yes, QMessageBox.No, QMessageBox.NoButton)
 				if addToTOC == QMessageBox.Yes:
 					self.vlayer = QgsVectorLayer(outPath, unicode(outName), "ogr")
 					QgsMapLayerRegistry.instance().addMapLayer(self.vlayer)
@@ -67,15 +66,15 @@
 
 	def outProjFile(self):
 		format = QString( "<h2>%1</h2>%2 <br/> %3" )
-		header = QString( "Choose output CRS:" )
-		sentence1 = QString( "Please select the projection system to be used by the output layer." )
-		sentence2 = QString( "Output layer will be projected from it's current CRS to the output CRS." )
+		header = self.tr( "Choose output CRS:" )
+		sentence1 = self.tr( "Please select the projection system to be used by the output layer." )
+		sentence2 = self.tr( "Output layer will be projected from it's current CRS to the output CRS." )
 		self.projSelect = QgsGenericProjectionSelector(self, Qt.Widget)
 		self.projSelect.setMessage( format.arg( header ).arg( sentence1 ).arg( sentence2 ))
 		if self.projSelect.exec_():
 			projString = self.projSelect.selectedProj4String()
 			if projString == "":
-				QMessageBox.information(self, "Export to new projection", "No Valid CRS selected")
+				QMessageBox.information(self, self.tr("Export to new projection"), self.tr("No Valid CRS selected"))
 				return
 			else:
 				self.txtProjection.clear()
@@ -105,7 +104,7 @@
 			destLayer = self.getVectorLayerByName(outProj)
 			crsDest = destLayer.dataProvider().crs()
 		if not crsDest.isValid():
-			QMessageBox.information(self, "Export to new projection", "Output spatial reference system is not valid")
+			QMessageBox.information(self, self.tr("Export to new projection"), self.tr("Output spatial reference system is not valid"))
 			return False
 		else:
 			progressBar.setValue(5)
@@ -122,7 +121,7 @@
 				if self.pointReproject(vlayer, xform, writer, progressBar): return True
 				else: return False
 			else:
-				QMessageBox.information(self, "Export to new projection", "Identical output spatial reference system chosen")
+				QMessageBox.information(self, self.tr("Export to new projection"), self.tr("Identical output spatial reference system chosen"))
 				return False
 
 # Gets vector layer by layername in canvas

Modified: trunk/qgis/python/plugins/fTools/tools/doRegPoints.py
===================================================================
--- trunk/qgis/python/plugins/fTools/tools/doRegPoints.py	2009-12-30 17:25:58 UTC (rev 12654)
+++ trunk/qgis/python/plugins/fTools/tools/doRegPoints.py	2009-12-31 09:57:28 UTC (rev 12655)
@@ -44,7 +44,7 @@
 		self.iface = iface
 		self.setupUi(self)
 		QObject.connect(self.toolOut, SIGNAL("clicked()"), self.outFile)
-		self.setWindowTitle("Regular points")
+		self.setWindowTitle( self.tr("Regular points") )
 		self.progressBar.setValue(0)
 		mapCanvas = self.iface.mapCanvas()
 		for i in range(mapCanvas.layerCount()):
@@ -53,11 +53,11 @@
 
 	def accept(self):
 		if not self.rdoCoordinates.isChecked() and self.inShape.currentText() == "":
-			QMessageBox.information(self, "Generate Regular Points", "Please specify input layer")
+			QMessageBox.information(self, self.tr("Generate Regular Points"), self.tr("Please specify input layer"))
 		elif self.rdoCoordinates.isChecked() and (self.xMin.text() == "" or self.xMax.text() == "" or self.yMin.text() == "" or self.yMax.text() == ""):
-			QMessageBox.information(self, "Generate Regular Points", "Please properly specify extent coordinates")
+			QMessageBox.information(self, self.tr("Generate Regular Points"), self.tr("Please properly specify extent coordinates"))
 		elif self.outShape.text() == "":
-			QMessageBox.information(self, "Generate Regular Points", "Please specify output shapefile")
+			QMessageBox.information(self, self.tr("Generate Regular Points"), self.tr("Please specify output shapefile"))
 		else:
 			inName = self.inShape.currentText()
 			outPath = self.outShape.text()
@@ -78,9 +78,7 @@
 			else:
 				boundBox = QgsRect(float(self.xMin.text()), float(self.yMin.text()), float(self.xMax.text()), float(self.yMax.text()))
 			self.regularize(boundBox, outPath, offset, value, self.rdoSpacing.isChecked(), self.spnInset.value(), self.progressBar)
-			addToTOC = QMessageBox.question(self, "Generate Regular Points", "Created output point Shapefile:\n" + outPath 
-			+ "\nNote: Layer has no associated coordinate system, please use the Projection Management Tool to specify spatial reference system."
-			+ "\n\nWould you like to add the new layer to the TOC?", QMessageBox.Yes, QMessageBox.No, QMessageBox.NoButton)
+			addToTOC = QMessageBox.question(self, self.tr("Generate Regular Points"), self.tr("Created output point shapefile:\n%1\n\nNote: Layer has no associated coordinate system, please use the Projection Management Tool to specify spatial reference system.\n\nWould you like to add the new layer to the TOC?").arg( outPath ), QMessageBox.Yes, QMessageBox.No, QMessageBox.NoButton)
 			if addToTOC == QMessageBox.Yes:
 				self.vlayer = QgsVectorLayer(outPath, unicode(outName), "ogr")
 				QgsMapLayerRegistry.instance().addMapLayer(self.vlayer)
@@ -116,7 +114,7 @@
 				if vlayer.isValid():
 					return vlayer
 				else:
-					QMessageBox.information(self, "Generate Regular Points", "Vector layer is not valid")
+					QMessageBox.information(self, self.tr("Generate Regular Points"), self.tr("Vector layer is not valid"))
 	
 # Get map layer by name from TOC     
 	def getMapLayerByName(self, myName):

Modified: trunk/qgis/python/plugins/fTools/tools/doSelectByLocation.py
===================================================================
--- trunk/qgis/python/plugins/fTools/tools/doSelectByLocation.py	2009-12-30 17:25:58 UTC (rev 12654)
+++ trunk/qgis/python/plugins/fTools/tools/doSelectByLocation.py	2009-12-31 09:57:28 UTC (rev 12655)
@@ -43,9 +43,9 @@
 
 	def accept(self):
 		if self.inPolygon.currentText() == "":
-			QMessageBox.information(self, "Select by location", self.tr( "Please specify input layer"))
+			QMessageBox.information(self, self.tr("Select by location"), self.tr( "Please specify input layer"))
 		elif self.inPoint.currentText() == "":
-			QMessageBox.information(self, "Select by location", self.tr("Please specify select layer"))
+			QMessageBox.information(self, self.tr("Select by location"), self.tr("Please specify select layer"))
 		else:
 			inPoly = self.inPolygon.currentText()
 			inPts = self.inPoint.currentText()
@@ -68,9 +68,9 @@
 			geom = QgsGeometry(feat.geometry())
 			if geom.intersects(geomLayer):
 				selectedSet.append(feat.id())
-		if modify == "adding to current selection":
+		if modify == self.tr("adding to current selection"):
 			selectedSet = list(set(inputLayer.selectedFeaturesIds()).union(selectedSet))
-		elif modify == "removing from current selection":
+		elif modify == self.tr("removing from current selection"):
 			selectedSet = list(set(inputLayer.selectedFeaturesIds()).difference(selectedSet))
 		inputLayer.setSelectedFeatures(selectedSet)
 				

Modified: trunk/qgis/python/plugins/fTools/tools/doSpatialJoin.py
===================================================================
--- trunk/qgis/python/plugins/fTools/tools/doSpatialJoin.py	2009-12-30 17:25:58 UTC (rev 12654)
+++ trunk/qgis/python/plugins/fTools/tools/doSpatialJoin.py	2009-12-31 09:57:28 UTC (rev 12655)
@@ -46,7 +46,7 @@
 		# Set up the user interface from Designer.
 		self.setupUi(self)
 		QObject.connect(self.toolOut, SIGNAL("clicked()"), self.outFile)
-		self.setWindowTitle("Join attributes by location")
+		self.setWindowTitle( self.tr("Join attributes by location") )
 		# populate layer list
 		self.progressBar.setValue(0)
 		mapCanvas = self.iface.mapCanvas()
@@ -58,13 +58,13 @@
 		
 	def accept(self):
 		if self.inShape.currentText() == "":
-			QMessageBox.information(self, "Spatial Join", "Please specify target vector layer")
+			QMessageBox.information(self, self.tr("Spatial Join"), self.tr("Please specify target vector layer") )
 		elif self.outShape.text() == "":
-			QMessageBox.information(self, "Spatial Join", "Please specify output shapefile")
+			QMessageBox.information(self, self.tr("Spatial Join"), self.tr("Please specify output shapefile") )
 		elif self.joinShape.currentText() == "":
-			QMessageBox.information(self, "Spatial Join", "Please specify join vector layer")
+			QMessageBox.information(self, self.tr("Spatial Join"), self.tr("Please specify join vector layer") )
 		elif self.rdoSummary.isChecked() and not (self.chkMean.isChecked() or self.chkSum.isChecked() or self.chkMin.isChecked() or self.chkMax.isChecked() or self.chkMean.isChecked()):
-			QMessageBox.information(self, "Spatial Join", "Please specify at least one summary statistic")
+			QMessageBox.information(self, self.tr("Spatial Join"), self.tr("Please specify at least one summary statistic") )
 		else:
 			inName = self.inShape.currentText()
 			joinName = self.joinShape.currentText()
@@ -89,8 +89,7 @@
 				outName = outName.left(outName.length() - 4)
 			self.compute(inName, joinName, outPath, summary, sumList, keep, self.progressBar)
 			self.outShape.clear()
-			addToTOC = QMessageBox.question(self, "Spatial Join", "Created output Shapefile:\n" + outPath 
-			+ "\n\nWould you like to add the new layer to the TOC?", QMessageBox.Yes, QMessageBox.No, QMessageBox.NoButton)
+			addToTOC = QMessageBox.question(self, self.tr("Spatial Join"), self.tr("Created output shapefile:\n%1\n\nWould you like to add the new layer to the TOC?").arg(unicode(outPath)), QMessageBox.Yes, QMessageBox.No, QMessageBox.NoButton)
 			if addToTOC == QMessageBox.Yes:
 				self.vlayer = QgsVectorLayer(outPath, unicode(outName), "ogr")
 				QgsMapLayerRegistry.instance().addMapLayer(self.vlayer)
@@ -117,7 +116,7 @@
 		fieldList2 = self.getFieldList(layer2)
 		fieldList = []
 		if provider1.crs() <> provider2.crs():
-			QMessageBox.warning(self, "CRS warning!", "Warning: Input layers have non-matching CRS.\nThis may cause unexpected results.")
+			QMessageBox.warning(self, self.tr("CRS warning!"), self.tr("Warning: Input layers have non-matching CRS.\nThis may cause unexpected results."))
 		if not summary:
 			fieldList2 = self.testForUniqueness(fieldList1, fieldList2.values())
 			seq = range(0, len(fieldList1) + len(fieldList2))
@@ -129,9 +128,9 @@
 				if fieldList2[j].type() == QVariant.Int or fieldList2[j].type() == QVariant.Double:
 					numFields[j] = []
 					for i in sumList:
-						field = QgsField(i + unicode(fieldList2[j].name()), QVariant.Double, "real", 24, 16, "Summary field")
+						field = QgsField(i + unicode(fieldList2[j].name()), QVariant.Double, "real", 24, 16, self.tr("Summary field") )
 						fieldList.append(field)
-			field = QgsField("COUNT", QVariant.Double, "real", 24, 16, "Summary field")
+			field = QgsField("COUNT", QVariant.Double, "real", 24, 16, self.tr("Summary field") )
 			fieldList.append(field)
 			fieldList2 = self.testForUniqueness(fieldList1, fieldList)
 			fieldList1.extend(fieldList)
@@ -251,7 +250,7 @@
 				if vlayer.isValid():
 					return vlayer
 				else:
-					QMessageBox.information(self, "Spatial Join", "Vector layer is not valid")
+					QMessageBox.information(self, self.tr("Spatial Join"), self.tr("Vector layer is not valid"))
 
 	def getFieldList(self, vlayer):
 		fProvider = vlayer.dataProvider()

Modified: trunk/qgis/python/plugins/fTools/tools/doSubsetSelect.py
===================================================================
--- trunk/qgis/python/plugins/fTools/tools/doSubsetSelect.py	2009-12-30 17:25:58 UTC (rev 12654)
+++ trunk/qgis/python/plugins/fTools/tools/doSubsetSelect.py	2009-12-31 09:57:28 UTC (rev 12655)
@@ -1,6 +1,6 @@
 #-----------------------------------------------------------
 # 
-# Random Selection Within Subsets
+# Random selection within subsets
 #
 # A QGIS plugin for randomly selecting features from 
 # within multiple user defined subsets based on an input field.
@@ -43,7 +43,7 @@
 		# Set up the user interface from Designer.
 		self.setupUi(self)
 		QObject.connect(self.inShape, SIGNAL("currentIndexChanged(QString)"), self.update)		
-		self.setWindowTitle("Random selection within subsets")
+		self.setWindowTitle(self.tr("Random selection within subsets"))
 		# populate layer list
 		self.progressBar.setValue(0)
 		mapCanvas = self.iface.mapCanvas()
@@ -61,9 +61,9 @@
 
 	def accept(self):
 		if self.inShape.currentText() == "":
-			QMessageBox.information(self, "Random Selection Within Subsets", "Please specify input vector layer")
+			QMessageBox.information(self, self.tr("Random selection within subsets"), self.tr("Please specify input vector layer"))
 		elif self.inField.currentText() == "":
-			QMessageBox.information(self, "Random Selection Within Subsets", "Please specify an input field")
+			QMessageBox.information(self, self.tr("Random selection within subsets"), self.tr("Please specify an input field"))
 		else:
 			inVect = self.inShape.currentText()
 			uidField = self.inField.currentText()
@@ -81,10 +81,10 @@
 		self.outShape.clear()
 		fileDialog = QFileDialog()
 		fileDialog.setConfirmOverwrite(False)
-		outName = fileDialog.getSaveFileName(self, "Output Shapefile",".", "Shapefiles (*.shp)")
+		outName = fileDialog.getSaveFileName(self, self.tr("Output Shapefile"),".", self.tr("Shapefiles (*.shp)"))
 		fileCheck = QFile(outName)
 		if fileCheck.exists():
-			QMessageBox.warning(self, "Random Selection Within Subsets", "Cannot overwrite existing shapefile...")
+			QMessageBox.warning(self, self.tr("Random selection within subsets"), self.tr("Cannot overwrite existing shapefile..."))
 		else:
 			filePath = QFileInfo(outName).absoluteFilePath()
 			if filePath.right(4) != ".shp": filePath = filePath + ".shp"
@@ -139,7 +139,7 @@
 				if vlayer.isValid():
 					return vlayer
 				else:
-					QMessageBox.information(self, "Random Selection Within Subsets", "Vector layer is not valid")
+					QMessageBox.information(self, self.tr("Random selection within subsets"), self.tr("Vector layer is not valid"))
 
 	def getMapLayerByName(self, myName):
 		mc = self.iface.mapCanvas()

Modified: trunk/qgis/python/plugins/fTools/tools/doSumLines.py
===================================================================
--- trunk/qgis/python/plugins/fTools/tools/doSumLines.py	2009-12-30 17:25:58 UTC (rev 12654)
+++ trunk/qgis/python/plugins/fTools/tools/doSumLines.py	2009-12-31 09:57:28 UTC (rev 12655)
@@ -58,13 +58,13 @@
 		
 	def accept(self):
 		if self.inPolygon.currentText() == "":
-			QMessageBox.information(self, "Sum Line Lengths In Polyons", "Please specify input polygon vector layer")
+			QMessageBox.information(self, self.tr("Sum Line Lengths In Polyons"), self.tr("Please specify input polygon vector layer"))
 		elif self.outShape.text() == "":
-			QMessageBox.information(self, "Sum Line Lengths In Polyons", "Please specify output shapefile")
+			QMessageBox.information(self, self.tr("Sum Line Lengths In Polyons"), self.tr("Please specify output shapefile"))
 		elif self.inPoint.currentText() == "":
-			QMessageBox.information(self, "Sum Line Lengths In Polyons", "Please specify input line vector layer")
+			QMessageBox.information(self, self.tr("Sum Line Lengths In Polyons"), self.tr("Please specify input line vector layer"))
 		elif self.lnField.text() == "":
-			QMessageBox.information(self, "Sum Line Lengths In Polyons", "Please specify output length field")
+			QMessageBox.information(self, self.tr("Sum Line Lengths In Polyons"), self.tr("Please specify output length field"))
 		else:
 			inPoly = self.inPolygon.currentText()
 			inLns = self.inPoint.currentText()
@@ -78,8 +78,7 @@
 				outName = outName.left(outName.length() - 4)
 			self.compute(inPoly, inLns, inField, outPath, self.progressBar)
 			self.outShape.clear()
-			addToTOC = QMessageBox.question(self, "Sum line lengths", "Created output shapefile:\n" + outPath 
-			+ "\n\nWould you like to add the new layer to the TOC?", QMessageBox.Yes, QMessageBox.No, QMessageBox.NoButton)
+			addToTOC = QMessageBox.question(self, self.tr("Sum line lengths"), self.tr("Created output shapefile:\n%1\n\nWould you like to add the new layer to the TOC?").arg(unicode(outPath)), QMessageBox.Yes, QMessageBox.No, QMessageBox.NoButton)
 			if addToTOC == QMessageBox.Yes:
 				self.vlayer = QgsVectorLayer(outPath, unicode(outName), "ogr")
 				QgsMapLayerRegistry.instance().addMapLayer(self.vlayer)
@@ -98,7 +97,7 @@
 		polyProvider = polyLayer.dataProvider()
 		lineProvider = lineLayer.dataProvider()
 		if polyProvider.crs() <> lineProvider.crs():
-			QMessageBox.warning(self, "CRS warning!", "Warning: Input layers have non-matching CRS.\nThis may cause unexpected results.")
+			QMessageBox.warning(self, self.tr("CRS warning!"), self.tr("Warning: Input layers have non-matching CRS.\nThis may cause unexpected results."))
 		allAttrs = polyProvider.attributeIndexes()
 		polyProvider.select(allAttrs)
 		allAttrs = lineProvider.attributeIndexes()
@@ -107,7 +106,7 @@
 		index = polyProvider.fieldNameIndex(unicode(inField))
 		if index == -1:
 			index = polyProvider.fieldCount()
-			field = QgsField(unicode(inField), QVariant.Int, "real", 24, 15, "length field")
+			field = QgsField(unicode(inField), QVariant.Int, "real", 24, 15, self.tr("length field"))
 			fieldList[index] = field
 		sRs = polyProvider.crs()
 		inFeat = QgsFeature()
@@ -157,7 +156,7 @@
 				if vlayer.isValid():
 					return vlayer
 				else:
-					QMessageBox.information(self, "Sum Line Lengths In Polyons", "Vector layer is not valid")
+					QMessageBox.information(self, self.tr("Sum Line Lengths In Polyons"), self.tr("Vector layer is not valid"))
 
 	def getFieldList(self, vlayer):
 		fProvider = vlayer.dataProvider()

Modified: trunk/qgis/python/plugins/fTools/tools/doVectorGrid.py
===================================================================
--- trunk/qgis/python/plugins/fTools/tools/doVectorGrid.py	2009-12-30 17:25:58 UTC (rev 12654)
+++ trunk/qgis/python/plugins/fTools/tools/doVectorGrid.py	2009-12-31 09:57:28 UTC (rev 12655)
@@ -45,7 +45,7 @@
 		#QObject.connect(self.inShape, SIGNAL("currentIndexChanged(QString)"), self.updateInput)
 		QObject.connect(self.btnUpdate, SIGNAL("clicked()"), self.updateLayer)
 		QObject.connect(self.btnCanvas, SIGNAL("clicked()"), self.updateCanvas)
-		self.setWindowTitle("Vector grid")
+		self.setWindowTitle(self.tr("Vector grid"))
 		self.xMin.setValidator(QDoubleValidator(self.xMin))
 		self.xMax.setValidator(QDoubleValidator(self.xMax))
 		self.yMin.setValidator(QDoubleValidator(self.yMin))
@@ -78,9 +78,9 @@
 
 	def accept(self):
 		if self.xMin.text() == "" or self.xMax.text() == "" or self.yMin.text() == "" or self.yMax.text() == "":
-			QMessageBox.information(self, "Vector grid", "Please specify valid extent coordinates")
+			QMessageBox.information(self, self.tr("Vector grid"), self.tr("Please specify valid extent coordinates"))
 		elif self.outShape.text() == "":
-			QMessageBox.information(self, "Vector grid", "Please specify output shapefile")
+			QMessageBox.information(self, self.tr("Vector grid"), self.tr("Please specify output shapefile"))
 		else:
 			try:
 				boundBox = QgsRectangle( 
@@ -89,19 +89,14 @@
 				float( self.xMax.text() ),
 				float( self.yMax.text() ) )
 			except:
-				QMessageBox.information(self, "Vector grid", "Invalid extent coordinates entered")
+				QMessageBox.information(self, self.tr("Vector grid"), self.tr("Invalid extent coordinates entered"))
 			xSpace = self.spnX.value()
 			ySpace = self.spnY.value()
 			if self.rdoPolygons.isChecked(): polygon = True
 			else: polygon = False
 			self.outShape.clear()
 			self.compute( boundBox, xSpace, ySpace, polygon )
-			addToTOC = QMessageBox.question(self, 
-			"Generate Vector Grid", "Created output Shapefile:\n" + self.shapefileName 
-			+ "\nNote: Layer has no associated coordinate system, please use "
-			+ "the Projection Management Tool to specify spatial reference system."
-			+ "\n\nWould you like to add the new layer to the TOC?", 
-			QMessageBox.Yes, QMessageBox.No, QMessageBox.NoButton)
+			addToTOC = QMessageBox.question(self, self.tr("Generate Vector Grid"), self.tr("Created output shapefile:\n%1\n\nNote: Layer has no associated coordinate system, please use the Projection Management Tool to specify spatial reference system.\n\nWould you like to add the new layer to the TOC?").arg(unicode(self.shapefileName)), QMessageBox.Yes, QMessageBox.No, QMessageBox.NoButton)
 			if addToTOC == QMessageBox.Yes:
 				ftools_utils.addShapeToCanvas( self.shapefileName )
 			self.progressBar.setValue( 0 )

Modified: trunk/qgis/python/plugins/fTools/tools/doVectorSplit.py
===================================================================
--- trunk/qgis/python/plugins/fTools/tools/doVectorSplit.py	2009-12-30 17:25:58 UTC (rev 12654)
+++ trunk/qgis/python/plugins/fTools/tools/doVectorSplit.py	2009-12-31 09:57:28 UTC (rev 12655)
@@ -42,7 +42,7 @@
 		self.setupUi(self)
 		QObject.connect(self.toolOut, SIGNAL("clicked()"), self.outFile)
 		QObject.connect(self.inShape, SIGNAL("currentIndexChanged(QString)"), self.update)
-		self.setWindowTitle("Split vector layer")
+		self.setWindowTitle(self.tr("Split vector layer"))
 		# populate layer list
 		self.progressBar.setValue(0)
 		mapCanvas = self.iface.mapCanvas()
@@ -60,9 +60,9 @@
 
 	def accept(self):
 		if self.inShape.currentText() == "":
-			QMessageBox.information(self, "Vector Split", "No input shapefile specified")
+			QMessageBox.information(self, self.tr("Vector Split"), self.tr("No input shapefile specified"))
 		elif self.outShape.text() == "":
-			QMessageBox.information(self, "Vector Split", "Please specify output shapefile")
+			QMessageBox.information(self, self.tr("Vector Split"), self.tr("Please specify output shapefile"))
 		else:
 			inField = self.inField.currentText()
 			inLayer = self.getVectorLayerByName(unicode(self.inShape.currentText()))
@@ -76,7 +76,7 @@
 			self.split(inLayer, unicode(outPath), unicode(inField), self.progressBar)
 			self.progressBar.setValue(100)
 			self.outShape.clear()
-			QMessageBox.information(self, "Vector Split", "Created output shapefiles in folder:\n" + unicode(outPath))
+			QMessageBox.information(self, self.tr("Vector Split"), self.tr("Created output shapefiles in folder:\n%1").arg( outPath))
 			self.progressBar.setValue(0)
 
 	def outFile(self):

Modified: trunk/qgis/python/plugins/fTools/tools/doVisual.py
===================================================================
--- trunk/qgis/python/plugins/fTools/tools/doVisual.py	2009-12-30 17:25:58 UTC (rev 12654)
+++ trunk/qgis/python/plugins/fTools/tools/doVisual.py	2009-12-31 09:57:28 UTC (rev 12655)
@@ -56,9 +56,9 @@
         
   def accept( self ):
     if self.inShape.currentText() == "":
-      QMessageBox.information( self, "Error!", self.tr( "Please specify input vector layer" ) )
+      QMessageBox.information( self, self.tr("Error!"), self.tr( "Please specify input vector layer" ) )
     elif self.cmbField.isVisible() and self.cmbField.currentText() == "":
-      QMessageBox.information( self, "Error!", self.tr( "Please specify input field" ) )
+      QMessageBox.information( self, self.tr("Error!"), self.tr( "Please specify input field" ) )
     else:
       self.visual( self.inShape.currentText(), self.cmbField.currentText(), self.useSelected.checkState() )
   
@@ -115,7 +115,7 @@
     QObject.connect( self.testThread, SIGNAL( "runRange(PyQt_PyObject)" ), self.runRangeFromThread )
     QObject.connect( self.testThread, SIGNAL( "runPartRange(PyQt_PyObject)" ), self.runPartRangeFromThread )
     QObject.connect( self.testThread, SIGNAL( "runPartStatus(PyQt_PyObject)" ), self.runPartStatusFromThread )
-    self.cancel_close.setText( "Cancel" )
+    self.cancel_close.setText( self.tr("Cancel") )
     QObject.connect( self.cancel_close, SIGNAL( "clicked()" ), self.cancelThread )
     self.testThread.start()
     return True
@@ -142,7 +142,7 @@
 	self.tblUnique.setItem( rec, 0, item )
 	item = QTableWidgetItem( tmp[ 1 ] )
 	self.tblUnique.setItem( rec, 1, item )
-	self.tblUnique.setHorizontalHeaderLabels( [ "Parameter", "Value" ] )
+	self.tblUnique.setHorizontalHeaderLabels( [ self.tr("Parameter"), self.tr("Value") ] )
 	self.tblUnique.horizontalHeader().setResizeMode( 1, QHeaderView.ResizeToContents )
 	self.tblUnique.horizontalHeader().show()
     self.tblUnique.horizontalHeader().setResizeMode( 0, QHeaderView.Stretch )



More information about the QGIS-commit mailing list