@@ -78,11 +78,11 @@ void QgsStyleV2ManagerDialog::populateTypes()
78
78
}
79
79
80
80
cboItemType->clear ();
81
- cboItemType->addItem ( QString ( " Marker symbol (%1)" ).arg ( markerCount ), QVariant ( QgsSymbolV2::Marker ) );
82
- cboItemType->addItem ( QString ( " Line symbol (%1)" ).arg ( lineCount ), QVariant ( QgsSymbolV2::Line ) );
83
- cboItemType->addItem ( QString ( " Fill symbol (%1)" ).arg ( fillCount ), QVariant ( QgsSymbolV2::Fill ) );
81
+ cboItemType->addItem ( tr ( " Marker symbol (%1)" ).arg ( markerCount ), QVariant ( QgsSymbolV2::Marker ) );
82
+ cboItemType->addItem ( tr ( " Line symbol (%1)" ).arg ( lineCount ), QVariant ( QgsSymbolV2::Line ) );
83
+ cboItemType->addItem ( tr ( " Fill symbol (%1)" ).arg ( fillCount ), QVariant ( QgsSymbolV2::Fill ) );
84
84
85
- cboItemType->addItem ( QString ( " Color ramp (%1)" ).arg ( mStyle ->colorRampCount () ), QVariant ( 3 ) );
85
+ cboItemType->addItem ( tr ( " Color ramp (%1)" ).arg ( mStyle ->colorRampCount () ), QVariant ( 3 ) );
86
86
87
87
// update current index to previous selection
88
88
cboItemType->setCurrentIndex ( current );
@@ -207,8 +207,8 @@ bool QgsStyleV2ManagerDialog::addSymbol()
207
207
208
208
// get name
209
209
bool ok;
210
- QString name = QInputDialog::getText ( this , " Symbol name" ,
211
- " Please enter name for new symbol:" , QLineEdit::Normal, " new symbol" , &ok );
210
+ QString name = QInputDialog::getText ( this , tr ( " Symbol name" ) ,
211
+ tr ( " Please enter name for new symbol:" ) , QLineEdit::Normal, tr ( " new symbol" ) , &ok );
212
212
if ( !ok || name.isEmpty () )
213
213
{
214
214
delete symbol;
@@ -225,15 +225,15 @@ bool QgsStyleV2ManagerDialog::addColorRamp()
225
225
{
226
226
// let the user choose the color ramp type
227
227
QStringList rampTypes;
228
- rampTypes << " Gradient" << " Random" << " ColorBrewer" ;
228
+ rampTypes << tr ( " Gradient" ) << tr ( " Random" ) << tr ( " ColorBrewer" ) ;
229
229
bool ok;
230
- QString rampType = QInputDialog::getItem ( this , " Color ramp type" ,
231
- " Please select color ramp type:" , rampTypes, 0 , false , &ok );
230
+ QString rampType = QInputDialog::getItem ( this , tr ( " Color ramp type" ) ,
231
+ tr ( " Please select color ramp type:" ) , rampTypes, 0 , false , &ok );
232
232
if ( !ok || rampType.isEmpty () )
233
233
return false ;
234
234
235
235
QgsVectorColorRampV2 *ramp = NULL ;
236
- if ( rampType == " Gradient" )
236
+ if ( rampType == tr ( " Gradient" ) )
237
237
{
238
238
QgsVectorGradientColorRampV2* gradRamp = new QgsVectorGradientColorRampV2 ();
239
239
QgsVectorGradientColorRampV2Dialog dlg ( gradRamp, this );
@@ -244,7 +244,7 @@ bool QgsStyleV2ManagerDialog::addColorRamp()
244
244
}
245
245
ramp = gradRamp;
246
246
}
247
- else if ( rampType == " Random" )
247
+ else if ( rampType == tr ( " Random" ) )
248
248
{
249
249
QgsVectorRandomColorRampV2* randRamp = new QgsVectorRandomColorRampV2 ();
250
250
QgsVectorRandomColorRampV2Dialog dlg ( randRamp, this );
@@ -255,7 +255,7 @@ bool QgsStyleV2ManagerDialog::addColorRamp()
255
255
}
256
256
ramp = randRamp;
257
257
}
258
- else if ( rampType == " ColorBrewer" )
258
+ else if ( rampType == tr ( " ColorBrewer" ) )
259
259
{
260
260
QgsVectorColorBrewerColorRampV2* brewerRamp = new QgsVectorColorBrewerColorRampV2 ();
261
261
QgsVectorColorBrewerColorRampV2Dialog dlg ( brewerRamp, this );
@@ -272,8 +272,8 @@ bool QgsStyleV2ManagerDialog::addColorRamp()
272
272
}
273
273
274
274
// get name
275
- QString name = QInputDialog::getText ( this , " Color ramp name" ,
276
- " Please enter name for new color ramp:" , QLineEdit::Normal, " new color ramp" , &ok );
275
+ QString name = QInputDialog::getText ( this , tr ( " Color ramp name" ) ,
276
+ tr ( " Please enter name for new color ramp:" ) , QLineEdit::Normal, tr ( " new color ramp" ) , &ok );
277
277
if ( !ok || name.isEmpty () )
278
278
{
279
279
if ( ramp )
0 commit comments