Skip to content

Commit

Permalink
Applied patch #683 to trunk.
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@6836 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
homann committed Mar 25, 2007
1 parent 133afc0 commit e5acdf4
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 23 deletions.
18 changes: 9 additions & 9 deletions src/core/qgshttptransaction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -263,13 +263,13 @@ void QgsHttpTransaction::dataProgress( int done, int total )

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 );
}

Expand Down Expand Up @@ -380,46 +380,46 @@ void QgsHttpTransaction::dataStateChanged( int state )
{
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;
}

Expand Down
28 changes: 14 additions & 14 deletions src/providers/grass/qgsgrass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -383,12 +383,12 @@ QString QgsGrass::openMapset ( QString gisdbase, QString location, QString mapse

// 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";
Expand All @@ -406,7 +406,7 @@ QString QgsGrass::openMapset ( QString gisdbase, QString location, QString mapse

if ( !process->start() )
{
return "Cannot start " + gisBase + "/etc/lock";
return QObject::tr("Cannot start ") + gisBase + "/etc/lock";
}

// TODO better wait
Expand All @@ -423,7 +423,7 @@ QString QgsGrass::openMapset ( QString gisdbase, QString location, QString mapse

// 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
Expand All @@ -438,13 +438,13 @@ QString QgsGrass::openMapset ( QString gisdbase, QString location, QString mapse
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
Expand All @@ -460,7 +460,7 @@ QString QgsGrass::openMapset ( QString gisdbase, QString location, QString mapse
if ( !out.open( QIODevice::WriteOnly ) )
{
lockFile.remove();
return "Cannot create " + mGisrc;
return QObject::tr("Cannot create ") + mGisrc;
}
QTextStream stream ( &out );

Expand Down Expand Up @@ -533,7 +533,7 @@ QString QgsGrass::closeMapset ( )
QFile file ( mMapsetLock );
if ( !file.remove() )
{
return "Cannot remove mapset lock: " + mMapsetLock;
return QObject::tr("Cannot remove mapset lock: ") + mMapsetLock;
}
mMapsetLock = "";

Expand Down Expand Up @@ -920,8 +920,8 @@ bool QgsGrass::mapRegion( int type, QString gisbase,
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;
}
}
Expand All @@ -937,8 +937,8 @@ bool QgsGrass::mapRegion( int type, QString gisbase,

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;
}

Expand Down Expand Up @@ -973,8 +973,8 @@ bool QgsGrass::mapRegion( int type, QString gisbase,
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;
}
}
Expand Down

0 comments on commit e5acdf4

Please sign in to comment.