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