Skip to content

Commit

Permalink
Reword message
Browse files Browse the repository at this point in the history
  • Loading branch information
DelazJ committed Oct 26, 2017
1 parent c2577ec commit a87cde2
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/app/qgsloadstylefromdbdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ void QgsLoadStyleFromDBDialog::deleteStyleFromDB()
int sectionLimit = mLayer->listStylesInDatabase( ids, names, descriptions, errorMsg );
if ( !errorMsg.isNull() )
{
QgisApp::instance()->messageBar()->pushMessage( tr( "Error occurred retrieving styles from database" ), errorMsg, QgsMessageBar::WARNING, QgisApp::instance()->messageTimeout() );
QgisApp::instance()->messageBar()->pushMessage( tr( "Error occurred while retrieving styles from database" ), errorMsg, QgsMessageBar::WARNING, QgisApp::instance()->messageTimeout() );
}
else
{
Expand Down
6 changes: 3 additions & 3 deletions src/app/qgsvectorlayerproperties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1128,7 +1128,7 @@ void QgsVectorLayerProperties::showListOfStylesFromDatabase()
int sectionLimit = mLayer->listStylesInDatabase( ids, names, descriptions, errorMsg );
if ( !errorMsg.isNull() )
{
QMessageBox::warning( this, tr( "Error occurred retrieving styles from database" ), errorMsg );
QMessageBox::warning( this, tr( "Error occurred while retrieving styles from database" ), errorMsg );
return;
}

Expand All @@ -1143,7 +1143,7 @@ void QgsVectorLayerProperties::showListOfStylesFromDatabase()
QString qmlStyle = mLayer->getStyleFromDatabase( selectedStyleId, errorMsg );
if ( !errorMsg.isNull() )
{
QMessageBox::warning( this, tr( "Error occurred retrieving styles from database" ), errorMsg );
QMessageBox::warning( this, tr( "Error occurred while retrieving styles from database" ), errorMsg );
return;
}

Expand All @@ -1156,7 +1156,7 @@ void QgsVectorLayerProperties::showListOfStylesFromDatabase()
}
else
{
QMessageBox::warning( this, tr( "Error occurred retrieving styles from database" ),
QMessageBox::warning( this, tr( "Error occurred while retrieving styles from database" ),
tr( "The retrieved style is not a valid named style. Error message: %1" )
.arg( errorMsg ) );
}
Expand Down
2 changes: 1 addition & 1 deletion src/gui/auth/qgsauthauthoritieseditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ void QgsAuthAuthoritiesEditor::btnRemoveCa_clicked()

if ( cert.isNull() )
{
messageBar()->pushMessage( tr( "Certificate could not found in database for id %1:" ).arg( digest ),
messageBar()->pushMessage( tr( "Certificate could not be found in database for id %1:" ).arg( digest ),
QgsMessageBar::WARNING );
return;
}
Expand Down
12 changes: 5 additions & 7 deletions src/providers/gdal/qgsgdalprovider.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -755,9 +755,8 @@ void QgsGdalProvider::readBlock( int bandNo, QgsRectangle const &extent, int pi
if ( !myWarpOptions->pTransformerArg )
{
QMessageBox::warning( 0, QObject::tr( "Warning" ),
QObject::tr( "Cannot GDALCreateGenImgProjTransformer: " )
+ QString::fromUtf8( CPLGetLastErrorMsg() ) );
return;
QObject::tr( "Cannot GDALCreateGenImgProjTransformer: %1" ).arg( QString::fromUtf8( CPLGetLastErrorMsg() ) ); // missing word?
return;

}

Expand Down Expand Up @@ -786,9 +785,8 @@ void QgsGdalProvider::readBlock( int bandNo, QgsRectangle const &extent, int pi
if ( myOperation.Initialize( myWarpOptions ) != CE_None )
{
QMessageBox::warning( 0, QObject::tr( "Warning" ),
QObject::tr( "Cannot inittialize GDALWarpOperation : " )
+ QString::fromUtf8( CPLGetLastErrorMsg() ) );
return;
QObject::tr( "Cannot initialize GDAL Warp operation : %1" ).arg( QString::fromUtf8( CPLGetLastErrorMsg() ) );
return;

}
CPLErrorReset();
Expand All @@ -797,7 +795,7 @@ void QgsGdalProvider::readBlock( int bandNo, QgsRectangle const &extent, int pi
if ( myErr != CPLE_None )
{
QMessageBox::warning( 0, QObject::tr( "Warning" ),
QObject::tr( "Cannot ChunkAndWarpImage: %1" ).arg( QString::fromUtf8( CPLGetLastErrorMsg() ) ) );
QObject::tr( "Cannot chunk and warp image: %1" ).arg( QString::fromUtf8( CPLGetLastErrorMsg() ) ) );
return;
}

Expand Down
6 changes: 3 additions & 3 deletions src/providers/grass/qgsgrass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2258,7 +2258,7 @@ QMap<QString, QString> QgsGrass::query( const QString &gisdbase, const QString &
}
catch ( QgsGrass::Exception &e )
{
warning( tr( "Cannot query raster " ) + "\n" + e.what() );
warning( tr( "Cannot query raster\n%1" ).arg( e.what() ) );
}
return result;
}
Expand Down Expand Up @@ -2321,7 +2321,7 @@ bool QgsGrass::deleteObject( const QgsGrassObject &object )
}
catch ( QgsGrass::Exception &e )
{
warning( tr( "Cannot delete" ) + " " + object.elementName() + " " + object.name() + ": " + e.what() );
warning( tr( "Cannot delete %1 %2: %3" ).arg( object.elementName(), object.name(), e.what() ) );
return false;
}
return true;
Expand Down Expand Up @@ -2412,7 +2412,7 @@ void QgsGrass::createTable( dbDriver *driver, const QString &tableName, const Qg
db_free_string( &dbstr );
if ( result != DB_OK )
{
throw QgsGrass::Exception( QObject::tr( "Cannot create table" ) + ": " + QString::fromLatin1( db_get_error_msg() ) );
throw QgsGrass::Exception( QObject::tr( "Cannot create table: %1" ).arg( QString::fromLatin1( db_get_error_msg() ) ) );
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/providers/spatialite/qgsspatialitesourceselect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ void QgsSpatiaLiteSourceSelect::updateStatistics()
subKey.truncate( idx );

QString msg = tr( "Are you sure you want to update the internal statistics for DB: %1?\n\n"
"This could take a long time (depending on the DB size),\n"
"This could take a long time (depending on the DB size), "
"but implies better performance thereafter." ).arg( subKey );
QMessageBox::StandardButton result =
QMessageBox::information( this, tr( "Confirm Update Statistics" ), msg, QMessageBox::Ok | QMessageBox::Cancel );
Expand Down Expand Up @@ -463,11 +463,11 @@ void QgsSpatiaLiteSourceSelect::btnConnect_clicked()
break;
case QgsSpatiaLiteConnection::FailedToCheckMetadata:
QMessageBox::critical( this, tr( "SpatiaLite metadata check failed" ),
tr( "Failure getting table metadata ... is this really a SpatialLite database? %1\n\n%2" ).arg( mSqlitePath, errCause ) );
tr( "Failure getting table metadata... is %1 really a SpatiaLite database?\n\n%2" ).arg( mSqlitePath, errCause ) );
break;
default:
QMessageBox::critical( this, tr( "SpatiaLite Error" ),
tr( "Unexpected error when working with: %1\n\n%2" ).arg( mSqlitePath, errCause ) );
tr( "Unexpected error when working with %1\n\n%2" ).arg( mSqlitePath, errCause ) );
}
mSqlitePath = QString();
return;
Expand Down

0 comments on commit a87cde2

Please sign in to comment.