Index: src/providers/grass/qgsgrass.cpp =================================================================== --- src/providers/grass/qgsgrass.cpp (revision 6830) +++ src/providers/grass/qgsgrass.cpp (working copy) @@ -383,12 +383,12 @@ // Check if the mapset is in use QString gisBase = getenv("GISBASE"); - if ( gisBase.isNull() ) return "GISBASE is not set."; + if ( gisBase.isNull() ) return QObject::tr("GISBASE is not set."); QFileInfo fi( mapsetPath+ "/WIND" ); if ( !fi.exists() ) { - return mapsetPath + " is not a GRASS mapset."; + return mapsetPath + QObject::tr(" is not a GRASS mapset."); } QString lock = mapsetPath + "/.gislock"; @@ -406,7 +406,7 @@ if ( !process->start() ) { - return "Cannot start " + gisBase + "/etc/lock"; + return QObject::tr("Cannot start ") + gisBase + "/etc/lock"; } // TODO better wait @@ -421,7 +421,7 @@ // TODO WIN32 (lock.exe does not work properly?) #ifndef WIN32 - if ( status > 0 ) return "Mapset is already in use."; + if ( status > 0 ) return QObject::tr("Mapset is already in use."); #endif // Create temporary directory @@ -436,13 +436,13 @@ if ( !dirInfo.isWritable() ) { lockFile.remove(); - return "Temporary directory " + mTmp + " exist but is not writable"; + return QObject::tr("Temporary directory ") + mTmp + QObject::tr(" exist but is not writable"); } } else if ( !dir.mkdir( mTmp ) ) { lockFile.remove(); - return "Cannot create temporary directory " + mTmp; + return QObject::tr("Cannot create temporary directory ") + mTmp; } // Create GISRC file @@ -458,7 +458,7 @@ if ( !out.open( QIODevice::WriteOnly ) ) { lockFile.remove(); - return "Cannot create " + mGisrc; + return QObject::tr("Cannot create ") + mGisrc; } QTextStream stream ( &out ); @@ -531,7 +531,7 @@ QFile file ( mMapsetLock ); if ( !file.remove() ) { - return "Cannot remove mapset lock: " + mMapsetLock; + return QObject::tr("Cannot remove mapset lock: ") + mMapsetLock; } mMapsetLock = ""; @@ -918,8 +918,8 @@ if ( G_get_cellhd ( map.toLocal8Bit().data(), mapset.toLocal8Bit().data(), window) < 0 ) { - QMessageBox::warning( 0, "Warning", - "Cannot read raster map region" ); + QMessageBox::warning( 0, QObject::tr("Warning"), + QObject::tr("Cannot read raster map region" )); return false; } } @@ -935,8 +935,8 @@ if ( level < 2 ) { - QMessageBox::warning( 0, "Warning", - "Cannot read vector map region" ); + QMessageBox::warning( 0, QObject::tr("Warning"), + QObject::tr("Cannot read vector map region" ) ); return false; } @@ -971,8 +971,8 @@ map.toLocal8Bit().data(), mapset.toLocal8Bit().data() ) != NULL ) { - QMessageBox::warning( 0, "Warning", - "Cannot read region" ); + QMessageBox::warning( 0, QObject::tr("Warning"), + QObject::tr("Cannot read region" )); return false; } } Index: src/core/qgshttptransaction.cpp =================================================================== --- src/core/qgshttptransaction.cpp (revision 6830) +++ src/core/qgshttptransaction.cpp (working copy) @@ -263,13 +263,13 @@ if (total) { - status = QString("Received %1 of %2 bytes") + status = QString( QObject::tr("Received %1 of %2 bytes") ) .arg( done ) .arg( total ); } else { - status = QString("Received %1 bytes (total unknown)") + status = QString( QObject::tr("Received %1 bytes (total unknown)") ) .arg( done ); } @@ -380,46 +380,46 @@ { case QHttp::Unconnected: QgsDebugMsg("There is no connection to the host."); - emit setStatus( QString("Not connected") ); + emit setStatus( QString(QObject::tr("Not connected") ) ); break; case QHttp::HostLookup: QgsDebugMsg("A host name lookup is in progress."); - emit setStatus( QString("Looking up '%1'") + emit setStatus( QString( QObject::tr("Looking up '%1'") ) .arg(httphost) ); break; case QHttp::Connecting: QgsDebugMsg("An attempt to connect to the host is in progress."); - emit setStatus( QString("Connecting to '%1'") + emit setStatus( QString( QObject::tr("Connecting to '%1'") ) .arg(httphost) ); break; case QHttp::Sending: QgsDebugMsg("The client is sending its request to the server."); - emit setStatus( QString("Sending request '%1'") + emit setStatus( QString( QObject::tr("Sending request '%1'") ) .arg(httpurl) ); break; case QHttp::Reading: QgsDebugMsg("The client's request has been sent and the client is reading the server's response."); - emit setStatus( QString("Receiving reply") ); + emit setStatus( QString( QObject::tr("Receiving reply") ) ); break; case QHttp::Connected: QgsDebugMsg("The connection to the host is open, but the client is neither sending a request, nor waiting for a response."); - emit setStatus( QString("Response is complete") ); + emit setStatus( QString( QObject::tr("Response is complete") ) ); break; case QHttp::Closing: QgsDebugMsg("The connection is closing down, but is not yet closed. (The state will be Unconnected when the connection is closed.)"); - emit setStatus( QString("Closing down connection") ); + emit setStatus( QString( QObject::tr("Closing down connection") ) ); break; }