From ed99ba9d08f0ed40ff42b47c85e2905e76f902b4 Mon Sep 17 00:00:00 2001 From: Harrissou Sant-anna Date: Wed, 21 Feb 2018 03:17:06 +0100 Subject: [PATCH] Updating some dialogs caption --- src/gui/qgsmaplayerstylemanagerwidget.cpp | 2 ++ src/gui/qgsnewauxiliaryfielddialog.cpp | 8 ++--- src/gui/qgsnewgeopackagelayerdialog.cpp | 28 +++++++-------- src/gui/qgsoptionsdialogbase.cpp | 2 +- src/gui/qgsowssourceselect.cpp | 6 ++-- src/gui/qgsquerybuilder.cpp | 8 ++--- src/gui/qgsrasterformatsaveoptionswidget.cpp | 2 +- src/gui/qgsrasterlayersaveasdialog.cpp | 2 +- src/gui/qgssearchquerybuilder.cpp | 28 +++++++-------- src/gui/qgssqlcomposerdialog.cpp | 4 +-- src/gui/qgssubstitutionlistwidget.cpp | 14 ++++---- src/gui/qgsvariableeditorwidget.cpp | 2 +- src/gui/raster/qgspalettedrendererwidget.cpp | 10 +++--- .../raster/qgsrastertransparencywidget.cpp | 10 +++--- ...qgssinglebandpseudocolorrendererwidget.cpp | 16 ++++----- .../qgscategorizedsymbolrendererwidget.cpp | 14 ++++---- .../qgsgraduatedsymbolrendererwidget.cpp | 10 +++--- src/gui/symbology/qgsrendererwidget.cpp | 2 +- .../symbology/qgsrulebasedrendererwidget.cpp | 8 ++--- .../symbology/qgssmartgroupeditordialog.cpp | 2 +- .../symbology/qgsstyleexportimportdialog.cpp | 20 +++++------ src/gui/symbology/qgsstylemanagerdialog.cpp | 36 +++++++++---------- src/gui/symbology/qgssymbollayerwidget.cpp | 12 +++---- 23 files changed, 124 insertions(+), 122 deletions(-) diff --git a/src/gui/qgsmaplayerstylemanagerwidget.cpp b/src/gui/qgsmaplayerstylemanagerwidget.cpp index a25d32a2b67..38c7bbcab85 100644 --- a/src/gui/qgsmaplayerstylemanagerwidget.cpp +++ b/src/gui/qgsmaplayerstylemanagerwidget.cpp @@ -185,6 +185,7 @@ void QgsMapLayerStyleManagerWidget::saveAsDefault() if ( layer->dataProvider()->isSaveAndLoadStyleToDatabaseSupported() ) { QMessageBox askToUser; + askToUser.setWindowTitle( tr( "Save Style" ) ); askToUser.setText( tr( "Save default style to: " ) ); askToUser.setIcon( QMessageBox::Question ); askToUser.addButton( tr( "Cancel" ), QMessageBox::RejectRole ); @@ -227,6 +228,7 @@ void QgsMapLayerStyleManagerWidget::loadDefault() if ( layer->dataProvider()->isSaveAndLoadStyleToDatabaseSupported() ) { QMessageBox askToUser; + askToUser.setWindowTitle( tr( "Load Style" ) ); askToUser.setText( tr( "Load default style from: " ) ); askToUser.setIcon( QMessageBox::Question ); askToUser.addButton( tr( "Cancel" ), QMessageBox::RejectRole ); diff --git a/src/gui/qgsnewauxiliaryfielddialog.cpp b/src/gui/qgsnewauxiliaryfielddialog.cpp index d2c64083bb8..f0d1c4a00fa 100644 --- a/src/gui/qgsnewauxiliaryfielddialog.cpp +++ b/src/gui/qgsnewauxiliaryfielddialog.cpp @@ -79,14 +79,14 @@ void QgsNewAuxiliaryFieldDialog::accept() const int idx = mLayer->fields().lookupField( fieldName ); if ( idx >= 0 ) { - const QString title = tr( "Invalid name" ); - const QString msg = tr( "Auxiliary field '%1' already exists" ).arg( fieldName ); + const QString title = tr( "New Auxiliary Field" ); + const QString msg = tr( "Invalid name. Auxiliary field '%1' already exists." ).arg( fieldName ); QMessageBox::critical( this, title, msg, QMessageBox::Ok ); } else if ( def.comment().isEmpty() ) { - const QString title = tr( "Invalid name" ); - const QString msg = tr( "Name is a mandatory parameter" ); + const QString title = tr( "New Auxiliary Field" ); + const QString msg = tr( "Name is a mandatory parameter." ); QMessageBox::critical( this, title, msg, QMessageBox::Ok ); } else diff --git a/src/gui/qgsnewgeopackagelayerdialog.cpp b/src/gui/qgsnewgeopackagelayerdialog.cpp index bd654964573..b81c8f66c90 100644 --- a/src/gui/qgsnewgeopackagelayerdialog.cpp +++ b/src/gui/qgsnewgeopackagelayerdialog.cpp @@ -198,7 +198,7 @@ void QgsNewGeoPackageLayerDialog::mAddAttributeButton_clicked() QString myName = mFieldNameEdit->text(); if ( myName == mFeatureIdColumnEdit->text() ) { - QMessageBox::critical( this, tr( "Invalid field name" ), tr( "The field cannot have the same name as the feature identifier" ) ); + QMessageBox::critical( this, tr( "Add Field" ), tr( "The field cannot have the same name as the feature identifier." ) ); return; } @@ -259,8 +259,8 @@ bool QgsNewGeoPackageLayerDialog::apply() { QMessageBox msgBox; msgBox.setIcon( QMessageBox::Question ); - msgBox.setWindowTitle( tr( "The File Already Exists." ) ); - msgBox.setText( tr( "Do you want to overwrite the existing file with a new database or add a new layer to it?" ) ); + msgBox.setWindowTitle( tr( "New GeoPackage Layer" ) ); + msgBox.setText( tr( "The File already exists. Do you want to overwrite the existing file with a new database or add a new layer to it?" ) ); QPushButton *overwriteButton = msgBox.addButton( tr( "Overwrite" ), QMessageBox::ActionRole ); QPushButton *addNewLayerButton = msgBox.addButton( tr( "Add new layer" ), QMessageBox::ActionRole ); msgBox.setStandardButtons( QMessageBox::Cancel ); @@ -311,8 +311,8 @@ bool QgsNewGeoPackageLayerDialog::apply() if ( !hGpkgDriver ) { if ( !property( "hideDialogs" ).toBool() ) - QMessageBox::critical( this, tr( "Layer creation failed" ), - tr( "GeoPackage driver not found" ) ); + QMessageBox::critical( this, tr( "New GeoPackage Layer" ), + tr( "Layer creation failed. GeoPackage driver not found." ) ); return false; } @@ -324,7 +324,7 @@ bool QgsNewGeoPackageLayerDialog::apply() { 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 ); + QMessageBox::critical( this, tr( "New GeoPackage Layer" ), msg ); return false; } } @@ -336,14 +336,14 @@ bool QgsNewGeoPackageLayerDialog::apply() { 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 ); + QMessageBox::critical( this, tr( "New GeoPackage Layer" ), msg ); return false; } if ( hDriver != hGpkgDriver ) { - QString msg( tr( "Opening of file succeeded, but this is not a GeoPackage database" ) ); + QString msg( tr( "Opening of file succeeded, but this is not a GeoPackage database." ) ); if ( !property( "hideDialogs" ).toBool() ) - QMessageBox::critical( this, tr( "Layer creation failed" ), msg ); + QMessageBox::critical( this, tr( "New GeoPackage Layer" ), msg ); return false; } } @@ -357,7 +357,7 @@ bool QgsNewGeoPackageLayerDialog::apply() { overwriteTable = property( "question_existing_layer_answer_overwrite" ).toBool(); } - else if ( QMessageBox::question( this, tr( "Existing layer" ), + else if ( QMessageBox::question( this, tr( "New GeoPackage Layer" ), tr( "A table with the same name already exists. Do you want to overwrite it?" ), QMessageBox::Yes | QMessageBox::No, QMessageBox::No ) == QMessageBox::Yes ) { @@ -421,7 +421,7 @@ bool QgsNewGeoPackageLayerDialog::apply() { 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 ); + QMessageBox::critical( this, tr( "New GeoPackage Layer" ), msg ); return false; } @@ -455,7 +455,7 @@ bool QgsNewGeoPackageLayerDialog::apply() { if ( !property( "hideDialogs" ).toBool() ) { - QMessageBox::critical( this, tr( "Layer creation failed" ), + QMessageBox::critical( this, tr( "New GeoPackage Layer" ), tr( "Creation of field %1 failed (OGR error: %2)" ) .arg( fieldName, QString::fromUtf8( CPLGetLastErrorMsg() ) ) ); } @@ -473,7 +473,7 @@ bool QgsNewGeoPackageLayerDialog::apply() { 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 ); + QMessageBox::critical( this, tr( "New GeoPackage Layer" ), msg ); return false; } hDS.reset(); @@ -494,7 +494,7 @@ bool QgsNewGeoPackageLayerDialog::apply() else { if ( !property( "hideDialogs" ).toBool() ) - QMessageBox::critical( this, tr( "Invalid Layer" ), tr( "%1 is an invalid layer and cannot be loaded." ).arg( tableName ) ); + QMessageBox::critical( this, tr( "New GeoPackage Layer" ), tr( "%1 is an invalid layer and cannot be loaded." ).arg( tableName ) ); delete layer; } diff --git a/src/gui/qgsoptionsdialogbase.cpp b/src/gui/qgsoptionsdialogbase.cpp index 69e901f6dfa..eb29f067db0 100644 --- a/src/gui/qgsoptionsdialogbase.cpp +++ b/src/gui/qgsoptionsdialogbase.cpp @@ -393,7 +393,7 @@ void QgsOptionsDialogBase::optionsStackedWidget_WidgetRemoved( int index ) void QgsOptionsDialogBase::warnAboutMissingObjects() { - QMessageBox::warning( nullptr, tr( "Missing objects" ), + QMessageBox::warning( nullptr, tr( "Missing Objects" ), tr( "Base options dialog could not be initialized.\n\n" "Missing some of the .ui template objects:\n" ) + " mOptionsListWidget,\n mOptionsStackedWidget,\n mOptionsSplitter,\n mOptionsListFrame", diff --git a/src/gui/qgsowssourceselect.cpp b/src/gui/qgsowssourceselect.cpp index 29f95cfab75..bb96429783a 100644 --- a/src/gui/qgsowssourceselect.cpp +++ b/src/gui/qgsowssourceselect.cpp @@ -289,7 +289,7 @@ void QgsOWSSourceSelect::mDeleteButton_clicked() { QString msg = tr( "Are you sure you want to remove the %1 connection and all associated settings?" ) .arg( mConnectionsComboBox->currentText() ); - QMessageBox::StandardButton result = QMessageBox::question( this, tr( "Confirm Delete" ), msg, QMessageBox::Yes | QMessageBox::No ); + QMessageBox::StandardButton result = QMessageBox::question( this, tr( "Delete Connection" ), msg, QMessageBox::Yes | QMessageBox::No ); if ( result == QMessageBox::Yes ) { QgsOwsConnection::deleteConnection( mService, mConnectionsComboBox->currentText() ); @@ -631,9 +631,9 @@ void QgsOWSSourceSelect::addDefaultServers() settings.endGroup(); populateConnectionList(); - QMessageBox::information( this, tr( "WMS proxies" ), "

" + tr( "Several WMS servers have " + QMessageBox::information( this, tr( "Add WMS Servers" ), "

" + tr( "Several WMS servers have " "been added to the server list. Note that if " - "you access the internet via a web proxy, you will " + "you access the Internet via a web proxy, you will " "need to set the proxy settings in the QGIS options dialog." ) + "

" ); } diff --git a/src/gui/qgsquerybuilder.cpp b/src/gui/qgsquerybuilder.cpp index 46753dd9698..f8535d928b5 100644 --- a/src/gui/qgsquerybuilder.cpp +++ b/src/gui/qgsquerybuilder.cpp @@ -233,7 +233,7 @@ void QgsQueryBuilder::test() else if ( mLayer->dataProvider()->hasErrors() ) { QMessageBox::warning( this, - tr( "Query Failed" ), + tr( "Query Result" ), tr( "An error occurred when executing the query." ) + tr( "\nThe data provider said:\n%1" ).arg( mLayer->dataProvider()->errors().join( QStringLiteral( "\n" ) ) ) ); mLayer->dataProvider()->clearErrors(); @@ -241,7 +241,7 @@ void QgsQueryBuilder::test() else { QMessageBox::warning( this, - tr( "Query Failed" ), + tr( "Query Result" ), tr( "An error occurred when executing the query." ) ); } } @@ -254,14 +254,14 @@ void QgsQueryBuilder::accept() if ( mLayer->dataProvider()->hasErrors() ) { QMessageBox::warning( this, - tr( "Query Failed" ), + tr( "Query Result" ), tr( "An error occurred when executing the query." ) + tr( "\nThe data provider said:\n%1" ).arg( mLayer->dataProvider()->errors().join( QStringLiteral( "\n" ) ) ) ); mLayer->dataProvider()->clearErrors(); } else { - QMessageBox::warning( this, tr( "Error in Query" ), tr( "The subset string could not be set" ) ); + QMessageBox::warning( this, tr( "Query Result" ), tr( "Error in query. The subset string could not be set." ) ); } return; diff --git a/src/gui/qgsrasterformatsaveoptionswidget.cpp b/src/gui/qgsrasterformatsaveoptionswidget.cpp index 3df98800f01..4e23c32028a 100644 --- a/src/gui/qgsrasterformatsaveoptionswidget.cpp +++ b/src/gui/qgsrasterformatsaveoptionswidget.cpp @@ -378,7 +378,7 @@ QString QgsRasterFormatSaveOptionsWidget::validateOptions( bool gui, bool report } else if ( ! createOptions.isEmpty() ) { - QMessageBox::information( this, QLatin1String( "" ), tr( "Cannot validate creation options" ), QMessageBox::Close ); + QMessageBox::information( this, QLatin1String( "" ), tr( "Cannot validate creation options." ), QMessageBox::Close ); if ( tmpLayer ) delete rasterLayer; return QString(); diff --git a/src/gui/qgsrasterlayersaveasdialog.cpp b/src/gui/qgsrasterlayersaveasdialog.cpp index bb3b6370209..b50f90374eb 100644 --- a/src/gui/qgsrasterlayersaveasdialog.cpp +++ b/src/gui/qgsrasterlayersaveasdialog.cpp @@ -197,7 +197,7 @@ QgsRasterLayerSaveAsDialog::QgsRasterLayerSaveAsDialog( QgsRasterLayer *rasterLa if ( files.isEmpty() ) break; - if ( QMessageBox::warning( this, tr( "Warning" ), + if ( QMessageBox::warning( this, tr( "Save Raster Layer" ), tr( "The directory %1 contains files which will be overwritten: %2" ).arg( dir.absolutePath(), files.join( QStringLiteral( ", " ) ) ), QMessageBox::Ok | QMessageBox::Cancel ) == QMessageBox::Ok ) break; diff --git a/src/gui/qgssearchquerybuilder.cpp b/src/gui/qgssearchquerybuilder.cpp index e814fa57ba6..5bbad92cd45 100644 --- a/src/gui/qgssearchquerybuilder.cpp +++ b/src/gui/qgssearchquerybuilder.cpp @@ -195,7 +195,7 @@ void QgsSearchQueryBuilder::btnTest_clicked() if ( count == -1 ) return; - QMessageBox::information( this, tr( "Search results" ), tr( "Found %n matching feature(s).", "test result", count ) ); + QMessageBox::information( this, tr( "Test Query" ), tr( "Found %n matching feature(s).", "test result", count ) ); } // This method tests the number of records that would be returned @@ -204,7 +204,7 @@ long QgsSearchQueryBuilder::countRecords( const QString &searchString ) QgsExpression search( searchString ); if ( search.hasParserError() ) { - QMessageBox::critical( this, tr( "Search string parsing error" ), search.parserErrorString() ); + QMessageBox::critical( this, tr( "Query Result" ), search.parserErrorString() ); return -1; } @@ -220,7 +220,7 @@ long QgsSearchQueryBuilder::countRecords( const QString &searchString ) if ( !search.prepare( &context ) ) { - QMessageBox::critical( this, tr( "Evaluation error" ), search.evalErrorString() ); + QMessageBox::critical( this, tr( "Query Result" ), search.evalErrorString() ); return -1; } @@ -237,7 +237,7 @@ long QgsSearchQueryBuilder::countRecords( const QString &searchString ) count++; } - // check if there were errors during evaulating + // check if there were errors during evaluating if ( search.hasEvalError() ) break; } @@ -246,7 +246,7 @@ long QgsSearchQueryBuilder::countRecords( const QString &searchString ) if ( search.hasEvalError() ) { - QMessageBox::critical( this, tr( "Error during search" ), search.evalErrorString() ); + QMessageBox::critical( this, tr( "Query Result" ), search.evalErrorString() ); return -1; } @@ -271,7 +271,7 @@ void QgsSearchQueryBuilder::btnOk_clicked() } else if ( numRecs == 0 ) { - QMessageBox::warning( this, tr( "No Records" ), tr( "The query you specified results in zero records being returned." ) ); + QMessageBox::warning( this, tr( "Query Result" ), tr( "The query you specified results in zero records being returned." ) ); } else { @@ -380,7 +380,7 @@ void QgsSearchQueryBuilder::saveQuery() QgsSettings s; QString lastQueryFileDir = s.value( QStringLiteral( "/UI/lastQueryFileDir" ), QDir::homePath() ).toString(); //save as qqt (QGIS query file) - QString saveFileName = QFileDialog::getSaveFileName( nullptr, tr( "Save query to file" ), lastQueryFileDir, QStringLiteral( "*.qqf" ) ); + QString saveFileName = QFileDialog::getSaveFileName( nullptr, tr( "Save Query to File" ), lastQueryFileDir, QStringLiteral( "*.qqf" ) ); if ( saveFileName.isNull() ) { return; @@ -394,7 +394,7 @@ void QgsSearchQueryBuilder::saveQuery() QFile saveFile( saveFileName ); if ( !saveFile.open( QIODevice::WriteOnly | QIODevice::Truncate ) ) { - QMessageBox::critical( nullptr, tr( "Error" ), tr( "Could not open file for writing" ) ); + QMessageBox::critical( nullptr, tr( "Save Query to File" ), tr( "Could not open file for writing." ) ); return; } @@ -416,7 +416,7 @@ void QgsSearchQueryBuilder::loadQuery() QgsSettings s; QString lastQueryFileDir = s.value( QStringLiteral( "/UI/lastQueryFileDir" ), QDir::homePath() ).toString(); - QString queryFileName = QFileDialog::getOpenFileName( nullptr, tr( "Load query from file" ), lastQueryFileDir, tr( "Query files" ) + " (*.qqf);;" + tr( "All files" ) + " (*)" ); + QString queryFileName = QFileDialog::getOpenFileName( nullptr, tr( "Load Query from File" ), lastQueryFileDir, tr( "Query files" ) + " (*.qqf);;" + tr( "All files" ) + " (*)" ); if ( queryFileName.isNull() ) { return; @@ -425,20 +425,20 @@ void QgsSearchQueryBuilder::loadQuery() QFile queryFile( queryFileName ); if ( !queryFile.open( QIODevice::ReadOnly ) ) { - QMessageBox::critical( nullptr, tr( "Error" ), tr( "Could not open file for reading" ) ); + QMessageBox::critical( nullptr, tr( "Load Query from File" ), tr( "Could not open file for reading." ) ); return; } QDomDocument queryDoc; if ( !queryDoc.setContent( &queryFile ) ) { - QMessageBox::critical( nullptr, tr( "Error" ), tr( "File is not a valid xml document" ) ); + QMessageBox::critical( nullptr, tr( "Load Query from File" ), tr( "File is not a valid xml document." ) ); return; } QDomElement queryElem = queryDoc.firstChildElement( QStringLiteral( "Query" ) ); if ( queryElem.isNull() ) { - QMessageBox::critical( nullptr, tr( "Error" ), tr( "File is not a valid query document" ) ); + QMessageBox::critical( nullptr, tr( "Load Query from File" ), tr( "File is not a valid query document." ) ); return; } @@ -448,7 +448,7 @@ void QgsSearchQueryBuilder::loadQuery() QgsExpression search( query ); if ( search.hasParserError() ) { - QMessageBox::critical( this, tr( "Search string parsing error" ), search.parserErrorString() ); + QMessageBox::critical( this, tr( "Query Result" ), search.parserErrorString() ); return; } @@ -476,7 +476,7 @@ void QgsSearchQueryBuilder::loadQuery() if ( !mFieldMap.contains( attIt ) ) { bool ok; - QString replaceAttribute = QInputDialog::getItem( 0, tr( "Select attribute" ), tr( "There is no attribute '%1' in the current vector layer. Please select an existing attribute" ).arg( *attIt ), + QString replaceAttribute = QInputDialog::getItem( 0, tr( "Select Attribute" ), tr( "There is no attribute '%1' in the current vector layer. Please select an existing attribute." ).arg( *attIt ), existingAttributes, 0, false, &ok ); if ( !ok || replaceAttribute.isEmpty() ) { diff --git a/src/gui/qgssqlcomposerdialog.cpp b/src/gui/qgssqlcomposerdialog.cpp index ff3b5506913..025fe771418 100644 --- a/src/gui/qgssqlcomposerdialog.cpp +++ b/src/gui/qgssqlcomposerdialog.cpp @@ -213,12 +213,12 @@ void QgsSQLComposerDialog::accept() { if ( errorMsg.isEmpty() ) errorMsg = tr( "An error occurred during evaluation of the SQL statement." ); - QMessageBox::critical( this, tr( "SQL Error" ), errorMsg ); + QMessageBox::critical( this, tr( "SQL Evaluation" ), errorMsg ); return; } if ( !warningMsg.isEmpty() ) { - QMessageBox::warning( this, tr( "SQL Warning" ), warningMsg ); + QMessageBox::warning( this, tr( "SQL Evaluation" ), warningMsg ); } } QDialog::accept(); diff --git a/src/gui/qgssubstitutionlistwidget.cpp b/src/gui/qgssubstitutionlistwidget.cpp index 1319b19e23d..3e554d397d8 100644 --- a/src/gui/qgssubstitutionlistwidget.cpp +++ b/src/gui/qgssubstitutionlistwidget.cpp @@ -90,7 +90,7 @@ void QgsSubstitutionListWidget::tableChanged() void QgsSubstitutionListWidget::mButtonExport_clicked() { - QString fileName = QFileDialog::getSaveFileName( this, tr( "Save substitutions" ), QDir::homePath(), + QString fileName = QFileDialog::getSaveFileName( this, tr( "Save Substitutions" ), QDir::homePath(), tr( "XML files (*.xml *.XML)" ) ); if ( fileName.isEmpty() ) { @@ -113,8 +113,8 @@ void QgsSubstitutionListWidget::mButtonExport_clicked() QFile file( fileName ); if ( !file.open( QIODevice::WriteOnly | QIODevice::Text | QIODevice::Truncate ) ) { - QMessageBox::warning( nullptr, tr( "Export substitutions" ), - tr( "Cannot write file %1:\n%2." ).arg( fileName, file.errorString() ), + QMessageBox::warning( nullptr, tr( "Export Substitutions" ), + tr( "Cannot write file %1:\n%2" ).arg( fileName, file.errorString() ), QMessageBox::Ok, QMessageBox::Ok ); return; @@ -126,7 +126,7 @@ void QgsSubstitutionListWidget::mButtonExport_clicked() void QgsSubstitutionListWidget::mButtonImport_clicked() { - QString fileName = QFileDialog::getOpenFileName( this, tr( "Load substitutions" ), QDir::homePath(), + QString fileName = QFileDialog::getOpenFileName( this, tr( "Load Substitutions" ), QDir::homePath(), tr( "XML files (*.xml *.XML)" ) ); if ( fileName.isEmpty() ) { @@ -136,8 +136,8 @@ void QgsSubstitutionListWidget::mButtonImport_clicked() QFile file( fileName ); if ( !file.open( QIODevice::ReadOnly | QIODevice::Text ) ) { - QMessageBox::warning( nullptr, tr( "Import substitutions" ), - tr( "Cannot read file %1:\n%2." ).arg( fileName, file.errorString() ), + QMessageBox::warning( nullptr, tr( "Import Substitutions" ), + tr( "Cannot read file %1:\n%2" ).arg( fileName, file.errorString() ), QMessageBox::Ok, QMessageBox::Ok ); return; @@ -163,7 +163,7 @@ void QgsSubstitutionListWidget::mButtonImport_clicked() QDomElement root = doc.documentElement(); if ( root.tagName() != QLatin1String( "substitutions" ) ) { - QMessageBox::warning( nullptr, tr( "Import substitutions" ), + QMessageBox::warning( nullptr, tr( "Import Substitutions" ), tr( "The selected file is not a substitution list." ), QMessageBox::Ok, QMessageBox::Ok ); diff --git a/src/gui/qgsvariableeditorwidget.cpp b/src/gui/qgsvariableeditorwidget.cpp index 4dd2b7b19d9..5aa2c02cc3b 100644 --- a/src/gui/qgsvariableeditorwidget.cpp +++ b/src/gui/qgsvariableeditorwidget.cpp @@ -728,7 +728,7 @@ void VariableEditorDelegate::setModelData( QWidget *widget, QAbstractItemModel * if ( scope->hasVariable( newName ) ) { //existing name - QMessageBox::warning( mParentTree, tr( "Rename variable" ), tr( "A variable with the name \"%1\" already exists in this context." ).arg( newName ) ); + QMessageBox::warning( mParentTree, tr( "Rename Variable" ), tr( "A variable with the name \"%1\" already exists in this context." ).arg( newName ) ); newName.append( "_1" ); } diff --git a/src/gui/raster/qgspalettedrendererwidget.cpp b/src/gui/raster/qgspalettedrendererwidget.cpp index 5ed8e0e4055..f77c58fd678 100644 --- a/src/gui/raster/qgspalettedrendererwidget.cpp +++ b/src/gui/raster/qgspalettedrendererwidget.cpp @@ -350,7 +350,7 @@ void QgsPalettedRendererWidget::loadColorTable() { QgsSettings settings; QString lastDir = settings.value( QStringLiteral( "lastColorMapDir" ), QDir::homePath() ).toString(); - QString fileName = QFileDialog::getOpenFileName( this, tr( "Open file" ), lastDir ); + QString fileName = QFileDialog::getOpenFileName( this, tr( "Load Color Table from File" ), lastDir ); if ( !fileName.isEmpty() ) { QgsPalettedRasterRenderer::ClassData classes = QgsPalettedRasterRenderer::classDataFromFile( fileName ); @@ -363,7 +363,7 @@ void QgsPalettedRendererWidget::loadColorTable() } else { - QMessageBox::critical( nullptr, tr( "Invalid file" ), tr( "Could not interpret file as a raster color table." ) ); + QMessageBox::critical( nullptr, tr( "Load Color Table" ), tr( "Could not interpret file as a raster color table." ) ); } } } @@ -372,7 +372,7 @@ void QgsPalettedRendererWidget::saveColorTable() { QgsSettings settings; QString lastDir = settings.value( QStringLiteral( "lastColorMapDir" ), QDir::homePath() ).toString(); - QString fileName = QFileDialog::getSaveFileName( this, tr( "Save file" ), lastDir, tr( "Text (*.clr)" ) ); + QString fileName = QFileDialog::getSaveFileName( this, tr( "Save Color Table as File" ), lastDir, tr( "Text (*.clr)" ) ); if ( !fileName.isEmpty() ) { if ( !fileName.endsWith( QLatin1String( ".clr" ), Qt::CaseInsensitive ) ) @@ -393,7 +393,7 @@ void QgsPalettedRendererWidget::saveColorTable() } else { - QMessageBox::warning( this, tr( "Write access denied" ), tr( "Write access denied. Adjust the file permissions and try again.\n\n" ) ); + QMessageBox::warning( this, tr( "Save Color Table as File" ), tr( "Write access denied. Adjust the file permissions and try again.\n\n" ) ); } } } @@ -454,7 +454,7 @@ void QgsPalettedRendererWidget::bandChanged( int band ) if ( !mModel->classData().isEmpty() ) { int res = QMessageBox::question( this, - tr( "Confirm Delete" ), + tr( "Delete Classification" ), tr( "The classification band was changed from %1 to %2.\n" "Should the existing classes be deleted?" ).arg( mBand ).arg( band ), QMessageBox::Yes | QMessageBox::No ); diff --git a/src/gui/raster/qgsrastertransparencywidget.cpp b/src/gui/raster/qgsrastertransparencywidget.cpp index ab626b53ced..77ddcf5a13c 100644 --- a/src/gui/raster/qgsrastertransparencywidget.cpp +++ b/src/gui/raster/qgsrastertransparencywidget.cpp @@ -222,7 +222,7 @@ void QgsRasterTransparencyWidget::pbnExportTransparentPixelValues_clicked() { QgsSettings myQSettings; QString myLastDir = myQSettings.value( QStringLiteral( "lastRasterFileFilterDir" ), QDir::homePath() ).toString(); - QString myFileName = QFileDialog::getSaveFileName( this, tr( "Save file" ), myLastDir, tr( "Textfile" ) + " (*.txt)" ); + QString myFileName = QFileDialog::getSaveFileName( this, tr( "Save Pixel Values as File" ), myLastDir, tr( "Textfile" ) + " (*.txt)" ); if ( !myFileName.isEmpty() ) { if ( !myFileName.endsWith( QLatin1String( ".txt" ), Qt::CaseInsensitive ) ) @@ -260,7 +260,7 @@ void QgsRasterTransparencyWidget::pbnExportTransparentPixelValues_clicked() } else { - QMessageBox::warning( this, tr( "Write access denied" ), tr( "Write access denied. Adjust the file permissions and try again.\n\n" ) ); + QMessageBox::warning( this, tr( "Save Pixel Values as File" ), tr( "Write access denied. Adjust the file permissions and try again.\n\n" ) ); } } } @@ -272,7 +272,7 @@ void QgsRasterTransparencyWidget::pbnImportTransparentPixelValues_clicked() QString myBadLines; QgsSettings myQSettings; QString myLastDir = myQSettings.value( QStringLiteral( "lastRasterFileFilterDir" ), QDir::homePath() ).toString(); - QString myFileName = QFileDialog::getOpenFileName( this, tr( "Open file" ), myLastDir, tr( "Textfile" ) + " (*.txt)" ); + QString myFileName = QFileDialog::getOpenFileName( this, tr( "Load Pixel Values from File" ), myLastDir, tr( "Textfile" ) + " (*.txt)" ); QFile myInputFile( myFileName ); if ( myInputFile.open( QFile::ReadOnly ) ) { @@ -351,12 +351,12 @@ void QgsRasterTransparencyWidget::pbnImportTransparentPixelValues_clicked() if ( myImportError ) { - QMessageBox::warning( this, tr( "Import Error" ), tr( "The following lines contained errors\n\n%1" ).arg( myBadLines ) ); + QMessageBox::warning( this, tr( "Load Pixel Values from File" ), tr( "The following lines contained errors\n\n%1" ).arg( myBadLines ) ); } } else if ( !myFileName.isEmpty() ) { - QMessageBox::warning( this, tr( "Read access denied" ), tr( "Read access denied. Adjust the file permissions and try again.\n\n" ) ); + QMessageBox::warning( this, tr( "Load Pixel Values from File" ), tr( "Read access denied. Adjust the file permissions and try again.\n\n" ) ); } tableTransparency->resizeColumnsToContents(); tableTransparency->resizeRowsToContents(); diff --git a/src/gui/raster/qgssinglebandpseudocolorrendererwidget.cpp b/src/gui/raster/qgssinglebandpseudocolorrendererwidget.cpp index da8319bc05b..bb5348815ba 100644 --- a/src/gui/raster/qgssinglebandpseudocolorrendererwidget.cpp +++ b/src/gui/raster/qgssinglebandpseudocolorrendererwidget.cpp @@ -449,7 +449,7 @@ void QgsSingleBandPseudoColorRendererWidget::mLoadFromBandButton_clicked() } else { - QMessageBox::warning( this, tr( "Load Color Map" ), tr( "The color map for band %1 has no entries" ).arg( bandIndex ) ); + QMessageBox::warning( this, tr( "Load Color Map" ), tr( "The color map for band %1 has no entries." ).arg( bandIndex ) ); } loadMinMaxFromTree(); @@ -463,7 +463,7 @@ void QgsSingleBandPseudoColorRendererWidget::mLoadFromFileButton_clicked() QString badLines; QgsSettings settings; QString lastDir = settings.value( QStringLiteral( "lastColorMapDir" ), QDir::homePath() ).toString(); - QString fileName = QFileDialog::getOpenFileName( this, tr( "Open file" ), lastDir, tr( "Textfile (*.txt)" ) ); + QString fileName = QFileDialog::getOpenFileName( this, tr( "Load Color Map from File" ), lastDir, tr( "Textfile (*.txt)" ) ); QFile inputFile( fileName ); if ( inputFile.open( QFile::ReadOnly ) ) { @@ -536,12 +536,12 @@ void QgsSingleBandPseudoColorRendererWidget::mLoadFromFileButton_clicked() if ( importError ) { - QMessageBox::warning( this, tr( "Import Error" ), tr( "The following lines contained errors\n\n" ) + badLines ); + QMessageBox::warning( this, tr( "Load Color Map from File" ), tr( "The following lines contained errors\n\n" ) + badLines ); } } else if ( !fileName.isEmpty() ) { - QMessageBox::warning( this, tr( "Read access denied" ), tr( "Read access denied. Adjust the file permissions and try again.\n\n" ) ); + QMessageBox::warning( this, tr( "Load Color Map from File" ), tr( "Read access denied. Adjust the file permissions and try again.\n\n" ) ); } loadMinMaxFromTree(); @@ -552,7 +552,7 @@ void QgsSingleBandPseudoColorRendererWidget::mExportToFileButton_clicked() { QgsSettings settings; QString lastDir = settings.value( QStringLiteral( "lastColorMapDir" ), QDir::homePath() ).toString(); - QString fileName = QFileDialog::getSaveFileName( this, tr( "Save file" ), lastDir, tr( "Textfile (*.txt)" ) ); + QString fileName = QFileDialog::getSaveFileName( this, tr( "Save Color Map as File" ), lastDir, tr( "Textfile (*.txt)" ) ); if ( !fileName.isEmpty() ) { if ( !fileName.endsWith( QLatin1String( ".txt" ), Qt::CaseInsensitive ) ) @@ -610,7 +610,7 @@ void QgsSingleBandPseudoColorRendererWidget::mExportToFileButton_clicked() } else { - QMessageBox::warning( this, tr( "Write access denied" ), tr( "Write access denied. Adjust the file permissions and try again.\n\n" ) ); + QMessageBox::warning( this, tr( "Save Color Map as File" ), tr( "Write access denied. Adjust the file permissions and try again.\n\n" ) ); } } } @@ -625,7 +625,7 @@ void QgsSingleBandPseudoColorRendererWidget::mColormapTreeWidget_itemDoubleClick if ( column == ColorColumn ) { item->setFlags( Qt::ItemIsEnabled | Qt::ItemIsSelectable ); - QColor newColor = QgsColorDialog::getColor( item->background( column ).color(), this, QStringLiteral( "Change color" ), true ); + QColor newColor = QgsColorDialog::getColor( item->background( column ).color(), this, QStringLiteral( "Change Color" ), true ); if ( newColor.isValid() ) { item->setBackground( ColorColumn, QBrush( newColor ) ); @@ -851,7 +851,7 @@ void QgsSingleBandPseudoColorRendererWidget::changeColor() } QTreeWidgetItem *firstItem = itemList.first(); - QColor newColor = QgsColorDialog::getColor( firstItem->background( ColorColumn ).color(), this, QStringLiteral( "Change color" ), true ); + QColor newColor = QgsColorDialog::getColor( firstItem->background( ColorColumn ).color(), this, QStringLiteral( "Change Color" ), true ); if ( newColor.isValid() ) { Q_FOREACH ( QTreeWidgetItem *item, itemList ) diff --git a/src/gui/symbology/qgscategorizedsymbolrendererwidget.cpp b/src/gui/symbology/qgscategorizedsymbolrendererwidget.cpp index 817745be3c5..2c9ee1c6e96 100644 --- a/src/gui/symbology/qgscategorizedsymbolrendererwidget.cpp +++ b/src/gui/symbology/qgscategorizedsymbolrendererwidget.cpp @@ -658,8 +658,8 @@ void QgsCategorizedSymbolRendererWidget::addCategories() // ask to abort if too many classes if ( unique_vals.size() >= 1000 ) { - int res = QMessageBox::warning( nullptr, tr( "High number of classes!" ), - tr( "Classification would yield %1 entries which might not be expected. Continue?" ).arg( unique_vals.size() ), + int res = QMessageBox::warning( nullptr, tr( "Classify Categories" ), + tr( "High number of classes. Classification would yield %1 entries which might not be expected. Continue?" ).arg( unique_vals.size() ), QMessageBox::Ok | QMessageBox::Cancel, QMessageBox::Cancel ); if ( res == QMessageBox::Cancel ) @@ -683,7 +683,7 @@ void QgsCategorizedSymbolRendererWidget::addCategories() !mRenderer->categories().isEmpty() ) { int res = QMessageBox::question( this, - tr( "Confirm Delete" ), + tr( "Delete Classification" ), tr( "The classification field was changed from '%1' to '%2'.\n" "Should the existing classes be deleted before classification?" ) .arg( mOldClassificationAttribute, attrName ), @@ -910,7 +910,7 @@ void QgsCategorizedSymbolRendererWidget::matchToSymbolsFromXml() QgsSettings settings; QString openFileDir = settings.value( QStringLiteral( "UI/lastMatchToSymbolsDir" ), QDir::homePath() ).toString(); - QString fileName = QFileDialog::getOpenFileName( this, tr( "Match to symbols from file" ), openFileDir, + QString fileName = QFileDialog::getOpenFileName( this, tr( "Match to Symbols from File" ), openFileDir, tr( "XML files (*.xml *XML)" ) ); if ( fileName.isEmpty() ) { @@ -923,7 +923,7 @@ void QgsCategorizedSymbolRendererWidget::matchToSymbolsFromXml() QgsStyle importedStyle; if ( !importedStyle.importXml( fileName ) ) { - QMessageBox::warning( this, tr( "Matching Error" ), + QMessageBox::warning( this, tr( "Match to Symbols from File" ), tr( "An error occurred while reading file:\n%1" ).arg( importedStyle.errorString() ) ); return; } @@ -931,12 +931,12 @@ void QgsCategorizedSymbolRendererWidget::matchToSymbolsFromXml() int matched = matchToSymbols( &importedStyle ); if ( matched > 0 ) { - QMessageBox::information( this, tr( "Matched Symbols" ), + QMessageBox::information( this, tr( "Match to Symbols from File" ), tr( "Matched %1 categories to symbols from file." ).arg( matched ) ); } else { - QMessageBox::warning( this, tr( "Matched Symbols" ), + QMessageBox::warning( this, tr( "Match to Symbols from File" ), tr( "No categories could be matched to symbols in file." ) ); } } diff --git a/src/gui/symbology/qgsgraduatedsymbolrendererwidget.cpp b/src/gui/symbology/qgsgraduatedsymbolrendererwidget.cpp index c5ab2edf0ce..e82ad4af67f 100644 --- a/src/gui/symbology/qgsgraduatedsymbolrendererwidget.cpp +++ b/src/gui/symbology/qgsgraduatedsymbolrendererwidget.cpp @@ -690,7 +690,7 @@ void QgsGraduatedSymbolRendererWidget::methodComboBox_currentIndexChanged( int i if ( !ramp ) { - QMessageBox::critical( this, tr( "Error" ), tr( "No color ramp defined." ) ); + QMessageBox::critical( this, tr( "Select Method" ), tr( "No color ramp defined." ) ); return; } mRenderer->setSourceColorRamp( ramp ); @@ -803,7 +803,7 @@ void QgsGraduatedSymbolRendererWidget::classifyGraduated() std::unique_ptr ramp( btnColorRamp->colorRamp() ); if ( !ramp ) { - QMessageBox::critical( this, tr( "Error" ), tr( "No color ramp defined." ) ); + QMessageBox::critical( this, tr( "Apply Classification" ), tr( "No color ramp defined." ) ); return; } @@ -823,7 +823,7 @@ void QgsGraduatedSymbolRendererWidget::classifyGraduated() // and give the user the chance to cancel if ( QgsGraduatedSymbolRenderer::Jenks == mode && mLayer->featureCount() > 50000 ) { - if ( QMessageBox::Cancel == QMessageBox::question( this, tr( "Warning" ), tr( "Natural break classification (Jenks) is O(n2) complexity, your classification may take a long time.\nPress cancel to abort breaks calculation or OK to continue." ), QMessageBox::Cancel, QMessageBox::Ok ) ) + if ( QMessageBox::Cancel == QMessageBox::question( this, tr( "Apply Classification" ), tr( "Natural break classification (Jenks) is O(n2) complexity, your classification may take a long time.\nPress cancel to abort breaks calculation or OK to continue." ), QMessageBox::Cancel, QMessageBox::Ok ) ) return; } @@ -836,7 +836,7 @@ void QgsGraduatedSymbolRendererWidget::classifyGraduated() { if ( !ramp ) { - QMessageBox::critical( this, tr( "Error" ), tr( "No color ramp defined." ) ); + QMessageBox::critical( this, tr( "Apply Classification" ), tr( "No color ramp defined." ) ); return; } mRenderer->setSourceColorRamp( ramp.release() ); @@ -1047,7 +1047,7 @@ void QgsGraduatedSymbolRendererWidget::toggleBoundariesLink( bool linked ) { int result = QMessageBox::warning( this, - tr( "Linked range warning" ), + tr( "Link Class Boundaries" ), tr( "Rows will be reordered before linking boundaries. Continue?" ), QMessageBox::Ok | QMessageBox::Cancel ); if ( result != QMessageBox::Ok ) diff --git a/src/gui/symbology/qgsrendererwidget.cpp b/src/gui/symbology/qgsrendererwidget.cpp index 225f1766a6f..289038f5b82 100644 --- a/src/gui/symbology/qgsrendererwidget.cpp +++ b/src/gui/symbology/qgsrendererwidget.cpp @@ -288,7 +288,7 @@ QgsDataDefinedSizeLegendWidget *QgsRendererWidget::createDataDefinedSizeLegendWi QgsProperty ddSize = symbol->dataDefinedSize(); if ( !ddSize || !ddSize.isActive() ) { - QMessageBox::warning( this, tr( "Data-defined size legend" ), tr( "Data-defined size is not enabled!" ) ); + QMessageBox::warning( this, tr( "Data-defined Size Legend" ), tr( "Data-defined size is not enabled!" ) ); return nullptr; } diff --git a/src/gui/symbology/qgsrulebasedrendererwidget.cpp b/src/gui/symbology/qgsrulebasedrendererwidget.cpp index 0e01492567b..0a9f887b156 100644 --- a/src/gui/symbology/qgsrulebasedrendererwidget.cpp +++ b/src/gui/symbology/qgsrulebasedrendererwidget.cpp @@ -316,7 +316,7 @@ void QgsRuleBasedRendererWidget::refineRuleScalesGui( const QModelIndexList &ind if ( ok ) scales.append( scale ); else - QMessageBox::information( this, tr( "Error" ), QString( tr( "\"%1\" is not valid scale denominator, ignoring it." ) ).arg( item ) ); + QMessageBox::information( this, tr( "Scale Refinement" ), QString( tr( "\"%1\" is not valid scale denominator, ignoring it." ) ).arg( item ) ); } Q_FOREACH ( const QModelIndex &index, indexList ) @@ -757,7 +757,7 @@ void QgsRendererRulePropsWidget::testFilter() QgsExpression filter( editFilter->text() ); if ( filter.hasParserError() ) { - QMessageBox::critical( this, tr( "Error" ), tr( "Filter expression parsing error:\n" ) + filter.parserErrorString() ); + QMessageBox::critical( this, tr( "Test Filter" ), tr( "Filter expression parsing error:\n" ) + filter.parserErrorString() ); return; } @@ -771,7 +771,7 @@ void QgsRendererRulePropsWidget::testFilter() if ( !filter.prepare( &context ) ) { - QMessageBox::critical( this, tr( "Evaluation error" ), filter.evalErrorString() ); + QMessageBox::critical( this, tr( "Test Filter" ), filter.evalErrorString() ); return; } @@ -793,7 +793,7 @@ void QgsRendererRulePropsWidget::testFilter() QApplication::restoreOverrideCursor(); - QMessageBox::information( this, tr( "Filter" ), tr( "Filter returned %n feature(s)", "number of filtered features", count ) ); + QMessageBox::information( this, tr( "Test Filter" ), tr( "Filter returned %n feature(s)", "number of filtered features", count ) ); } void QgsRendererRulePropsWidget::apply() diff --git a/src/gui/symbology/qgssmartgroupeditordialog.cpp b/src/gui/symbology/qgssmartgroupeditordialog.cpp index a0fa5dd4286..65050772455 100644 --- a/src/gui/symbology/qgssmartgroupeditordialog.cpp +++ b/src/gui/symbology/qgssmartgroupeditordialog.cpp @@ -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( "Edit Smart Group" ), tr( "The smart group name field is empty. Kindly provide a name." ) ); return; } accept(); diff --git a/src/gui/symbology/qgsstyleexportimportdialog.cpp b/src/gui/symbology/qgsstyleexportimportdialog.cpp index b1f9b0548db..f36a2ea69bb 100644 --- a/src/gui/symbology/qgsstyleexportimportdialog.cpp +++ b/src/gui/symbology/qgsstyleexportimportdialog.cpp @@ -121,14 +121,14 @@ void QgsStyleExportImportDialog::doExportImport() QModelIndexList selection = listItems->selectionModel()->selectedIndexes(); if ( selection.isEmpty() ) { - QMessageBox::warning( this, tr( "Export/import error" ), + QMessageBox::warning( this, tr( "Export/import Symbols or Color Ramps" ), tr( "You should select at least one symbol/color ramp." ) ); return; } if ( mDialogMode == Export ) { - QString fileName = QFileDialog::getSaveFileName( this, tr( "Save styles" ), QDir::homePath(), + QString fileName = QFileDialog::getSaveFileName( this, tr( "Save Styles" ), QDir::homePath(), tr( "XML files (*.xml *.XML)" ) ); if ( fileName.isEmpty() ) { @@ -146,14 +146,14 @@ void QgsStyleExportImportDialog::doExportImport() moveStyles( &selection, mStyle, mTempStyle ); if ( !mTempStyle->exportXml( mFileName ) ) { - QMessageBox::warning( this, tr( "Export/import error" ), + QMessageBox::warning( this, tr( "Export Symbols" ), tr( "Error when saving selected symbols to file:\n%1" ) .arg( mTempStyle->errorString() ) ); return; } else { - QMessageBox::information( this, tr( "Export successful" ), + QMessageBox::information( this, tr( "Export Symbols" ), tr( "The selected symbols were successfully exported to file:\n%1" ) .arg( mFileName ) ); } @@ -180,7 +180,7 @@ bool QgsStyleExportImportDialog::populateStyles( QgsStyle *style ) // NOTE mTempStyle is style here if ( !style->importXml( mFileName ) ) { - QMessageBox::warning( this, tr( "Import Error" ), + QMessageBox::warning( this, tr( "Import Symbols or Color Ramps" ), tr( "An error occurred during import:\n%1" ).arg( style->errorString() ) ); return false; } @@ -278,7 +278,7 @@ void QgsStyleExportImportDialog::moveStyles( QModelIndexList *selection, QgsStyl { if ( dst->symbolNames().contains( symbolName ) && prompt ) { - int res = QMessageBox::warning( this, tr( "Duplicate Names" ), + int res = QMessageBox::warning( this, tr( "Export/import Symbols" ), tr( "Symbol with name '%1' already exists.\nOverwrite?" ) .arg( symbolName ), QMessageBox::Yes | QMessageBox::YesToAll | QMessageBox::No | QMessageBox::NoToAll | QMessageBox::Cancel ); @@ -322,7 +322,7 @@ void QgsStyleExportImportDialog::moveStyles( QModelIndexList *selection, QgsStyl { if ( dst->colorRampNames().contains( symbolName ) && prompt ) { - int res = QMessageBox::warning( this, tr( "Duplicate Names" ), + int res = QMessageBox::warning( this, tr( "Export/import Color Ramps" ), tr( "Color ramp with name '%1' already exists.\nOverwrite?" ) .arg( symbolName ), QMessageBox::Yes | QMessageBox::YesToAll | QMessageBox::No | QMessageBox::NoToAll | QMessageBox::Cancel ); @@ -482,7 +482,7 @@ void QgsStyleExportImportDialog::browse() if ( type == QLatin1String( "file" ) ) { - mFileName = QFileDialog::getOpenFileName( this, tr( "Load styles" ), QDir::homePath(), + mFileName = QFileDialog::getOpenFileName( this, tr( "Load Styles" ), QDir::homePath(), tr( "XML files (*.xml *XML)" ) ); if ( mFileName.isEmpty() ) { @@ -549,8 +549,8 @@ void QgsStyleExportImportDialog::httpFinished() mTempFile->remove(); mFileName.clear(); mProgressDlg->hide(); - QMessageBox::information( this, tr( "HTTP Error!" ), - tr( "Download failed: %1." ).arg( mNetReply->errorString() ) ); + QMessageBox::information( this, tr( "Import from URL" ), + tr( "HTTP Error! Download failed: %1." ).arg( mNetReply->errorString() ) ); return; } else diff --git a/src/gui/symbology/qgsstylemanagerdialog.cpp b/src/gui/symbology/qgsstylemanagerdialog.cpp index 852dfe7a484..ea18ce50ca9 100644 --- a/src/gui/symbology/qgsstylemanagerdialog.cpp +++ b/src/gui/symbology/qgsstylemanagerdialog.cpp @@ -420,12 +420,12 @@ bool QgsStyleManagerDialog::addSymbol() // validate name if ( name.isEmpty() ) { - QMessageBox::warning( this, tr( "Save symbol" ), + QMessageBox::warning( this, tr( "Save Symbol" ), tr( "Cannot save symbol without name. Enter a name." ) ); } else if ( mStyle->symbolNames().contains( name ) ) { - int res = QMessageBox::warning( this, tr( "Save symbol" ), + int res = QMessageBox::warning( this, tr( "Save Symbol" ), tr( "Symbol with name '%1' already exists. Overwrite?" ) .arg( name ), QMessageBox::Yes | QMessageBox::No ); @@ -474,7 +474,7 @@ QString QgsStyleManagerDialog::addColorRampStatic( QWidget *parent, QgsStyle *st QStringList rampTypes; rampTypes << tr( "Gradient" ) << tr( "Color presets" ) << tr( "Random" ) << tr( "Catalog: cpt-city" ); rampTypes << tr( "Catalog: ColorBrewer" ); - rampType = QInputDialog::getItem( parent, tr( "Color ramp type" ), + rampType = QInputDialog::getItem( parent, tr( "Color Ramp Type" ), tr( "Please select color ramp type:" ), rampTypes, 0, false, &ok ); } if ( !ok || rampType.isEmpty() ) @@ -569,7 +569,7 @@ QString QgsStyleManagerDialog::addColorRampStatic( QWidget *parent, QgsStyle *st } else if ( style->colorRampNames().contains( name ) ) { - int res = QMessageBox::warning( parent, tr( "Save color ramp" ), + int res = QMessageBox::warning( parent, tr( "Save Color Ramp" ), tr( "Color ramp with name '%1' already exists. Overwrite?" ) .arg( name ), QMessageBox::Yes | QMessageBox::No ); @@ -771,7 +771,7 @@ void QgsStyleManagerDialog::removeItem() bool QgsStyleManagerDialog::removeSymbol() { QModelIndexList indexes = listItems->selectionModel()->selectedIndexes(); - if ( QMessageBox::Yes != QMessageBox::question( this, tr( "Confirm removal" ), + if ( QMessageBox::Yes != QMessageBox::question( this, tr( "Remove Symbol" ), QString( tr( "Do you really want to remove %n symbol(s)?", nullptr, indexes.count() ) ), QMessageBox::Yes, QMessageBox::No ) ) @@ -791,7 +791,7 @@ bool QgsStyleManagerDialog::removeSymbol() bool QgsStyleManagerDialog::removeColorRamp() { QModelIndexList indexes = listItems->selectionModel()->selectedIndexes(); - if ( QMessageBox::Yes != QMessageBox::question( this, tr( "Confirm removal" ), + if ( QMessageBox::Yes != QMessageBox::question( this, tr( "Remove Color Ramp" ), QString( tr( "Do you really want to remove %n ramp(s)?", nullptr, indexes.count() ) ), QMessageBox::Yes, QMessageBox::No ) ) @@ -830,7 +830,7 @@ void QgsStyleManagerDialog::itemChanged( QStandardItem *item ) } else { - QMessageBox::critical( this, tr( "Cannot rename item" ), + QMessageBox::critical( this, tr( "Save Item" ), tr( "Name is already taken by another item. Choose a different name." ) ); item->setText( oldName ); } @@ -838,7 +838,7 @@ void QgsStyleManagerDialog::itemChanged( QStandardItem *item ) void QgsStyleManagerDialog::exportItemsPNG() { - QString dir = QFileDialog::getExistingDirectory( this, tr( "Exported selected symbols as PNG" ), + QString dir = QFileDialog::getExistingDirectory( this, tr( "Export Selected Symbols as PNG" ), QDir::home().absolutePath(), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks ); @@ -847,7 +847,7 @@ void QgsStyleManagerDialog::exportItemsPNG() void QgsStyleManagerDialog::exportItemsSVG() { - QString dir = QFileDialog::getExistingDirectory( this, tr( "Exported selected symbols as SVG" ), + QString dir = QFileDialog::getExistingDirectory( this, tr( "Export Selected Symbols as SVG" ), QDir::home().absolutePath(), QFileDialog::ShowDirsOnly | QFileDialog::DontResolveSymlinks ); @@ -1061,7 +1061,7 @@ int QgsStyleManagerDialog::addTag() QString itemName; int id; bool ok; - itemName = QInputDialog::getText( this, tr( "Tag name" ), + itemName = QInputDialog::getText( this, tr( "Add Tag" ), tr( "Please enter name for the new tag:" ), QLineEdit::Normal, tr( "New tag" ), &ok ).trimmed(); if ( !ok || itemName.isEmpty() ) return 0; @@ -1069,14 +1069,14 @@ int QgsStyleManagerDialog::addTag() int check = mStyle->tagId( itemName ); if ( check > 0 ) { - QMessageBox::critical( this, tr( "Error!" ), + QMessageBox::critical( this, tr( "Add Tag" ), tr( "Tag name already exists in your symbol database." ) ); return 0; } id = mStyle->addTag( itemName ); if ( !id ) { - QMessageBox::critical( this, tr( "Error!" ), + QMessageBox::critical( this, tr( "Add Tag" ), tr( "New tag could not be created.\n" "There was a problem with your symbol database." ) ); return 0; @@ -1131,8 +1131,8 @@ void QgsStyleManagerDialog::removeGroup() QString data = index.data( Qt::UserRole + 1 ).toString(); if ( data == QLatin1String( "all" ) || data == QLatin1String( "favorite" ) || data == QLatin1String( "tags" ) || index.data() == "smartgroups" ) { - int err = QMessageBox::critical( this, tr( "Invalid selection" ), - tr( "Cannot delete system defined categories.\n" + int err = QMessageBox::critical( this, tr( "Remove Group" ), + tr( "Invalid selection. Cannot delete system defined categories.\n" "Kindly select a group or smart group you might want to delete." ) ); if ( err ) return; @@ -1254,8 +1254,8 @@ void QgsStyleManagerDialog::regrouped( QStandardItem *item ) regrouped = mStyle->detagSymbol( type, symbolName, QStringList( tag ) ); if ( !regrouped ) { - int er = QMessageBox::critical( this, tr( "Database Error" ), - tr( "There was a problem with the Symbols database while regrouping." ) ); + int er = QMessageBox::critical( this, tr( "Group Items" ), + tr( "There was a problem with the symbols database while regrouping." ) ); // call the slot again to get back to normal if ( er ) tagSymbolsAction(); @@ -1502,7 +1502,7 @@ void QgsStyleManagerDialog::editSmartgroupAction() QModelIndex present = groupTree->currentIndex(); if ( present.parent().data( Qt::UserRole + 1 ) != "smartgroups" ) { - QMessageBox::critical( this, tr( "Invalid Selection" ), + QMessageBox::critical( this, tr( "Edit Smart Group" ), tr( "You have not selected a Smart Group. Kindly select a Smart Group to edit." ) ); return; } @@ -1521,7 +1521,7 @@ void QgsStyleManagerDialog::editSmartgroupAction() int id = mStyle->addSmartgroup( dlg.smartgroupName(), dlg.conditionOperator(), dlg.conditionMap() ); if ( !id ) { - QMessageBox::critical( this, tr( "Database Error!" ), + QMessageBox::critical( this, tr( "Edit Smart Group" ), tr( "There was some error while editing the smart group." ) ); return; } diff --git a/src/gui/symbology/qgssymbollayerwidget.cpp b/src/gui/symbology/qgssymbollayerwidget.cpp index 02d7dda48fb..3a5f3c53144 100644 --- a/src/gui/symbology/qgssymbollayerwidget.cpp +++ b/src/gui/symbology/qgssymbollayerwidget.cpp @@ -187,7 +187,7 @@ QgsSimpleLineSymbolLayerWidget::QgsSimpleLineSymbolLayerWidget( QgsVectorLayer * << QgsUnitTypes::RenderPoints << QgsUnitTypes::RenderInches ); btnChangeColor->setAllowOpacity( true ); - btnChangeColor->setColorDialogTitle( tr( "Select Line color" ) ); + btnChangeColor->setColorDialogTitle( tr( "Select Line Color" ) ); btnChangeColor->setContext( QStringLiteral( "symbology" ) ); spinOffset->setClearValue( 0.0 ); @@ -1390,12 +1390,12 @@ QgsShapeburstFillSymbolLayerWidget::QgsShapeburstFillSymbolLayerWidget( QgsVecto group2->addButton( mRadioUseMaxDistance ); group2->addButton( mRadioUseWholeShape ); btnChangeColor->setAllowOpacity( true ); - btnChangeColor->setColorDialogTitle( tr( "Select Gradient color" ) ); + btnChangeColor->setColorDialogTitle( tr( "Select Gradient Color" ) ); btnChangeColor->setContext( QStringLiteral( "symbology" ) ); btnChangeColor->setShowNoColor( true ); btnChangeColor->setNoColorString( tr( "Transparent" ) ); btnChangeColor2->setAllowOpacity( true ); - btnChangeColor2->setColorDialogTitle( tr( "Select Gradient color" ) ); + btnChangeColor2->setColorDialogTitle( tr( "Select Gradient Color" ) ); btnChangeColor2->setContext( QStringLiteral( "symbology" ) ); btnChangeColor2->setShowNoColor( true ); btnChangeColor2->setNoColorString( tr( "Transparent" ) ); @@ -2373,7 +2373,7 @@ QgsSymbolLayer *QgsSVGFillSymbolLayerWidget::symbolLayer() void QgsSVGFillSymbolLayerWidget::mBrowseToolButton_clicked() { - QString filePath = QFileDialog::getOpenFileName( nullptr, tr( "Select SVG texture file" ), QDir::homePath(), tr( "SVG file" ) + " (*.svg);;" + tr( "All files" ) + " (*.*)" ); + QString filePath = QFileDialog::getOpenFileName( nullptr, tr( "Select SVG Texture File" ), QDir::homePath(), tr( "SVG file" ) + " (*.svg);;" + tr( "All files" ) + " (*.*)" ); if ( !filePath.isNull() ) { mSVGLineEdit->setText( filePath ); @@ -3237,14 +3237,14 @@ void QgsRasterFillSymbolLayerWidget::mBrowseToolButton_clicked() } //show file dialog - QString filePath = QFileDialog::getOpenFileName( nullptr, tr( "Select image file" ), openDir ); + QString filePath = QFileDialog::getOpenFileName( nullptr, tr( "Select Image File" ), openDir ); if ( !filePath.isNull() ) { //check if file exists QFileInfo fileInfo( filePath ); if ( !fileInfo.exists() || !fileInfo.isReadable() ) { - QMessageBox::critical( nullptr, QStringLiteral( "Invalid file" ), QStringLiteral( "Error, file does not exist or is not readable" ) ); + QMessageBox::critical( nullptr, QStringLiteral( "Select Image File" ), QStringLiteral( "Error, file does not exist or is not readable." ) ); return; }