diff --git a/src/app/qgsloadstylefromdbdialog.cpp b/src/app/qgsloadstylefromdbdialog.cpp index e809c503ba8..2dfcc45b1bc 100644 --- a/src/app/qgsloadstylefromdbdialog.cpp +++ b/src/app/qgsloadstylefromdbdialog.cpp @@ -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 { diff --git a/src/app/qgsvectorlayerproperties.cpp b/src/app/qgsvectorlayerproperties.cpp index b5428bef4e2..6bfa6f5cb80 100644 --- a/src/app/qgsvectorlayerproperties.cpp +++ b/src/app/qgsvectorlayerproperties.cpp @@ -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; } @@ -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; } @@ -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 ) ); } diff --git a/src/gui/auth/qgsauthauthoritieseditor.cpp b/src/gui/auth/qgsauthauthoritieseditor.cpp index 728a5d8ec8b..76c157080ec 100644 --- a/src/gui/auth/qgsauthauthoritieseditor.cpp +++ b/src/gui/auth/qgsauthauthoritieseditor.cpp @@ -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; } diff --git a/src/providers/gdal/qgsgdalprovider.cpp b/src/providers/gdal/qgsgdalprovider.cpp index 4790f2b3c5c..460ee6b63d1 100644 --- a/src/providers/gdal/qgsgdalprovider.cpp +++ b/src/providers/gdal/qgsgdalprovider.cpp @@ -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; } @@ -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(); @@ -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; } diff --git a/src/providers/grass/qgsgrass.cpp b/src/providers/grass/qgsgrass.cpp index e7ccc4f7895..591bdd2b567 100644 --- a/src/providers/grass/qgsgrass.cpp +++ b/src/providers/grass/qgsgrass.cpp @@ -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; } @@ -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; @@ -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() ) ) ); } } diff --git a/src/providers/spatialite/qgsspatialitesourceselect.cpp b/src/providers/spatialite/qgsspatialitesourceselect.cpp index c7f31d0c67d..d9e54718cae 100644 --- a/src/providers/spatialite/qgsspatialitesourceselect.cpp +++ b/src/providers/spatialite/qgsspatialitesourceselect.cpp @@ -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 ); @@ -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;