Skip to content
Permalink
Browse files

Merge pull request #5508 from DelazJ/message_spacing

Fixing messages displayed in GUI
  • Loading branch information
nyalldawson committed Nov 1, 2017
2 parents ac6c598 + a87cde2 commit 7dc48f3a1798eb7187b5f21fb826556890355226
Showing with 238 additions and 238 deletions.
  1. +3 −3 python/plugins/MetaSearch/dialogs/manageconnectionsdialog.py
  2. +5 −5 python/plugins/MetaSearch/dialogs/newconnectiondialog.py
  3. +8 −6 python/plugins/db_manager/dlg_table_properties.py
  4. +3 −3 python/plugins/db_manager/ui/DlgDbError.ui
  5. +2 −2 python/plugins/processing/gui/BatchPanel.py
  6. +1 −1 python/pyplugin_installer/qgsplugininstallerfetchingbase.ui
  7. +5 −5 src/app/dwg/qgsdwgimporter.cpp
  8. +2 −2 src/app/main.cpp
  9. +10 −10 src/app/qgisapp.cpp
  10. +4 −4 src/app/qgsbookmarks.cpp
  11. +2 −2 src/app/qgsloadstylefromdbdialog.cpp
  12. +2 −2 src/app/qgsmapthemes.cpp
  13. +2 −2 src/app/qgsmaptooladdring.cpp
  14. +1 −1 src/app/qgsoptions.cpp
  15. +9 −9 src/app/qgsvectorlayerproperties.cpp
  16. +1 −1 src/core/expression/qgsexpressionnodeimpl.cpp
  17. +1 −1 src/core/geocms/geonode/qgsgeonoderequest.cpp
  18. +1 −1 src/core/processing/qgsprocessingutils.cpp
  19. +3 −3 src/core/qgsgeometryvalidator.cpp
  20. +1 −1 src/core/qgssqlstatement.cpp
  21. +22 −22 src/core/qgsvectorfilewriter.cpp
  22. +8 −8 src/gui/auth/qgsauthauthoritieseditor.cpp
  23. +10 −10 src/gui/auth/qgsauthguiutils.cpp
  24. +3 −3 src/gui/auth/qgsauthidentitieseditor.cpp
  25. +3 −3 src/gui/auth/qgsauthserverseditor.cpp
  26. +1 −1 src/gui/auth/qgsauthsslimportdialog.cpp
  27. +1 −1 src/gui/editorwidgets/qgsvaluemapconfigdlg.cpp
  28. +1 −1 src/gui/ogr/qgsnewogrconnection.cpp
  29. +29 −29 src/gui/qgsmanageconnectionsdialog.cpp
  30. +4 −4 src/gui/qgsnewgeopackagelayerdialog.cpp
  31. +2 −2 src/gui/qgsnewhttpconnection.cpp
  32. +1 −1 src/gui/qgsowssourceselect.cpp
  33. +3 −3 src/gui/qgssqlcomposerdialog.cpp
  34. +6 −6 src/gui/symbology/qgscategorizedsymbolrendererwidget.cpp
  35. +1 −1 src/gui/symbology/qgssmartgroupeditordialog.cpp
  36. +3 −3 src/gui/symbology/qgsstyleexportimportdialog.cpp
  37. +1 −1 src/plugins/gps_importer/qgsgpsdevicedialog.cpp
  38. +3 −3 src/providers/db2/qgsdb2newconnection.cpp
  39. +1 −1 src/providers/db2/qgsdb2sourceselect.cpp
  40. +5 −7 src/providers/gdal/qgsgdalprovider.cpp
  41. +3 −3 src/providers/geonode/qgsgeonodesourceselect.cpp
  42. +3 −3 src/providers/grass/qgsgrass.cpp
  43. +2 −2 src/providers/mssql/qgsmssqlnewconnection.cpp
  44. +1 −1 src/providers/mssql/qgsmssqlsourceselect.cpp
  45. +3 −3 src/providers/oracle/qgsoracleconn.cpp
  46. +2 −2 src/providers/oracle/qgsoraclefeatureiterator.cpp
  47. +3 −3 src/providers/oracle/qgsoraclenewconnection.cpp
  48. +6 −6 src/providers/oracle/qgsoracleprovider.cpp
  49. +1 −1 src/providers/oracle/qgsoraclesourceselect.cpp
  50. +3 −3 src/providers/postgres/qgspgnewconnection.cpp
  51. +1 −1 src/providers/postgres/qgspgsourceselect.cpp
  52. +2 −2 src/providers/postgres/qgspostgresconn.cpp
  53. +3 −3 src/providers/spatialite/qgsspatialitesourceselect.cpp
  54. +3 −3 src/providers/wcs/qgswcscapabilities.cpp
  55. +5 −5 src/providers/wcs/qgswcsprovider.cpp
  56. +9 −9 src/providers/wfs/qgswfsprovider.cpp
  57. +1 −1 src/providers/wfs/qgswfssourceselect.cpp
  58. +1 −1 src/providers/wms/qgswmscapabilities.cpp
  59. +9 −9 src/providers/wms/qgswmsprovider.cpp
  60. +2 −2 src/providers/wms/qgswmssourceselect.cpp
  61. +1 −1 src/ui/qgsdelimitedtextsourceselectbase.ui
@@ -72,11 +72,11 @@ def select_file(self):
label = self.tr('eXtensible Markup Language (*.xml *.XML)')

if self.mode == 0:
slabel = self.tr('Save connections')
slabel = self.tr('Save Connections')
self.filename, filter = QFileDialog.getSaveFileName(self, slabel,
'.', label)
else:
slabel = self.tr('Load connections')
slabel = self.tr('Load Connections')
self.filename, selected_filter = QFileDialog.getOpenFileName(self, slabel,
'.', label)

@@ -134,7 +134,7 @@ def save(self, connections):
with open(self.filename, 'w') as fileobj:
fileobj.write(prettify_xml(etree.tostring(doc)))
QMessageBox.information(self, self.tr('Save Connections'),
self.tr('Saved to {0}').format(self.filename))
self.tr('Saved to {0}.').format(self.filename))
self.reject()

def load(self, items):
@@ -59,13 +59,13 @@ def accept(self):
conn_password = self.lePassword.text().strip()

if any([conn_name == '', conn_url == '']):
QMessageBox.warning(self, self.tr('Save connection'),
self.tr('Both Name and URL must be provided'))
QMessageBox.warning(self, self.tr('Save Connection'),
self.tr('Both Name and URL must be provided.'))
return

if '/' in conn_name:
QMessageBox.warning(self, self.tr('Save connection'),
self.tr('Name cannot contain \'/\''))
QMessageBox.warning(self, self.tr('Save Connection'),
self.tr('Name cannot contain \'/\'.'))
return

if conn_name is not None:
@@ -76,7 +76,7 @@ def accept(self):
# warn if entry was renamed to an existing connection
if all([self.conn_name_orig != conn_name,
self.settings.contains(keyurl)]):
res = QMessageBox.warning(self, self.tr('Save connection'),
res = QMessageBox.warning(self, self.tr('Save Connection'),
self.tr('Overwrite {0}?').format(conn_name),
QMessageBox.Ok | QMessageBox.Cancel)
if res == QMessageBox.Cancel:
@@ -167,7 +167,8 @@ def deleteColumn(self):
m = self.viewFields.model()
fld = m.getObject(index)

res = QMessageBox.question(self, self.tr("Are you sure"), self.tr("Really delete column '{0}'?").format(fld.name),
res = QMessageBox.question(self, self.tr("Delete Column"),
self.tr("Are you sure you want to delete column '{0}'?").format(fld.name),
QMessageBox.Yes | QMessageBox.No)
if res != QMessageBox.Yes:
return
@@ -218,8 +219,8 @@ def deleteConstraint(self):
m = self.viewConstraints.model()
constr = m.getObject(index)

res = QMessageBox.question(self, self.tr("Are you sure"),
self.tr("Really delete constraint '{0}'?").format(constr.name),
res = QMessageBox.question(self, self.tr("Delete Constraint"),
self.tr("Are you sure you want to delete constraint '{0}'?").format(constr.name),
QMessageBox.Yes | QMessageBox.No)
if res != QMessageBox.Yes:
return
@@ -271,10 +272,10 @@ def createIndex(self):
def createSpatialIndex(self):
""" create spatial index for the geometry column """
if self.table.type != self.table.VectorType:
QMessageBox.information(self, self.tr("DB Manager"), self.tr("The selected table has no geometry"))
QMessageBox.information(self, self.tr("DB Manager"), self.tr("The selected table has no geometry."))
return

res = QMessageBox.question(self, self.tr("Create?"),
res = QMessageBox.question(self, self.tr("Create Spatial Index"),
self.tr("Create spatial index for field {0}?").format(self.table.geomColumn),
QMessageBox.Yes | QMessageBox.No)
if res != QMessageBox.Yes:
@@ -308,7 +309,8 @@ def deleteIndex(self):
m = self.viewIndexes.model()
idx = m.getObject(index)

res = QMessageBox.question(self, self.tr("Are you sure"), self.tr("Really delete index '{0}'?").format(idx.name),
res = QMessageBox.question(self, self.tr("Delete Index"),
self.tr("Are you sure you want to delete index '{0}'?").format(idx.name),
QMessageBox.Yes | QMessageBox.No)
if res != QMessageBox.Yes:
return
@@ -27,7 +27,7 @@
<item>
<widget class="QLabel" name="label_3">
<property name="text">
<string>An error occurred:</string>
<string>An error occurred</string>
</property>
</widget>
</item>
@@ -51,7 +51,7 @@
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>An error occurred when executing a query:</string>
<string>An error occurred when executing a query</string>
</property>
</widget>
</item>
@@ -68,7 +68,7 @@
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Query:</string>
<string>Query</string>
</property>
</widget>
</item>
@@ -142,7 +142,7 @@ def initWidgets(self):

def load(self):
filename, selected_filter = QFileDialog.getOpenFileName(self,
self.tr('Open batch'), None,
self.tr('Open Batch'), None,
self.tr('JSON files (*.json)'))
if filename:
with open(filename) as f:
@@ -216,7 +216,7 @@ def save(self):
toSave.append({self.PARAMETERS: algParams, self.OUTPUTS: algOutputs})

filename, __ = QFileDialog.getSaveFileName(self,
self.tr('Save batch'),
self.tr('Save Batch'),
None,
self.tr('JSON files (*.json)'))
if filename:
@@ -33,7 +33,7 @@
<item row="2" column="0" >
<widget class="QLabel" name="label1" >
<property name="text" >
<string>Overall progress:</string>
<string>Overall progress</string>
</property>
</widget>
</item>
@@ -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;
@@ -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 );
@@ -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() ) ) );
}
}
@@ -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;
@@ -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" ) );
}
@@ -302,7 +302,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
{
@@ -327,7 +327,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 );
}
}
@@ -4047,7 +4047,7 @@ void QgisApp::about()
#ifdef HAVE_POSTGRESQL
versionString += PG_VERSION;
#else
versionString += tr( "No support." );
versionString += tr( "No support" );
#endif
versionString += QLatin1String( "</td>" );

@@ -4205,14 +4205,14 @@ bool QgisApp::addVectorLayers( const QStringList &layerQStringList, const QStrin
}
else
{
QString msg = tr( "%1 doesn't have any layers" ).arg( src );
QString msg = tr( "%1 doesn't have any layers." ).arg( src );
messageBar()->pushMessage( tr( "Invalid Data Source" ), msg, QgsMessageBar::CRITICAL, messageTimeout() );
delete layer;
}
}
else
{
QString msg = tr( "%1 is not a valid or recognized data source" ).arg( src );
QString msg = tr( "%1 is not a valid or recognized data source." ).arg( src );
messageBar()->pushMessage( tr( "Invalid Data Source" ), msg, QgsMessageBar::CRITICAL, messageTimeout() );

// since the layer is bad, stomp on it
@@ -7606,7 +7606,7 @@ void QgisApp::mergeAttributesOfSelectedFeatures()
{
messageBar()->pushMessage(
tr( "Not enough features selected" ),
tr( "The merge tool requires at least two selected features" ),
tr( "The merge tool requires at least two selected features." ),
QgsMessageBar::WARNING );
return;
}
@@ -7761,7 +7761,7 @@ void QgisApp::mergeSelectedFeatures()
{
messageBar()->pushMessage(
tr( "Merge failed" ),
tr( "An error occurred during the merge operation" ),
tr( "An error occurred during the merge operation." ),
QgsMessageBar::CRITICAL );
}
return;
@@ -7797,7 +7797,7 @@ void QgisApp::mergeSelectedFeatures()
{
messageBar()->pushMessage(
tr( "Merge failed" ),
tr( "An error occurred during the merge operation" ),
tr( "An error occurred during the merge operation." ),
QgsMessageBar::CRITICAL );
}
return;
@@ -7823,7 +7823,7 @@ void QgisApp::mergeSelectedFeatures()
{
messageBar()->pushMessage(
tr( "Invalid result" ),
tr( "Could not store value '%1' in field of type %2" ).arg( attrs.at( i ).toString(), vl->fields().at( i ).typeName() ),
tr( "Could not store value '%1' in field of type %2." ).arg( attrs.at( i ).toString(), vl->fields().at( i ).typeName() ),
QgsMessageBar::WARNING );
}
attrs[i] = val;
@@ -7953,7 +7953,7 @@ void QgisApp::selectAll()
{
messageBar()->pushMessage(
tr( "No active vector layer" ),
tr( "To select all, choose a vector layer in the legend" ),
tr( "To select all, choose a vector layer in the legend." ),
QgsMessageBar::INFO,
messageTimeout() );
return;
@@ -7977,7 +7977,7 @@ void QgisApp::selectByExpression()
{
messageBar()->pushMessage(
tr( "No active vector layer" ),
tr( "To select features, choose a vector layer in the legend" ),
tr( "To select features, choose a vector layer in the legend." ),
QgsMessageBar::INFO,
messageTimeout() );
return;
@@ -7997,7 +7997,7 @@ void QgisApp::selectByForm()
{
messageBar()->pushMessage(
tr( "No active vector layer" ),
tr( "To select features, choose a vector layer in the legend" ),
tr( "To select features, choose a vector layer in the legend." ),
QgsMessageBar::INFO,
messageTimeout() );
return;
@@ -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() ) );
}
@@ -194,7 +194,7 @@ void QgsBookmarks::deleteClicked()
return;

// make sure the user really wants to delete these bookmarks
if ( QMessageBox::Cancel == QMessageBox::information( this, tr( "Really Delete?" ),
if ( QMessageBox::Cancel == QMessageBox::information( this, tr( "Delete Bookmarks" ),
tr( "Are you sure you want to delete %n bookmark(s)?", "number of rows", rows.size() ),
QMessageBox::Ok | QMessageBox::Cancel ) )
return;
@@ -236,7 +236,7 @@ void QgsBookmarks::zoomToBookmark()
rect = ct.transform( rect );
if ( rect.isEmpty() )
{
QMessageBox::warning( this, tr( "Empty extent" ), tr( "Reprojected extent is empty." ) );
QMessageBox::warning( this, tr( "Empty Extent" ), tr( "Reprojected extent is empty." ) );
return;
}
}
@@ -326,7 +326,7 @@ void QgsBookmarks::exportToXml()
QgsSettings settings;

QString lastUsedDir = settings.value( QStringLiteral( "Windows/Bookmarks/LastUsedDirectory" ), QDir::homePath() ).toString();
QString fileName = QFileDialog::getSaveFileName( this, tr( "Export bookmarks" ), lastUsedDir,
QString fileName = QFileDialog::getSaveFileName( this, tr( "Export Bookmarks" ), lastUsedDir,
tr( "XML files (*.xml *.XML)" ) );
if ( fileName.isEmpty() )
{
@@ -166,7 +166,7 @@ void QgsLoadStyleFromDBDialog::deleteStyleFromDB()
QString msgError;
QString opInfo = QObject::tr( "Delete style %1 from %2" ).arg( mSelectedStyleName, mLayer->providerType() );

if ( QMessageBox::question( nullptr, QObject::tr( "Delete style" ),
if ( QMessageBox::question( nullptr, QObject::tr( "Delete Style" ),
QObject::tr( "Are you sure you want to delete the style %1?" ).arg( mSelectedStyleName ),
QMessageBox::Yes | QMessageBox::No, QMessageBox::No ) != QMessageBox::Yes )
return;
@@ -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
{
@@ -110,7 +110,7 @@ void QgsMapThemes::addPreset()
dlg.setWindowTitle( tr( "Map Themes" ) );
dlg.setHintString( tr( "Name of the new theme" ) );
dlg.setOverwriteEnabled( false );
dlg.setConflictingNameWarning( tr( "A theme with this name already exists" ) );
dlg.setConflictingNameWarning( tr( "A theme with this name already exists." ) );
if ( dlg.exec() != QDialog::Accepted || dlg.name().isEmpty() )
return;

@@ -133,7 +133,7 @@ void QgsMapThemes::replaceTriggered()
if ( !actionPreset )
return;

int res = QMessageBox::question( mMenu, tr( "Replace theme" ),
int res = QMessageBox::question( mMenu, tr( "Replace Theme" ),
trUtf8( "Are you sure you want to replace the existing theme “%1”?" ).arg( actionPreset->text() ),
QMessageBox::Yes | QMessageBox::No, QMessageBox::No );
if ( res != QMessageBox::Yes )
@@ -65,7 +65,7 @@ void QgsMapToolAddRing::cadCanvasReleaseEvent( QgsMapMouseEvent *e )
else if ( error == 2 )
{
//problem with coordinate transformation
emit messageEmitted( tr( "Cannot transform the point to the layers coordinate system" ), QgsMessageBar::WARNING );
emit messageEmitted( tr( "Cannot transform the point to the layers coordinate system." ), QgsMessageBar::WARNING );
return;
}

@@ -126,7 +126,7 @@ void QgsMapToolAddRing::cadCanvasReleaseEvent( QgsMapMouseEvent *e )
{
errorMessage = tr( "an unknown error occurred" );
}
emit messageEmitted( tr( "could not add ring since %1." ).arg( errorMessage ), QgsMessageBar::CRITICAL );
emit messageEmitted( tr( "Could not add ring since %1." ).arg( errorMessage ), QgsMessageBar::CRITICAL );
vlayer->destroyEditCommand();
}
else
@@ -1738,7 +1738,7 @@ QStringList QgsOptions::i18nList()
void QgsOptions::restoreDefaultWindowState()
{
// richard
if ( QMessageBox::warning( this, tr( "Restore UI defaults" ), tr( "Are you sure to reset the UI to default (needs restart)?" ), QMessageBox::Ok | QMessageBox::Cancel ) == QMessageBox::Cancel )
if ( QMessageBox::warning( this, tr( "Restore UI Defaults" ), tr( "Are you sure to reset the UI to default (needs restart)?" ), QMessageBox::Ok | QMessageBox::Cancel ) == QMessageBox::Cancel )
return;
mSettings->setValue( QStringLiteral( "/qgis/restoreDefaultWindowState" ), true );
}

0 comments on commit 7dc48f3

Please sign in to comment.
You can’t perform that action at this time.