Skip to content

Commit

Permalink
Add missing space for readability and fix punctuation
Browse files Browse the repository at this point in the history
  • Loading branch information
DelazJ committed Oct 26, 2017
1 parent 99b1c74 commit cd17832
Show file tree
Hide file tree
Showing 20 changed files with 68 additions and 68 deletions.
10 changes: 5 additions & 5 deletions src/app/dwg/qgsdwgimporter.cpp
Expand Up @@ -101,7 +101,7 @@ bool QgsDwgImporter::exec( const QString &sql, bool logError )

if ( logError )
{
LOG( QObject::tr( "SQL statement failed\nDatabase:%1\nSQL:%2\nError:%3" )
LOG( QObject::tr( "SQL statement failed\nDatabase: %1\nSQL: %2\nError: %3" )
.arg( mDatabase, sql, QString::fromUtf8( CPLGetLastErrorMsg() ) ) );
}
return false;
Expand All @@ -127,7 +127,7 @@ OGRLayerH QgsDwgImporter::query( const QString &sql )
if ( CPLGetLastErrorType() == CE_None )
return layer;

LOG( QObject::tr( "SQL statement failed\nDatabase:%1\nSQL:%2\nError:%3" )
LOG( QObject::tr( "SQL statement failed\nDatabase: %1\nSQL: %2\nError: %3" )
.arg( mDatabase, sql, QString::fromUtf8( CPLGetLastErrorMsg() ) ) );

OGR_DS_ReleaseResultSet( mDs.get(), layer );
Expand All @@ -143,7 +143,7 @@ void QgsDwgImporter::startTransaction()
mInTransaction = GDALDatasetStartTransaction( mDs.get(), 0 ) == OGRERR_NONE;
if ( !mInTransaction )
{
LOG( QObject::tr( "Could not start transaction\nDatabase:%1\nError:%2" )
LOG( QObject::tr( "Could not start transaction\nDatabase: %1\nError: %2" )
.arg( mDatabase, QString::fromUtf8( CPLGetLastErrorMsg() ) ) );
}
}
Expand All @@ -154,7 +154,7 @@ void QgsDwgImporter::commitTransaction()

if ( mInTransaction && GDALDatasetCommitTransaction( mDs.get() ) != OGRERR_NONE )
{
LOG( QObject::tr( "Could not commit transaction\nDatabase:%1\nError:%2" )
LOG( QObject::tr( "Could not commit transaction\nDatabase: %1\nError: %2" )
.arg( mDatabase, QString::fromUtf8( CPLGetLastErrorMsg() ) ) );
}
mInTransaction = false;
Expand Down Expand Up @@ -2672,7 +2672,7 @@ bool QgsDwgImporter::expandInserts( QString &error )
{
if ( errors < 1000 )
{
QgsMessageLog::logMessage( QObject::tr( "Could not copy feature of block %2 from layer %1 [Errors:%3]" )
QgsMessageLog::logMessage( QObject::tr( "Could not copy feature of block %2 from layer %1 [Errors: %3]" )
.arg( name ).arg( handle ).arg( QString::fromUtf8( CPLGetLastErrorMsg() ) ),
QObject::tr( "DWG/DXF import" ) );
}
Expand Down
4 changes: 2 additions & 2 deletions src/app/main.cpp
Expand Up @@ -300,7 +300,7 @@ void qgisCrash( int signal )
#endif
if ( len < 0 )
{
myPrint( "Could not read link (%d:%s)\n", errno, strerror( errno ) );
myPrint( "Could not read link (%d: %s)\n", errno, strerror( errno ) );
}
else
{
Expand All @@ -325,7 +325,7 @@ void qgisCrash( int signal )
}
else
{
myPrint( "Cannot fork (%d:%s)\n", errno, strerror( errno ) );
myPrint( "Cannot fork (%d: %s)\n", errno, strerror( errno ) );
dumpBacktrace( 256 );
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/app/qgsbookmarks.cpp
Expand Up @@ -173,7 +173,7 @@ void QgsBookmarks::addClicked()
}
else
{
QMessageBox::warning( this, tr( "Error" ), tr( "Unable to create the bookmark.\nDriver:%1\nDatabase:%2" )
QMessageBox::warning( this, tr( "Error" ), tr( "Unable to create the bookmark.\nDriver: %1\nDatabase: %2" )
.arg( query.lastError().driverText(),
query.lastError().databaseText() ) );
}
Expand Down
2 changes: 1 addition & 1 deletion src/core/expression/qgsexpressionnodeimpl.cpp
Expand Up @@ -1114,7 +1114,7 @@ QString QgsExpressionNodeLiteral::dump() const
case QVariant::Bool:
return mValue.toBool() ? QStringLiteral( "TRUE" ) : QStringLiteral( "FALSE" );
default:
return tr( "[unsupported type;%1; value:%2]" ).arg( mValue.typeName(), mValue.toString() );
return tr( "[unsupported type: %1; value: %2]" ).arg( mValue.typeName(), mValue.toString() );
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/core/qgsgeometryvalidator.cpp
Expand Up @@ -222,7 +222,7 @@ void QgsGeometryValidator::run()
GEOSContextHandle_t handle = QgsGeometry::getGEOSHandler();
if ( !g0 )
{
emit errorFound( QgsGeometry::Error( QObject::tr( "GEOS error:could not produce geometry for GEOS (check log window)" ) ) );
emit errorFound( QgsGeometry::Error( QObject::tr( "GEOS error: could not produce geometry for GEOS (check log window)" ) ) );
}
else
{
Expand All @@ -240,15 +240,15 @@ void QgsGeometryValidator::run()
double x, y;
GEOSCoordSeq_getX_r( handle, cs, 0, &x );
GEOSCoordSeq_getY_r( handle, cs, 0, &y );
emit errorFound( QgsGeometry::Error( QObject::tr( "GEOS error:%1" ).arg( r ), QgsPointXY( x, y ) ) );
emit errorFound( QgsGeometry::Error( QObject::tr( "GEOS error: %1" ).arg( r ), QgsPointXY( x, y ) ) );
mErrorCount++;
}

GEOSGeom_destroy_r( handle, g1 );
}
else
{
emit errorFound( QgsGeometry::Error( QObject::tr( "GEOS error:%1" ).arg( r ) ) );
emit errorFound( QgsGeometry::Error( QObject::tr( "GEOS error: %1" ).arg( r ) ) );
mErrorCount++;
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/qgssqlstatement.cpp
Expand Up @@ -462,7 +462,7 @@ QString QgsSQLStatement::NodeLiteral::dump() const
case QVariant::Bool:
return mValue.toBool() ? "TRUE" : "FALSE";
default:
return tr( "[unsupported type;%1; value:%2]" ).arg( mValue.typeName(), mValue.toString() );
return tr( "[unsupported type: %1; value: %2]" ).arg( mValue.typeName(), mValue.toString() );
}
}

Expand Down
32 changes: 16 additions & 16 deletions src/core/qgsvectorfilewriter.cpp
Expand Up @@ -281,10 +281,10 @@ void QgsVectorFileWriter::init( QString vectorFileName,
{
mError = ErrCreateDataSource;
if ( action == CreateOrOverwriteFile )
mErrorMessage = QObject::tr( "creation of data source failed (OGR error:%1)" )
mErrorMessage = QObject::tr( "Creation of data source failed (OGR error: %1)" )
.arg( QString::fromUtf8( CPLGetLastErrorMsg() ) );
else
mErrorMessage = QObject::tr( "opening of data source in update mode failed (OGR error:%1)" )
mErrorMessage = QObject::tr( "Opening of data source in update mode failed (OGR error: %1)" )
.arg( QString::fromUtf8( CPLGetLastErrorMsg() ) );
return;
}
Expand All @@ -304,7 +304,7 @@ void QgsVectorFileWriter::init( QString vectorFileName,
if ( OGR_DS_DeleteLayer( mDS.get(), i ) != OGRERR_NONE )
{
mError = ErrCreateLayer;
mErrorMessage = QObject::tr( "overwriting of existing layer failed (OGR error:%1)" )
mErrorMessage = QObject::tr( "Overwriting of existing layer failed (OGR error: %1)" )
.arg( QString::fromUtf8( CPLGetLastErrorMsg() ) );
return;
}
Expand Down Expand Up @@ -420,10 +420,10 @@ void QgsVectorFileWriter::init( QString vectorFileName,
if ( !mLayer )
{
if ( action == CreateOrOverwriteFile || action == CreateOrOverwriteLayer )
mErrorMessage = QObject::tr( "creation of layer failed (OGR error:%1)" )
mErrorMessage = QObject::tr( "Creation of layer failed (OGR error: %1)" )
.arg( QString::fromUtf8( CPLGetLastErrorMsg() ) );
else
mErrorMessage = QObject::tr( "opening of layer failed (OGR error:%1)" )
mErrorMessage = QObject::tr( "Opening of layer failed (OGR error: %1)" )
.arg( QString::fromUtf8( CPLGetLastErrorMsg() ) );
mError = ErrCreateLayer;
return;
Expand Down Expand Up @@ -690,7 +690,7 @@ QMap<QString, QgsVectorFileWriter::MetaData> QgsVectorFileWriter::initMetaData()
datasetOptions.insert( QStringLiteral( "NB_IDS" ), new SetOption(
QObject::tr( "BNA records may contain from 2 to 4 identifiers per record. "
"Some software packages only support a precise number of identifiers. "
"You can override the default value (2) by a precise value" ),
"You can override the default value (2) by a precise value." ),
QStringList()
<< QStringLiteral( "2" )
<< QStringLiteral( "3" )
Expand Down Expand Up @@ -962,7 +962,7 @@ QMap<QString, QgsVectorFileWriter::MetaData> QgsVectorFileWriter::initMetaData()
datasetOptions.insert( QStringLiteral( "HEADER" ), new StringOption(
QObject::tr( "XML content that will be put between the <channel> element and the "
"first <item> element for a RSS document, or between the xml tag and "
"the first <entry> element for an Atom document. " ),
"the first <entry> element for an Atom document." ),
QLatin1String( "" ) // Default value
) );

Expand Down Expand Up @@ -1068,9 +1068,9 @@ QMap<QString, QgsVectorFileWriter::MetaData> QgsVectorFileWriter::initMetaData()
) );

datasetOptions.insert( QStringLiteral( "GML3_LONGSRS" ), new BoolOption(
QObject::tr( "only valid when FORMAT=GML3/GML3Degree/GML3.2) Default to YES. "
QObject::tr( "Only valid when FORMAT=GML3/GML3Degree/GML3.2. Default to YES. "
"If YES, SRS with EPSG authority will be written with the "
"'urn:ogc:def:crs:EPSG::' prefix. In the case, if the SRS is a "
"'urn:ogc:def:crs:EPSG::' prefix. In the case the SRS is a "
"geographic SRS without explicit AXIS order, but that the same "
"SRS authority code imported with ImportFromEPSGA() should be "
"treated as lat/long, then the function will take care of coordinate "
Expand Down Expand Up @@ -1260,7 +1260,7 @@ QMap<QString, QgsVectorFileWriter::MetaData> QgsVectorFileWriter::initMetaData()
layerOptions.clear();

datasetOptions.insert( QStringLiteral( "NameField" ), new StringOption(
QObject::tr( "Allows you to specify the field to use for the KML <name> element. " ),
QObject::tr( "Allows you to specify the field to use for the KML <name> element." ),
QStringLiteral( "Name" ) // Default value
) );

Expand Down Expand Up @@ -1423,7 +1423,7 @@ QMap<QString, QgsVectorFileWriter::MetaData> QgsVectorFileWriter::initMetaData()
layerOptions.clear();

datasetOptions.insert( QStringLiteral( "UPDATES" ), new SetOption(
QObject::tr( "Should update files be incorporated into the base data on the fly. " ),
QObject::tr( "Should update files be incorporated into the base data on the fly." ),
QStringList()
<< QStringLiteral( "APPLY" )
<< QStringLiteral( "IGNORE" ),
Expand Down Expand Up @@ -1622,7 +1622,7 @@ QMap<QString, QgsVectorFileWriter::MetaData> QgsVectorFileWriter::initMetaData()
layerOptions.insert( QStringLiteral( "COMPRESS_GEOM" ), new BoolOption(
QObject::tr( "If the format of the geometry BLOB is of the SpatiaLite flavor, "
"this option can be used to control if the compressed format for "
"geometries (LINESTRINGs, POLYGONs) must be used" ),
"geometries (LINESTRINGs, POLYGONs) must be used." ),
false // Default value
) );

Expand Down Expand Up @@ -1700,14 +1700,14 @@ QMap<QString, QgsVectorFileWriter::MetaData> QgsVectorFileWriter::initMetaData()
) );

datasetOptions.insert( QStringLiteral( "CONFIG" ), new StringOption(
QObject::tr( "path to the GCT : the GCT file describe the GeoConcept types definitions: "
QObject::tr( "Path to the GCT: the GCT file describes the GeoConcept types definitions: "
"In this file, every line must start with //# followed by a keyword. "
"Lines starting with // are comments." ),
QLatin1String( "" ) // Default value
) );

datasetOptions.insert( QStringLiteral( "FEATURETYPE" ), new StringOption(
QObject::tr( "defines the feature to be created. The TYPE corresponds to one of the Name "
QObject::tr( "Defines the feature to be created. The TYPE corresponds to one of the Name "
"found in the GCT file for a type section. The SUBTYPE corresponds to one of "
"the Name found in the GCT file for a sub-type section within the previous "
"type section." ),
Expand Down Expand Up @@ -1774,7 +1774,7 @@ QMap<QString, QgsVectorFileWriter::MetaData> QgsVectorFileWriter::initMetaData()
layerOptions.insert( QStringLiteral( "OGR_XLSX_HEADERS" ), new SetOption(
QObject::tr( "By default, the driver will read the first lines of each sheet to detect "
"if the first line might be the name of columns. If set to FORCE, the driver "
"will consider the first line will be taken as the header line. If set to "
"will consider the first line as the header line. If set to "
"DISABLE, it will be considered as the first feature. Otherwise "
"auto-detection will occur." ),
QStringList()
Expand Down Expand Up @@ -1814,7 +1814,7 @@ QMap<QString, QgsVectorFileWriter::MetaData> QgsVectorFileWriter::initMetaData()
layerOptions.insert( QStringLiteral( "OGR_ODS_HEADERS" ), new SetOption(
QObject::tr( "By default, the driver will read the first lines of each sheet to detect "
"if the first line might be the name of columns. If set to FORCE, the driver "
"will consider the first line will be taken as the header line. If set to "
"will consider the first line as the header line. If set to "
"DISABLE, it will be considered as the first feature. Otherwise "
"auto-detection will occur." ),
QStringList()
Expand Down
2 changes: 1 addition & 1 deletion src/gui/auth/qgsauthsslimportdialog.cpp
Expand Up @@ -159,7 +159,7 @@ void QgsAuthSslImportDialog::updateEnabledState()
bool connected = mSocket && mSocket->state() == QAbstractSocket::ConnectedState;
if ( connected && !mSocket->peerName().isEmpty() )
{
appendString( tr( "Connected to %1:%2" ).arg( mSocket->peerName() ).arg( mSocket->peerPort() ) );
appendString( tr( "Connected to %1: %2" ).arg( mSocket->peerName() ).arg( mSocket->peerPort() ) );
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/gui/editorwidgets/qgsvaluemapconfigdlg.cpp
Expand Up @@ -201,7 +201,7 @@ void QgsValueMapConfigDlg::loadFromCSVButtonPushed()
{
QMessageBox::information( nullptr,
tr( "Error" ),
tr( "Could not open file %1\nError was:%2" ).arg( fileName, f.errorString() ),
tr( "Could not open file %1\nError was: %2" ).arg( fileName, f.errorString() ),
QMessageBox::Cancel );
return;
}
Expand Down
8 changes: 4 additions & 4 deletions src/gui/qgsnewgeopackagelayerdialog.cpp
Expand Up @@ -304,7 +304,7 @@ bool QgsNewGeoPackageLayerDialog::apply()
hDS.reset( OGR_Dr_CreateDataSource( hGpkgDriver, fileName.toUtf8().constData(), nullptr ) );
if ( !hDS )
{
QString msg( tr( "Creation of database failed (OGR error:%1)" ).arg( QString::fromUtf8( CPLGetLastErrorMsg() ) ) );
QString msg( tr( "Creation of database failed (OGR error: %1)" ).arg( QString::fromUtf8( CPLGetLastErrorMsg() ) ) );
if ( !property( "hideDialogs" ).toBool() )
QMessageBox::critical( this, tr( "Layer creation failed" ), msg );
return false;
Expand All @@ -316,7 +316,7 @@ bool QgsNewGeoPackageLayerDialog::apply()
hDS.reset( OGROpen( fileName.toUtf8().constData(), true, &hDriver ) );
if ( !hDS )
{
QString msg( tr( "Opening of database failed (OGR error:%1)" ).arg( QString::fromUtf8( CPLGetLastErrorMsg() ) ) );
QString msg( tr( "Opening of database failed (OGR error: %1)" ).arg( QString::fromUtf8( CPLGetLastErrorMsg() ) ) );
if ( !property( "hideDialogs" ).toBool() )
QMessageBox::critical( this, tr( "Layer creation failed" ), msg );
return false;
Expand Down Expand Up @@ -401,7 +401,7 @@ bool QgsNewGeoPackageLayerDialog::apply()
OSRRelease( hSRS );
if ( !hLayer )
{
QString msg( tr( "Creation of layer failed (OGR error:%1)" ).arg( QString::fromUtf8( CPLGetLastErrorMsg() ) ) );
QString msg( tr( "Creation of layer failed (OGR error: %1)" ).arg( QString::fromUtf8( CPLGetLastErrorMsg() ) ) );
if ( !property( "hideDialogs" ).toBool() )
QMessageBox::critical( this, tr( "Layer creation failed" ), msg );
return false;
Expand Down Expand Up @@ -453,7 +453,7 @@ bool QgsNewGeoPackageLayerDialog::apply()
OGR_L_ResetReading( hLayer );
if ( CPLGetLastErrorType() != CE_None )
{
QString msg( tr( "Creation of layer failed (OGR error:%1)" ).arg( QString::fromUtf8( CPLGetLastErrorMsg() ) ) );
QString msg( tr( "Creation of layer failed (OGR error: %1)" ).arg( QString::fromUtf8( CPLGetLastErrorMsg() ) ) );
if ( !property( "hideDialogs" ).toBool() )
QMessageBox::critical( this, tr( "Layer creation failed" ), msg );
return false;
Expand Down
2 changes: 1 addition & 1 deletion src/gui/symbology/qgssmartgroupeditordialog.cpp
Expand Up @@ -194,7 +194,7 @@ void QgsSmartGroupEditorDialog::buttonBox_accepted()
{
if ( mNameLineEdit->text().isEmpty() )
{
QMessageBox::critical( this, tr( "Invalid name" ), tr( "The smart group name field is empty. Kindly provide a name" ) );
QMessageBox::critical( this, tr( "Invalid name" ), tr( "The smart group name field is empty. Kindly provide a name." ) );
return;
}
accept();
Expand Down
6 changes: 3 additions & 3 deletions src/providers/oracle/qgsoracleconn.cpp
Expand Up @@ -226,7 +226,7 @@ QStringList QgsOracleConn::pkCandidates( QString ownerName, QString viewName )
if ( !exec( qry, QString( "SELECT column_name FROM all_tab_columns WHERE owner=? AND table_name=? ORDER BY column_id" ),
QVariantList() << ownerName << viewName ) )
{
QgsMessageLog::logMessage( tr( "SQL:%1 [owner:%2 table_name:%3]\nerror:%4\n" ).arg( qry.lastQuery(), qry.lastError().text(), ownerName, viewName ), tr( "Oracle" ) );
QgsMessageLog::logMessage( tr( "SQL: %1 [owner: %2 table_name: %3]\nerror: %4\n" ).arg( qry.lastQuery(), qry.lastError().text(), ownerName, viewName ), tr( "Oracle" ) );
return cols;
}

Expand Down Expand Up @@ -275,7 +275,7 @@ bool QgsOracleConn::tableInfo( bool geometryColumnsOnly, bool userTablesOnly, bo
QSqlQuery qry( mDatabase );
if ( !exec( qry, sql, QVariantList() ) )
{
QgsMessageLog::logMessage( tr( "Querying available tables failed.\nSQL:%1\nerror:%2\n" ).arg( qry.lastQuery() ).arg( qry.lastError().text() ), tr( "Oracle" ) );
QgsMessageLog::logMessage( tr( "Querying available tables failed.\nSQL: %1\nerror: %2\n" ).arg( qry.lastQuery() ).arg( qry.lastError().text() ), tr( "Oracle" ) );
return false;
}

Expand Down Expand Up @@ -484,7 +484,7 @@ void QgsOracleConn::retrieveLayerTypes( QgsOracleLayerProperty &layerProperty, b
.arg( table )
.arg( where.isEmpty() ? "" : QString( " AND (%1)" ).arg( where ) ), QVariantList() ) )
{
QgsMessageLog::logMessage( tr( "SQL:%1\nerror:%2\n" )
QgsMessageLog::logMessage( tr( "SQL: %1\nerror: %2\n" )
.arg( qry.lastQuery() )
.arg( qry.lastError().text() ),
tr( "Oracle" ) );
Expand Down

0 comments on commit cd17832

Please sign in to comment.