1
- from PyQt4 .QtCore import *
1
+ from PyQt4 .QtCore import *
2
2
from PyQt4 .QtGui import *
3
3
4
4
from qgis .core import *
@@ -21,20 +21,20 @@ def __init__(self, iface):
21
21
self .inPolygon .addItem (layer .name ())
22
22
self .inPoint .addItem (layer .name ())
23
23
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" ) ])
25
25
26
26
def updateUI (self ):
27
27
self .label_5 .setVisible (False )
28
28
self .lnField .setVisible (False )
29
29
self .outShape .setVisible (False )
30
30
self .toolOut .setVisible (False )
31
31
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:" ) )
35
35
self .label_mod = QLabel (self )
36
36
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:" ) )
38
38
self .cmbModify = QComboBox (self )
39
39
self .cmbModify .setObjectName ("cmbModify" )
40
40
self .gridlayout .addWidget (self .label_mod ,2 ,0 ,1 ,1 )
@@ -43,9 +43,9 @@ def updateUI(self):
43
43
44
44
def accept (self ):
45
45
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" ) )
47
47
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" ) )
49
49
else :
50
50
inPoly = self .inPolygon .currentText ()
51
51
inPts = self .inPoint .currentText ()
0 commit comments