Skip to content
Permalink
Browse files
Applied patch #683 to trunk.
git-svn-id: http://svn.osgeo.org/qgis/trunk@6836 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
homann committed Mar 25, 2007
1 parent aa3b638 commit db2b35b90531d0e61939a7d300d920958ffac5b0
Showing with 23 additions and 23 deletions.
  1. +9 −9 src/core/qgshttptransaction.cpp
  2. +14 −14 src/providers/grass/qgsgrass.cpp
@@ -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 );
}

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

@@ -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";
@@ -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
@@ -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
@@ -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
@@ -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 );

@@ -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 = "";

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

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

0 comments on commit db2b35b

Please sign in to comment.