Skip to content

Commit eb02422

Browse files
author
cfarmer
committed
Applies patch to add several new strings from the fTools modules to the qgis_xx.ts files; Patch provided by Carlos Davila
git-svn-id: http://svn.osgeo.org/qgis/trunk@11365 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 9c89ced commit eb02422

File tree

4 files changed

+17
-17
lines changed

4 files changed

+17
-17
lines changed

python/plugins/fTools/tools/doPointDistance.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#-----------------------------------------------------------
1+
#-----------------------------------------------------------
22
#
33
# Create Point Distance Matrix
44
#
@@ -49,7 +49,7 @@ def __init__(self, iface):
4949
QObject.connect(self.inPoint1, SIGNAL("currentIndexChanged(QString)"), self.update1)
5050
QObject.connect(self.inPoint2, SIGNAL("currentIndexChanged(QString)"), self.update2)
5151
# populate layer list
52-
self.setWindowTitle("Distance matrix")
52+
self.setWindowTitle(self.tr("Distance matrix"))
5353
self.progressBar.setValue(0)
5454
mapCanvas = self.iface.mapCanvas()
5555
for i in range(mapCanvas.layerCount()):
@@ -104,7 +104,7 @@ def accept(self):
104104
self.outFile.clear()
105105
self.compute(point1, point2, field1, field2, outPath, matType, nearest, self.progressBar)
106106
self.progressBar.setValue(100)
107-
addToTOC = QMessageBox.information(self, "Create Point Distance Matrix", "Created output matrix:\n" + outPath)
107+
addToTOC = QMessageBox.information(self, "Create Point Distance Matrix", self.tr("Created output matrix:\n") + outPath)
108108
self.progressBar.setValue(0)
109109

110110
def saveFile(self):

python/plugins/fTools/tools/doPointsInPolygon.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#-----------------------------------------------------------
1+
#-----------------------------------------------------------
22
#
33
# Points in Polygon
44
#
@@ -44,7 +44,7 @@ def __init__(self, iface):
4444
# Set up the user interface from Designer.
4545
self.setupUi(self)
4646
QObject.connect(self.toolOut, SIGNAL("clicked()"), self.outFile)
47-
self.setWindowTitle("Points in polygon")
47+
self.setWindowTitle(self.tr("Points in polygon"))
4848
# populate layer list
4949
self.progressBar.setValue(0)
5050
mapCanvas = self.iface.mapCanvas()
@@ -78,7 +78,7 @@ def accept(self):
7878
outName = outName.left(outName.length() - 4)
7979
self.compute(inPoly, inPts, inField, outPath, self.progressBar)
8080
self.outShape.clear()
81-
addToTOC = QMessageBox.question(self, "Count Points in Polygons", "Created output Shapefile:\n" + outPath
81+
addToTOC = QMessageBox.question(self, "Count Points in Polygons", self.tr("Created output Shapefile:\n") + outPath
8282
+ "\n\nWould you like to add the new layer to the TOC?", QMessageBox.Yes, QMessageBox.No, QMessageBox.NoButton)
8383
if addToTOC == QMessageBox.Yes:
8484
self.vlayer = QgsVectorLayer(outPath, unicode(outName), "ogr")
@@ -154,7 +154,7 @@ def getVectorLayerByName(self, myName):
154154
if vlayer.isValid():
155155
return vlayer
156156
else:
157-
QMessageBox.information(self, "Counts Points In Polygons", "Vector layer is not valid")
157+
QMessageBox.information(self, "Counts Points In Polygons", self.tr("Vector layer is not valid"))
158158

159159
def getFieldList(self, vlayer):
160160
fProvider = vlayer.dataProvider()

python/plugins/fTools/tools/doSelectByLocation.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
from PyQt4.QtCore import *
1+
from PyQt4.QtCore import *
22
from PyQt4.QtGui import *
33

44
from qgis.core import *
@@ -21,20 +21,20 @@ def __init__(self, iface):
2121
self.inPolygon.addItem(layer.name())
2222
self.inPoint.addItem(layer.name())
2323
self.updateUI()
24-
self.cmbModify.addItems(["creating new selection", "adding to current selection", "removing from current selection"])
24+
self.cmbModify.addItems([self.tr("creating new selection"), self.tr("adding to current selection"), self.tr("removing from current selection")])
2525

2626
def updateUI(self):
2727
self.label_5.setVisible(False)
2828
self.lnField.setVisible(False)
2929
self.outShape.setVisible(False)
3030
self.toolOut.setVisible(False)
3131
self.label_2.setVisible(False)
32-
self.setWindowTitle("Select by location")
33-
self.label_3.setText("Select features in:")
34-
self.label_4.setText("that intersect features in:")
32+
self.setWindowTitle(self.tr("Select by location"))
33+
self.label_3.setText(self.tr("Select features in:"))
34+
self.label_4.setText(self.tr("that intersect features in:"))
3535
self.label_mod = QLabel(self)
3636
self.label_mod.setObjectName("label_mod")
37-
self.label_mod.setText("Modify current selection by:")
37+
self.label_mod.setText(self.tr("Modify current selection by:"))
3838
self.cmbModify = QComboBox(self)
3939
self.cmbModify.setObjectName("cmbModify")
4040
self.gridlayout.addWidget(self.label_mod,2,0,1,1)
@@ -43,9 +43,9 @@ def updateUI(self):
4343

4444
def accept(self):
4545
if self.inPolygon.currentText() == "":
46-
QMessageBox.information(self, "Select by location", "Please specify input layer")
46+
QMessageBox.information(self, "Select by location", self.tr( "Please specify input layer"))
4747
elif self.inPoint.currentText() == "":
48-
QMessageBox.information(self, "Select by location", "Please specify select layer")
48+
QMessageBox.information(self, "Select by location", self.tr("Please specify select layer"))
4949
else:
5050
inPoly = self.inPolygon.currentText()
5151
inPts = self.inPoint.currentText()

python/plugins/fTools/tools/doSumLines.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#-----------------------------------------------------------
1+
#-----------------------------------------------------------
22
#
33
# Sum Lines In Polygons
44
#
@@ -44,7 +44,7 @@ def __init__(self, iface):
4444
# Set up the user interface from Designer.
4545
self.setupUi(self)
4646
QObject.connect(self.toolOut, SIGNAL("clicked()"), self.outFile)
47-
self.setWindowTitle("Sum line lengths")
47+
self.setWindowTitle(self.tr("Sum line lengths"))
4848
# populate layer list
4949
self.progressBar.setValue(0)
5050
mapCanvas = self.iface.mapCanvas()

0 commit comments

Comments
 (0)