@@ -40,14 +40,16 @@ void QgsMapToolAddIsland::canvasReleaseEvent( QMouseEvent * e )
40
40
41
41
if ( !vlayer )
42
42
{
43
- QMessageBox::information ( 0 , tr ( " Not a vector layer" ),
43
+ QMessageBox::information ( 0 ,
44
+ tr ( " Not a vector layer" ),
44
45
tr ( " The current layer is not a vector layer" ) );
45
46
return ;
46
47
}
47
48
48
49
if ( !vlayer->isEditable () )
49
50
{
50
- QMessageBox::information ( 0 , tr ( " Layer not editable" ),
51
+ QMessageBox::information ( 0 ,
52
+ tr ( " Layer not editable" ),
51
53
tr ( " Cannot edit the vector layer. To make it editable, go to the file item "
52
54
" of the layer, right click and check 'Allow Editing'." ) );
53
55
return ;
@@ -58,11 +60,11 @@ void QgsMapToolAddIsland::canvasReleaseEvent( QMouseEvent * e )
58
60
QString selectionErrorMsg;
59
61
if ( nSelectedFeatures < 1 )
60
62
{
61
- selectionErrorMsg = " No feature selected. Please select a feature with the selection tool or in the attribute table" ;
63
+ selectionErrorMsg = tr ( " No feature selected. Please select a feature with the selection tool or in the attribute table" ) ;
62
64
}
63
65
else if ( nSelectedFeatures > 1 )
64
66
{
65
- selectionErrorMsg = " Several features are selected. Please select only one feature to which an island should be added." ;
67
+ selectionErrorMsg = tr ( " Several features are selected. Please select only one feature to which an island should be added." ) ;
66
68
}
67
69
68
70
if ( !selectionErrorMsg.isEmpty () )
@@ -84,7 +86,8 @@ void QgsMapToolAddIsland::canvasReleaseEvent( QMouseEvent * e )
84
86
else if ( error == 2 )
85
87
{
86
88
// problem with coordinate transformation
87
- QMessageBox::information ( 0 , tr ( " Coordinate transform error" ),
89
+ QMessageBox::information ( 0 ,
90
+ tr ( " Coordinate transform error" ),
88
91
tr ( " Cannot transform the point to the layers coordinate system" ) );
89
92
return ;
90
93
}
@@ -110,27 +113,27 @@ void QgsMapToolAddIsland::canvasReleaseEvent( QMouseEvent * e )
110
113
{
111
114
if ( errorCode == 1 )
112
115
{
113
- errorMessage = " Selected feature is not a multipolygon" ;
116
+ errorMessage = tr ( " Selected feature is not a multipolygon" ) ;
114
117
}
115
118
else if ( errorCode == 2 )
116
119
{
117
- errorMessage = " New ring is not a valid geometry" ;
120
+ errorMessage = tr ( " New ring is not a valid geometry" ) ;
118
121
}
119
122
else if ( errorCode == 3 )
120
123
{
121
- errorMessage = " New polygon ring not disjoint with existing polygons" ;
124
+ errorMessage = tr ( " New polygon ring not disjoint with existing polygons" ) ;
122
125
}
123
126
else if ( errorCode == 4 )
124
127
{
125
- errorMessage = " No feature selected. Please select a feature with the selection tool or in the attribute table" ;
128
+ errorMessage = tr ( " No feature selected. Please select a feature with the selection tool or in the attribute table" ) ;
126
129
}
127
130
else if ( errorCode == 5 )
128
131
{
129
- errorMessage = " Several features are selected. Please select only one feature to which an island should be added." ;
132
+ errorMessage = tr ( " Several features are selected. Please select only one feature to which an island should be added." ) ;
130
133
}
131
134
else if ( errorCode == 6 )
132
135
{
133
- errorMessage = " Selected geometry could not be found" ;
136
+ errorMessage = tr ( " Selected geometry could not be found" ) ;
134
137
}
135
138
QMessageBox::critical ( 0 , tr ( " Error, could not add island" ), errorMessage );
136
139
}
0 commit comments