Skip to content

Commit 0f847d4

Browse files
author
gsherman
committed
Added internationalization string wrapping (tr) patch from lubaby
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6336 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 8d2717c commit 0f847d4

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/plugins/grass/qgsgrassselect.cpp

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,29 +65,29 @@ QgsGrassSelect::QgsGrassSelect(int type):QgsGrassSelectBase()
6565
switch ( type )
6666
{
6767
case QgsGrassSelect::VECTOR:
68-
setCaption ( "Select GRASS Vector Layer" );
68+
setCaption ( tr("Select GRASS Vector Layer") );
6969
break;
7070

7171
case QgsGrassSelect::RASTER:
7272
/* Remove layer combo box */
7373
Layer->hide();
7474
elayer->hide();
75-
setCaption ( "Select GRASS Raster Layer" );
75+
setCaption ( tr("Select GRASS Raster Layer") );
7676
break;
7777

7878
case QgsGrassSelect::MAPCALC:
7979
/* Remove layer combo box */
8080
Layer->hide();
8181
elayer->hide();
82-
setCaption ( "Select GRASS mapcalc schema" );
82+
setCaption ( tr("Select GRASS mapcalc schema") );
8383
break;
8484

8585
case QgsGrassSelect::MAPSET:
8686
Layer->hide();
8787
elayer->hide();
8888
MapName->hide();
8989
emap->hide();
90-
setCaption ( "Select GRASS Mapset" );
90+
setCaption ( tr("Select GRASS Mapset") );
9191
break;
9292
}
9393

@@ -404,7 +404,7 @@ QStringList QgsGrassSelect::vectorLayers ( QString gisdbase,
404404

405405
if ( level < 2 ) {
406406
std::cerr << "Cannot open vector on level 2" << std::endl;
407-
QMessageBox::warning( 0, "Warning", "Cannot open vector on level 2 (topology not available)." );
407+
QMessageBox::warning( 0, tr("Warning"), tr("Cannot open vector on level 2 (topology not available).") );
408408
return list;
409409
}
410410

@@ -462,7 +462,7 @@ void QgsGrassSelect::on_GisdbaseBrowse_clicked()
462462
{
463463

464464
QString Gisdbase = QFileDialog::getExistingDirectory( this,
465-
"Choose existing GISDBASE", egisdbase->text() );
465+
tr("Choose existing GISDBASE"), egisdbase->text() );
466466

467467
if ( !Gisdbase.isNull() )
468468
{
@@ -478,8 +478,8 @@ void QgsGrassSelect::on_ok_clicked()
478478
lastGisdbase = QString( gisdbase );
479479

480480
if ( elocation->count() == 0 ) {
481-
QString msg = "Wrong GISDBASE, no locations available.";
482-
QMessageBox::warning(this, "Wrong GISDBASE", msg);
481+
QString msg = tr("Wrong GISDBASE, no locations available.");
482+
QMessageBox::warning(this, tr("Wrong GISDBASE"), msg);
483483
return;
484484
}
485485

@@ -496,17 +496,17 @@ void QgsGrassSelect::on_ok_clicked()
496496
map = emap->currentText().stripWhiteSpace();
497497

498498
if ( type != QgsGrassSelect::MAPSET && map.isEmpty() ) {
499-
QString msg = "Select a map.";
500-
QMessageBox::warning(0, "No map", msg);
499+
QString msg = tr("Select a map.");
500+
QMessageBox::warning(0, tr("No map"), msg);
501501
return;
502502
}
503503

504504
if ( type == QgsGrassSelect::VECTOR )
505505
{
506506
if ( elayer->count() == 0 )
507507
{
508-
QMessageBox::warning(0, "No layer",
509-
"No layers available in this map");
508+
QMessageBox::warning(0, tr("No layer"),
509+
tr("No layers available in this map"));
510510
return;
511511
}
512512
lastVectorMap = map;

0 commit comments

Comments
 (0)