@@ -383,12 +383,12 @@ QString QgsGrass::openMapset ( QString gisdbase, QString location, QString mapse
383383
384384 // Check if the mapset is in use
385385 QString gisBase = getenv (" GISBASE" );
386- if ( gisBase.isNull () ) return " GISBASE is not set." ;
386+ if ( gisBase.isNull () ) return QObject::tr ( " GISBASE is not set." ) ;
387387
388388 QFileInfo fi ( mapsetPath+ " /WIND" );
389389 if ( !fi.exists () )
390390 {
391- return mapsetPath + " is not a GRASS mapset." ;
391+ return mapsetPath + QObject::tr ( " is not a GRASS mapset." ) ;
392392 }
393393
394394 QString lock = mapsetPath + " /.gislock" ;
@@ -406,7 +406,7 @@ QString QgsGrass::openMapset ( QString gisdbase, QString location, QString mapse
406406
407407 if ( !process->start () )
408408 {
409- return " Cannot start " + gisBase + " /etc/lock" ;
409+ return QObject::tr ( " Cannot start " ) + gisBase + " /etc/lock" ;
410410 }
411411
412412 // TODO better wait
@@ -423,7 +423,7 @@ QString QgsGrass::openMapset ( QString gisdbase, QString location, QString mapse
423423
424424// TODO WIN32 (lock.exe does not work properly?)
425425#ifndef WIN32
426- if ( status > 0 ) return " Mapset is already in use." ;
426+ if ( status > 0 ) return QObject::tr ( " Mapset is already in use." ) ;
427427#endif
428428
429429 // Create temporary directory
@@ -438,13 +438,13 @@ QString QgsGrass::openMapset ( QString gisdbase, QString location, QString mapse
438438 if ( !dirInfo.isWritable () )
439439 {
440440 lockFile.remove ();
441- return " Temporary directory " + mTmp + " exist but is not writable" ;
441+ return QObject::tr ( " Temporary directory " ) + mTmp + QObject::tr ( " exist but is not writable" ) ;
442442 }
443443 }
444444 else if ( !dir.mkdir ( mTmp ) )
445445 {
446446 lockFile.remove ();
447- return " Cannot create temporary directory " + mTmp ;
447+ return QObject::tr ( " Cannot create temporary directory " ) + mTmp ;
448448 }
449449
450450 // Create GISRC file
@@ -460,7 +460,7 @@ QString QgsGrass::openMapset ( QString gisdbase, QString location, QString mapse
460460 if ( !out.open ( QIODevice::WriteOnly ) )
461461 {
462462 lockFile.remove ();
463- return " Cannot create " + mGisrc ;
463+ return QObject::tr ( " Cannot create " ) + mGisrc ;
464464 }
465465 QTextStream stream ( &out );
466466
@@ -533,7 +533,7 @@ QString QgsGrass::closeMapset ( )
533533 QFile file ( mMapsetLock );
534534 if ( !file.remove () )
535535 {
536- return " Cannot remove mapset lock: " + mMapsetLock ;
536+ return QObject::tr ( " Cannot remove mapset lock: " ) + mMapsetLock ;
537537 }
538538 mMapsetLock = " " ;
539539
@@ -920,8 +920,8 @@ bool QgsGrass::mapRegion( int type, QString gisbase,
920920 if ( G_get_cellhd ( map.toLocal8Bit ().data (),
921921 mapset.toLocal8Bit ().data (), window) < 0 )
922922 {
923- QMessageBox::warning ( 0 , " Warning" ,
924- " Cannot read raster map region" );
923+ QMessageBox::warning ( 0 , QObject::tr ( " Warning" ) ,
924+ QObject::tr ( " Cannot read raster map region" ) );
925925 return false ;
926926 }
927927 }
@@ -937,8 +937,8 @@ bool QgsGrass::mapRegion( int type, QString gisbase,
937937
938938 if ( level < 2 )
939939 {
940- QMessageBox::warning ( 0 , " Warning" ,
941- " Cannot read vector map region" );
940+ QMessageBox::warning ( 0 , QObject::tr ( " Warning" ) ,
941+ QObject::tr ( " Cannot read vector map region" ) );
942942 return false ;
943943 }
944944
@@ -973,8 +973,8 @@ bool QgsGrass::mapRegion( int type, QString gisbase,
973973 map.toLocal8Bit ().data (),
974974 mapset.toLocal8Bit ().data () ) != NULL )
975975 {
976- QMessageBox::warning ( 0 , " Warning" ,
977- " Cannot read region" );
976+ QMessageBox::warning ( 0 , QObject::tr ( " Warning" ) ,
977+ QObject::tr ( " Cannot read region" ) );
978978 return false ;
979979 }
980980 }
0 commit comments