Skip to content

Commit a87cde2

Browse files
committedOct 26, 2017
Reword message
1 parent c2577ec commit a87cde2

File tree

6 files changed

+16
-18
lines changed

6 files changed

+16
-18
lines changed
 

‎src/app/qgsloadstylefromdbdialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ void QgsLoadStyleFromDBDialog::deleteStyleFromDB()
192192
int sectionLimit = mLayer->listStylesInDatabase( ids, names, descriptions, errorMsg );
193193
if ( !errorMsg.isNull() )
194194
{
195-
QgisApp::instance()->messageBar()->pushMessage( tr( "Error occurred retrieving styles from database" ), errorMsg, QgsMessageBar::WARNING, QgisApp::instance()->messageTimeout() );
195+
QgisApp::instance()->messageBar()->pushMessage( tr( "Error occurred while retrieving styles from database" ), errorMsg, QgsMessageBar::WARNING, QgisApp::instance()->messageTimeout() );
196196
}
197197
else
198198
{

‎src/app/qgsvectorlayerproperties.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,7 +1128,7 @@ void QgsVectorLayerProperties::showListOfStylesFromDatabase()
11281128
int sectionLimit = mLayer->listStylesInDatabase( ids, names, descriptions, errorMsg );
11291129
if ( !errorMsg.isNull() )
11301130
{
1131-
QMessageBox::warning( this, tr( "Error occurred retrieving styles from database" ), errorMsg );
1131+
QMessageBox::warning( this, tr( "Error occurred while retrieving styles from database" ), errorMsg );
11321132
return;
11331133
}
11341134

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

@@ -1156,7 +1156,7 @@ void QgsVectorLayerProperties::showListOfStylesFromDatabase()
11561156
}
11571157
else
11581158
{
1159-
QMessageBox::warning( this, tr( "Error occurred retrieving styles from database" ),
1159+
QMessageBox::warning( this, tr( "Error occurred while retrieving styles from database" ),
11601160
tr( "The retrieved style is not a valid named style. Error message: %1" )
11611161
.arg( errorMsg ) );
11621162
}

‎src/gui/auth/qgsauthauthoritieseditor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ void QgsAuthAuthoritiesEditor::btnRemoveCa_clicked()
515515

516516
if ( cert.isNull() )
517517
{
518-
messageBar()->pushMessage( tr( "Certificate could not found in database for id %1:" ).arg( digest ),
518+
messageBar()->pushMessage( tr( "Certificate could not be found in database for id %1:" ).arg( digest ),
519519
QgsMessageBar::WARNING );
520520
return;
521521
}

‎src/providers/gdal/qgsgdalprovider.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -755,9 +755,8 @@ void QgsGdalProvider::readBlock( int bandNo, QgsRectangle const &extent, int pi
755755
if ( !myWarpOptions->pTransformerArg )
756756
{
757757
QMessageBox::warning( 0, QObject::tr( "Warning" ),
758-
QObject::tr( "Cannot GDALCreateGenImgProjTransformer: " )
759-
+ QString::fromUtf8( CPLGetLastErrorMsg() ) );
760-
return;
758+
QObject::tr( "Cannot GDALCreateGenImgProjTransformer: %1" ).arg( QString::fromUtf8( CPLGetLastErrorMsg() ) ); // missing word?
759+
return;
761760

762761
}
763762

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

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

‎src/providers/grass/qgsgrass.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2258,7 +2258,7 @@ QMap<QString, QString> QgsGrass::query( const QString &gisdbase, const QString &
22582258
}
22592259
catch ( QgsGrass::Exception &e )
22602260
{
2261-
warning( tr( "Cannot query raster " ) + "\n" + e.what() );
2261+
warning( tr( "Cannot query raster\n%1" ).arg( e.what() ) );
22622262
}
22632263
return result;
22642264
}
@@ -2321,7 +2321,7 @@ bool QgsGrass::deleteObject( const QgsGrassObject &object )
23212321
}
23222322
catch ( QgsGrass::Exception &e )
23232323
{
2324-
warning( tr( "Cannot delete" ) + " " + object.elementName() + " " + object.name() + ": " + e.what() );
2324+
warning( tr( "Cannot delete %1 %2: %3" ).arg( object.elementName(), object.name(), e.what() ) );
23252325
return false;
23262326
}
23272327
return true;
@@ -2412,7 +2412,7 @@ void QgsGrass::createTable( dbDriver *driver, const QString &tableName, const Qg
24122412
db_free_string( &dbstr );
24132413
if ( result != DB_OK )
24142414
{
2415-
throw QgsGrass::Exception( QObject::tr( "Cannot create table" ) + ": " + QString::fromLatin1( db_get_error_msg() ) );
2415+
throw QgsGrass::Exception( QObject::tr( "Cannot create table: %1" ).arg( QString::fromLatin1( db_get_error_msg() ) ) );
24162416
}
24172417
}
24182418

‎src/providers/spatialite/qgsspatialitesourceselect.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ void QgsSpatiaLiteSourceSelect::updateStatistics()
148148
subKey.truncate( idx );
149149

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

0 commit comments

Comments
 (0)
Please sign in to comment.