Skip to content

Commit bb08b64

Browse files
authoredFeb 21, 2018
Merge pull request #6398 from DelazJ/QMessageBoxTitles
Updating some dialogs caption
2 parents 6573eb3 + ed99ba9 commit bb08b64

23 files changed

+124
-122
lines changed
 

‎src/gui/qgsmaplayerstylemanagerwidget.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,7 @@ void QgsMapLayerStyleManagerWidget::saveAsDefault()
185185
if ( layer->dataProvider()->isSaveAndLoadStyleToDatabaseSupported() )
186186
{
187187
QMessageBox askToUser;
188+
askToUser.setWindowTitle( tr( "Save Style" ) );
188189
askToUser.setText( tr( "Save default style to: " ) );
189190
askToUser.setIcon( QMessageBox::Question );
190191
askToUser.addButton( tr( "Cancel" ), QMessageBox::RejectRole );
@@ -227,6 +228,7 @@ void QgsMapLayerStyleManagerWidget::loadDefault()
227228
if ( layer->dataProvider()->isSaveAndLoadStyleToDatabaseSupported() )
228229
{
229230
QMessageBox askToUser;
231+
askToUser.setWindowTitle( tr( "Load Style" ) );
230232
askToUser.setText( tr( "Load default style from: " ) );
231233
askToUser.setIcon( QMessageBox::Question );
232234
askToUser.addButton( tr( "Cancel" ), QMessageBox::RejectRole );

‎src/gui/qgsnewauxiliaryfielddialog.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,14 +79,14 @@ void QgsNewAuxiliaryFieldDialog::accept()
7979
const int idx = mLayer->fields().lookupField( fieldName );
8080
if ( idx >= 0 )
8181
{
82-
const QString title = tr( "Invalid name" );
83-
const QString msg = tr( "Auxiliary field '%1' already exists" ).arg( fieldName );
82+
const QString title = tr( "New Auxiliary Field" );
83+
const QString msg = tr( "Invalid name. Auxiliary field '%1' already exists." ).arg( fieldName );
8484
QMessageBox::critical( this, title, msg, QMessageBox::Ok );
8585
}
8686
else if ( def.comment().isEmpty() )
8787
{
88-
const QString title = tr( "Invalid name" );
89-
const QString msg = tr( "Name is a mandatory parameter" );
88+
const QString title = tr( "New Auxiliary Field" );
89+
const QString msg = tr( "Name is a mandatory parameter." );
9090
QMessageBox::critical( this, title, msg, QMessageBox::Ok );
9191
}
9292
else

‎src/gui/qgsnewgeopackagelayerdialog.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ void QgsNewGeoPackageLayerDialog::mAddAttributeButton_clicked()
198198
QString myName = mFieldNameEdit->text();
199199
if ( myName == mFeatureIdColumnEdit->text() )
200200
{
201-
QMessageBox::critical( this, tr( "Invalid field name" ), tr( "The field cannot have the same name as the feature identifier" ) );
201+
QMessageBox::critical( this, tr( "Add Field" ), tr( "The field cannot have the same name as the feature identifier." ) );
202202
return;
203203
}
204204

@@ -259,8 +259,8 @@ bool QgsNewGeoPackageLayerDialog::apply()
259259
{
260260
QMessageBox msgBox;
261261
msgBox.setIcon( QMessageBox::Question );
262-
msgBox.setWindowTitle( tr( "The File Already Exists." ) );
263-
msgBox.setText( tr( "Do you want to overwrite the existing file with a new database or add a new layer to it?" ) );
262+
msgBox.setWindowTitle( tr( "New GeoPackage Layer" ) );
263+
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?" ) );
264264
QPushButton *overwriteButton = msgBox.addButton( tr( "Overwrite" ), QMessageBox::ActionRole );
265265
QPushButton *addNewLayerButton = msgBox.addButton( tr( "Add new layer" ), QMessageBox::ActionRole );
266266
msgBox.setStandardButtons( QMessageBox::Cancel );
@@ -311,8 +311,8 @@ bool QgsNewGeoPackageLayerDialog::apply()
311311
if ( !hGpkgDriver )
312312
{
313313
if ( !property( "hideDialogs" ).toBool() )
314-
QMessageBox::critical( this, tr( "Layer creation failed" ),
315-
tr( "GeoPackage driver not found" ) );
314+
QMessageBox::critical( this, tr( "New GeoPackage Layer" ),
315+
tr( "Layer creation failed. GeoPackage driver not found." ) );
316316
return false;
317317
}
318318

@@ -324,7 +324,7 @@ bool QgsNewGeoPackageLayerDialog::apply()
324324
{
325325
QString msg( tr( "Creation of database failed (OGR error: %1)" ).arg( QString::fromUtf8( CPLGetLastErrorMsg() ) ) );
326326
if ( !property( "hideDialogs" ).toBool() )
327-
QMessageBox::critical( this, tr( "Layer creation failed" ), msg );
327+
QMessageBox::critical( this, tr( "New GeoPackage Layer" ), msg );
328328
return false;
329329
}
330330
}
@@ -336,14 +336,14 @@ bool QgsNewGeoPackageLayerDialog::apply()
336336
{
337337
QString msg( tr( "Opening of database failed (OGR error: %1)" ).arg( QString::fromUtf8( CPLGetLastErrorMsg() ) ) );
338338
if ( !property( "hideDialogs" ).toBool() )
339-
QMessageBox::critical( this, tr( "Layer creation failed" ), msg );
339+
QMessageBox::critical( this, tr( "New GeoPackage Layer" ), msg );
340340
return false;
341341
}
342342
if ( hDriver != hGpkgDriver )
343343
{
344-
QString msg( tr( "Opening of file succeeded, but this is not a GeoPackage database" ) );
344+
QString msg( tr( "Opening of file succeeded, but this is not a GeoPackage database." ) );
345345
if ( !property( "hideDialogs" ).toBool() )
346-
QMessageBox::critical( this, tr( "Layer creation failed" ), msg );
346+
QMessageBox::critical( this, tr( "New GeoPackage Layer" ), msg );
347347
return false;
348348
}
349349
}
@@ -357,7 +357,7 @@ bool QgsNewGeoPackageLayerDialog::apply()
357357
{
358358
overwriteTable = property( "question_existing_layer_answer_overwrite" ).toBool();
359359
}
360-
else if ( QMessageBox::question( this, tr( "Existing layer" ),
360+
else if ( QMessageBox::question( this, tr( "New GeoPackage Layer" ),
361361
tr( "A table with the same name already exists. Do you want to overwrite it?" ),
362362
QMessageBox::Yes | QMessageBox::No, QMessageBox::No ) == QMessageBox::Yes )
363363
{
@@ -421,7 +421,7 @@ bool QgsNewGeoPackageLayerDialog::apply()
421421
{
422422
QString msg( tr( "Creation of layer failed (OGR error: %1)" ).arg( QString::fromUtf8( CPLGetLastErrorMsg() ) ) );
423423
if ( !property( "hideDialogs" ).toBool() )
424-
QMessageBox::critical( this, tr( "Layer creation failed" ), msg );
424+
QMessageBox::critical( this, tr( "New GeoPackage Layer" ), msg );
425425
return false;
426426
}
427427

@@ -455,7 +455,7 @@ bool QgsNewGeoPackageLayerDialog::apply()
455455
{
456456
if ( !property( "hideDialogs" ).toBool() )
457457
{
458-
QMessageBox::critical( this, tr( "Layer creation failed" ),
458+
QMessageBox::critical( this, tr( "New GeoPackage Layer" ),
459459
tr( "Creation of field %1 failed (OGR error: %2)" )
460460
.arg( fieldName, QString::fromUtf8( CPLGetLastErrorMsg() ) ) );
461461
}
@@ -473,7 +473,7 @@ bool QgsNewGeoPackageLayerDialog::apply()
473473
{
474474
QString msg( tr( "Creation of layer failed (OGR error: %1)" ).arg( QString::fromUtf8( CPLGetLastErrorMsg() ) ) );
475475
if ( !property( "hideDialogs" ).toBool() )
476-
QMessageBox::critical( this, tr( "Layer creation failed" ), msg );
476+
QMessageBox::critical( this, tr( "New GeoPackage Layer" ), msg );
477477
return false;
478478
}
479479
hDS.reset();
@@ -494,7 +494,7 @@ bool QgsNewGeoPackageLayerDialog::apply()
494494
else
495495
{
496496
if ( !property( "hideDialogs" ).toBool() )
497-
QMessageBox::critical( this, tr( "Invalid Layer" ), tr( "%1 is an invalid layer and cannot be loaded." ).arg( tableName ) );
497+
QMessageBox::critical( this, tr( "New GeoPackage Layer" ), tr( "%1 is an invalid layer and cannot be loaded." ).arg( tableName ) );
498498
delete layer;
499499
}
500500

‎src/gui/qgsoptionsdialogbase.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,7 @@ void QgsOptionsDialogBase::optionsStackedWidget_WidgetRemoved( int index )
393393

394394
void QgsOptionsDialogBase::warnAboutMissingObjects()
395395
{
396-
QMessageBox::warning( nullptr, tr( "Missing objects" ),
396+
QMessageBox::warning( nullptr, tr( "Missing Objects" ),
397397
tr( "Base options dialog could not be initialized.\n\n"
398398
"Missing some of the .ui template objects:\n" )
399399
+ " mOptionsListWidget,\n mOptionsStackedWidget,\n mOptionsSplitter,\n mOptionsListFrame",

‎src/gui/qgsowssourceselect.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ void QgsOWSSourceSelect::mDeleteButton_clicked()
289289
{
290290
QString msg = tr( "Are you sure you want to remove the %1 connection and all associated settings?" )
291291
.arg( mConnectionsComboBox->currentText() );
292-
QMessageBox::StandardButton result = QMessageBox::question( this, tr( "Confirm Delete" ), msg, QMessageBox::Yes | QMessageBox::No );
292+
QMessageBox::StandardButton result = QMessageBox::question( this, tr( "Delete Connection" ), msg, QMessageBox::Yes | QMessageBox::No );
293293
if ( result == QMessageBox::Yes )
294294
{
295295
QgsOwsConnection::deleteConnection( mService, mConnectionsComboBox->currentText() );
@@ -631,9 +631,9 @@ void QgsOWSSourceSelect::addDefaultServers()
631631
settings.endGroup();
632632
populateConnectionList();
633633

634-
QMessageBox::information( this, tr( "WMS proxies" ), "<p>" + tr( "Several WMS servers have "
634+
QMessageBox::information( this, tr( "Add WMS Servers" ), "<p>" + tr( "Several WMS servers have "
635635
"been added to the server list. Note that if "
636-
"you access the internet via a web proxy, you will "
636+
"you access the Internet via a web proxy, you will "
637637
"need to set the proxy settings in the QGIS options dialog." ) + "</p>" );
638638
}
639639

‎src/gui/qgsquerybuilder.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -233,15 +233,15 @@ void QgsQueryBuilder::test()
233233
else if ( mLayer->dataProvider()->hasErrors() )
234234
{
235235
QMessageBox::warning( this,
236-
tr( "Query Failed" ),
236+
tr( "Query Result" ),
237237
tr( "An error occurred when executing the query." )
238238
+ tr( "\nThe data provider said:\n%1" ).arg( mLayer->dataProvider()->errors().join( QStringLiteral( "\n" ) ) ) );
239239
mLayer->dataProvider()->clearErrors();
240240
}
241241
else
242242
{
243243
QMessageBox::warning( this,
244-
tr( "Query Failed" ),
244+
tr( "Query Result" ),
245245
tr( "An error occurred when executing the query." ) );
246246
}
247247
}
@@ -254,14 +254,14 @@ void QgsQueryBuilder::accept()
254254
if ( mLayer->dataProvider()->hasErrors() )
255255
{
256256
QMessageBox::warning( this,
257-
tr( "Query Failed" ),
257+
tr( "Query Result" ),
258258
tr( "An error occurred when executing the query." )
259259
+ tr( "\nThe data provider said:\n%1" ).arg( mLayer->dataProvider()->errors().join( QStringLiteral( "\n" ) ) ) );
260260
mLayer->dataProvider()->clearErrors();
261261
}
262262
else
263263
{
264-
QMessageBox::warning( this, tr( "Error in Query" ), tr( "The subset string could not be set" ) );
264+
QMessageBox::warning( this, tr( "Query Result" ), tr( "Error in query. The subset string could not be set." ) );
265265
}
266266

267267
return;

‎src/gui/qgsrasterformatsaveoptionswidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -378,7 +378,7 @@ QString QgsRasterFormatSaveOptionsWidget::validateOptions( bool gui, bool report
378378
}
379379
else if ( ! createOptions.isEmpty() )
380380
{
381-
QMessageBox::information( this, QLatin1String( "" ), tr( "Cannot validate creation options" ), QMessageBox::Close );
381+
QMessageBox::information( this, QLatin1String( "" ), tr( "Cannot validate creation options." ), QMessageBox::Close );
382382
if ( tmpLayer )
383383
delete rasterLayer;
384384
return QString();

‎src/gui/qgsrasterlayersaveasdialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ QgsRasterLayerSaveAsDialog::QgsRasterLayerSaveAsDialog( QgsRasterLayer *rasterLa
197197
if ( files.isEmpty() )
198198
break;
199199

200-
if ( QMessageBox::warning( this, tr( "Warning" ),
200+
if ( QMessageBox::warning( this, tr( "Save Raster Layer" ),
201201
tr( "The directory %1 contains files which will be overwritten: %2" ).arg( dir.absolutePath(), files.join( QStringLiteral( ", " ) ) ),
202202
QMessageBox::Ok | QMessageBox::Cancel ) == QMessageBox::Ok )
203203
break;

‎src/gui/qgssearchquerybuilder.cpp

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ void QgsSearchQueryBuilder::btnTest_clicked()
195195
if ( count == -1 )
196196
return;
197197

198-
QMessageBox::information( this, tr( "Search results" ), tr( "Found %n matching feature(s).", "test result", count ) );
198+
QMessageBox::information( this, tr( "Test Query" ), tr( "Found %n matching feature(s).", "test result", count ) );
199199
}
200200

201201
// This method tests the number of records that would be returned
@@ -204,7 +204,7 @@ long QgsSearchQueryBuilder::countRecords( const QString &searchString )
204204
QgsExpression search( searchString );
205205
if ( search.hasParserError() )
206206
{
207-
QMessageBox::critical( this, tr( "Search string parsing error" ), search.parserErrorString() );
207+
QMessageBox::critical( this, tr( "Query Result" ), search.parserErrorString() );
208208
return -1;
209209
}
210210

@@ -220,7 +220,7 @@ long QgsSearchQueryBuilder::countRecords( const QString &searchString )
220220

221221
if ( !search.prepare( &context ) )
222222
{
223-
QMessageBox::critical( this, tr( "Evaluation error" ), search.evalErrorString() );
223+
QMessageBox::critical( this, tr( "Query Result" ), search.evalErrorString() );
224224
return -1;
225225
}
226226

@@ -237,7 +237,7 @@ long QgsSearchQueryBuilder::countRecords( const QString &searchString )
237237
count++;
238238
}
239239

240-
// check if there were errors during evaulating
240+
// check if there were errors during evaluating
241241
if ( search.hasEvalError() )
242242
break;
243243
}
@@ -246,7 +246,7 @@ long QgsSearchQueryBuilder::countRecords( const QString &searchString )
246246

247247
if ( search.hasEvalError() )
248248
{
249-
QMessageBox::critical( this, tr( "Error during search" ), search.evalErrorString() );
249+
QMessageBox::critical( this, tr( "Query Result" ), search.evalErrorString() );
250250
return -1;
251251
}
252252

@@ -271,7 +271,7 @@ void QgsSearchQueryBuilder::btnOk_clicked()
271271
}
272272
else if ( numRecs == 0 )
273273
{
274-
QMessageBox::warning( this, tr( "No Records" ), tr( "The query you specified results in zero records being returned." ) );
274+
QMessageBox::warning( this, tr( "Query Result" ), tr( "The query you specified results in zero records being returned." ) );
275275
}
276276
else
277277
{
@@ -380,7 +380,7 @@ void QgsSearchQueryBuilder::saveQuery()
380380
QgsSettings s;
381381
QString lastQueryFileDir = s.value( QStringLiteral( "/UI/lastQueryFileDir" ), QDir::homePath() ).toString();
382382
//save as qqt (QGIS query file)
383-
QString saveFileName = QFileDialog::getSaveFileName( nullptr, tr( "Save query to file" ), lastQueryFileDir, QStringLiteral( "*.qqf" ) );
383+
QString saveFileName = QFileDialog::getSaveFileName( nullptr, tr( "Save Query to File" ), lastQueryFileDir, QStringLiteral( "*.qqf" ) );
384384
if ( saveFileName.isNull() )
385385
{
386386
return;
@@ -394,7 +394,7 @@ void QgsSearchQueryBuilder::saveQuery()
394394
QFile saveFile( saveFileName );
395395
if ( !saveFile.open( QIODevice::WriteOnly | QIODevice::Truncate ) )
396396
{
397-
QMessageBox::critical( nullptr, tr( "Error" ), tr( "Could not open file for writing" ) );
397+
QMessageBox::critical( nullptr, tr( "Save Query to File" ), tr( "Could not open file for writing." ) );
398398
return;
399399
}
400400

@@ -416,7 +416,7 @@ void QgsSearchQueryBuilder::loadQuery()
416416
QgsSettings s;
417417
QString lastQueryFileDir = s.value( QStringLiteral( "/UI/lastQueryFileDir" ), QDir::homePath() ).toString();
418418

419-
QString queryFileName = QFileDialog::getOpenFileName( nullptr, tr( "Load query from file" ), lastQueryFileDir, tr( "Query files" ) + " (*.qqf);;" + tr( "All files" ) + " (*)" );
419+
QString queryFileName = QFileDialog::getOpenFileName( nullptr, tr( "Load Query from File" ), lastQueryFileDir, tr( "Query files" ) + " (*.qqf);;" + tr( "All files" ) + " (*)" );
420420
if ( queryFileName.isNull() )
421421
{
422422
return;
@@ -425,20 +425,20 @@ void QgsSearchQueryBuilder::loadQuery()
425425
QFile queryFile( queryFileName );
426426
if ( !queryFile.open( QIODevice::ReadOnly ) )
427427
{
428-
QMessageBox::critical( nullptr, tr( "Error" ), tr( "Could not open file for reading" ) );
428+
QMessageBox::critical( nullptr, tr( "Load Query from File" ), tr( "Could not open file for reading." ) );
429429
return;
430430
}
431431
QDomDocument queryDoc;
432432
if ( !queryDoc.setContent( &queryFile ) )
433433
{
434-
QMessageBox::critical( nullptr, tr( "Error" ), tr( "File is not a valid xml document" ) );
434+
QMessageBox::critical( nullptr, tr( "Load Query from File" ), tr( "File is not a valid xml document." ) );
435435
return;
436436
}
437437

438438
QDomElement queryElem = queryDoc.firstChildElement( QStringLiteral( "Query" ) );
439439
if ( queryElem.isNull() )
440440
{
441-
QMessageBox::critical( nullptr, tr( "Error" ), tr( "File is not a valid query document" ) );
441+
QMessageBox::critical( nullptr, tr( "Load Query from File" ), tr( "File is not a valid query document." ) );
442442
return;
443443
}
444444

@@ -448,7 +448,7 @@ void QgsSearchQueryBuilder::loadQuery()
448448
QgsExpression search( query );
449449
if ( search.hasParserError() )
450450
{
451-
QMessageBox::critical( this, tr( "Search string parsing error" ), search.parserErrorString() );
451+
QMessageBox::critical( this, tr( "Query Result" ), search.parserErrorString() );
452452
return;
453453
}
454454

@@ -476,7 +476,7 @@ void QgsSearchQueryBuilder::loadQuery()
476476
if ( !mFieldMap.contains( attIt ) )
477477
{
478478
bool ok;
479-
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 ),
479+
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 ),
480480
existingAttributes, 0, false, &ok );
481481
if ( !ok || replaceAttribute.isEmpty() )
482482
{

‎src/gui/qgssqlcomposerdialog.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,12 +213,12 @@ void QgsSQLComposerDialog::accept()
213213
{
214214
if ( errorMsg.isEmpty() )
215215
errorMsg = tr( "An error occurred during evaluation of the SQL statement." );
216-
QMessageBox::critical( this, tr( "SQL Error" ), errorMsg );
216+
QMessageBox::critical( this, tr( "SQL Evaluation" ), errorMsg );
217217
return;
218218
}
219219
if ( !warningMsg.isEmpty() )
220220
{
221-
QMessageBox::warning( this, tr( "SQL Warning" ), warningMsg );
221+
QMessageBox::warning( this, tr( "SQL Evaluation" ), warningMsg );
222222
}
223223
}
224224
QDialog::accept();

‎src/gui/qgssubstitutionlistwidget.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ void QgsSubstitutionListWidget::tableChanged()
9090

9191
void QgsSubstitutionListWidget::mButtonExport_clicked()
9292
{
93-
QString fileName = QFileDialog::getSaveFileName( this, tr( "Save substitutions" ), QDir::homePath(),
93+
QString fileName = QFileDialog::getSaveFileName( this, tr( "Save Substitutions" ), QDir::homePath(),
9494
tr( "XML files (*.xml *.XML)" ) );
9595
if ( fileName.isEmpty() )
9696
{
@@ -113,8 +113,8 @@ void QgsSubstitutionListWidget::mButtonExport_clicked()
113113
QFile file( fileName );
114114
if ( !file.open( QIODevice::WriteOnly | QIODevice::Text | QIODevice::Truncate ) )
115115
{
116-
QMessageBox::warning( nullptr, tr( "Export substitutions" ),
117-
tr( "Cannot write file %1:\n%2." ).arg( fileName, file.errorString() ),
116+
QMessageBox::warning( nullptr, tr( "Export Substitutions" ),
117+
tr( "Cannot write file %1:\n%2" ).arg( fileName, file.errorString() ),
118118
QMessageBox::Ok,
119119
QMessageBox::Ok );
120120
return;
@@ -126,7 +126,7 @@ void QgsSubstitutionListWidget::mButtonExport_clicked()
126126

127127
void QgsSubstitutionListWidget::mButtonImport_clicked()
128128
{
129-
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load substitutions" ), QDir::homePath(),
129+
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load Substitutions" ), QDir::homePath(),
130130
tr( "XML files (*.xml *.XML)" ) );
131131
if ( fileName.isEmpty() )
132132
{
@@ -136,8 +136,8 @@ void QgsSubstitutionListWidget::mButtonImport_clicked()
136136
QFile file( fileName );
137137
if ( !file.open( QIODevice::ReadOnly | QIODevice::Text ) )
138138
{
139-
QMessageBox::warning( nullptr, tr( "Import substitutions" ),
140-
tr( "Cannot read file %1:\n%2." ).arg( fileName, file.errorString() ),
139+
QMessageBox::warning( nullptr, tr( "Import Substitutions" ),
140+
tr( "Cannot read file %1:\n%2" ).arg( fileName, file.errorString() ),
141141
QMessageBox::Ok,
142142
QMessageBox::Ok );
143143
return;
@@ -163,7 +163,7 @@ void QgsSubstitutionListWidget::mButtonImport_clicked()
163163
QDomElement root = doc.documentElement();
164164
if ( root.tagName() != QLatin1String( "substitutions" ) )
165165
{
166-
QMessageBox::warning( nullptr, tr( "Import substitutions" ),
166+
QMessageBox::warning( nullptr, tr( "Import Substitutions" ),
167167
tr( "The selected file is not a substitution list." ),
168168
QMessageBox::Ok,
169169
QMessageBox::Ok );

‎src/gui/qgsvariableeditorwidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -728,7 +728,7 @@ void VariableEditorDelegate::setModelData( QWidget *widget, QAbstractItemModel *
728728
if ( scope->hasVariable( newName ) )
729729
{
730730
//existing name
731-
QMessageBox::warning( mParentTree, tr( "Rename variable" ), tr( "A variable with the name \"%1\" already exists in this context." ).arg( newName ) );
731+
QMessageBox::warning( mParentTree, tr( "Rename Variable" ), tr( "A variable with the name \"%1\" already exists in this context." ).arg( newName ) );
732732
newName.append( "_1" );
733733
}
734734

‎src/gui/raster/qgspalettedrendererwidget.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -350,7 +350,7 @@ void QgsPalettedRendererWidget::loadColorTable()
350350
{
351351
QgsSettings settings;
352352
QString lastDir = settings.value( QStringLiteral( "lastColorMapDir" ), QDir::homePath() ).toString();
353-
QString fileName = QFileDialog::getOpenFileName( this, tr( "Open file" ), lastDir );
353+
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load Color Table from File" ), lastDir );
354354
if ( !fileName.isEmpty() )
355355
{
356356
QgsPalettedRasterRenderer::ClassData classes = QgsPalettedRasterRenderer::classDataFromFile( fileName );
@@ -363,7 +363,7 @@ void QgsPalettedRendererWidget::loadColorTable()
363363
}
364364
else
365365
{
366-
QMessageBox::critical( nullptr, tr( "Invalid file" ), tr( "Could not interpret file as a raster color table." ) );
366+
QMessageBox::critical( nullptr, tr( "Load Color Table" ), tr( "Could not interpret file as a raster color table." ) );
367367
}
368368
}
369369
}
@@ -372,7 +372,7 @@ void QgsPalettedRendererWidget::saveColorTable()
372372
{
373373
QgsSettings settings;
374374
QString lastDir = settings.value( QStringLiteral( "lastColorMapDir" ), QDir::homePath() ).toString();
375-
QString fileName = QFileDialog::getSaveFileName( this, tr( "Save file" ), lastDir, tr( "Text (*.clr)" ) );
375+
QString fileName = QFileDialog::getSaveFileName( this, tr( "Save Color Table as File" ), lastDir, tr( "Text (*.clr)" ) );
376376
if ( !fileName.isEmpty() )
377377
{
378378
if ( !fileName.endsWith( QLatin1String( ".clr" ), Qt::CaseInsensitive ) )
@@ -393,7 +393,7 @@ void QgsPalettedRendererWidget::saveColorTable()
393393
}
394394
else
395395
{
396-
QMessageBox::warning( this, tr( "Write access denied" ), tr( "Write access denied. Adjust the file permissions and try again.\n\n" ) );
396+
QMessageBox::warning( this, tr( "Save Color Table as File" ), tr( "Write access denied. Adjust the file permissions and try again.\n\n" ) );
397397
}
398398
}
399399
}
@@ -454,7 +454,7 @@ void QgsPalettedRendererWidget::bandChanged( int band )
454454
if ( !mModel->classData().isEmpty() )
455455
{
456456
int res = QMessageBox::question( this,
457-
tr( "Confirm Delete" ),
457+
tr( "Delete Classification" ),
458458
tr( "The classification band was changed from %1 to %2.\n"
459459
"Should the existing classes be deleted?" ).arg( mBand ).arg( band ),
460460
QMessageBox::Yes | QMessageBox::No );

‎src/gui/raster/qgsrastertransparencywidget.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ void QgsRasterTransparencyWidget::pbnExportTransparentPixelValues_clicked()
222222
{
223223
QgsSettings myQSettings;
224224
QString myLastDir = myQSettings.value( QStringLiteral( "lastRasterFileFilterDir" ), QDir::homePath() ).toString();
225-
QString myFileName = QFileDialog::getSaveFileName( this, tr( "Save file" ), myLastDir, tr( "Textfile" ) + " (*.txt)" );
225+
QString myFileName = QFileDialog::getSaveFileName( this, tr( "Save Pixel Values as File" ), myLastDir, tr( "Textfile" ) + " (*.txt)" );
226226
if ( !myFileName.isEmpty() )
227227
{
228228
if ( !myFileName.endsWith( QLatin1String( ".txt" ), Qt::CaseInsensitive ) )
@@ -260,7 +260,7 @@ void QgsRasterTransparencyWidget::pbnExportTransparentPixelValues_clicked()
260260
}
261261
else
262262
{
263-
QMessageBox::warning( this, tr( "Write access denied" ), tr( "Write access denied. Adjust the file permissions and try again.\n\n" ) );
263+
QMessageBox::warning( this, tr( "Save Pixel Values as File" ), tr( "Write access denied. Adjust the file permissions and try again.\n\n" ) );
264264
}
265265
}
266266
}
@@ -272,7 +272,7 @@ void QgsRasterTransparencyWidget::pbnImportTransparentPixelValues_clicked()
272272
QString myBadLines;
273273
QgsSettings myQSettings;
274274
QString myLastDir = myQSettings.value( QStringLiteral( "lastRasterFileFilterDir" ), QDir::homePath() ).toString();
275-
QString myFileName = QFileDialog::getOpenFileName( this, tr( "Open file" ), myLastDir, tr( "Textfile" ) + " (*.txt)" );
275+
QString myFileName = QFileDialog::getOpenFileName( this, tr( "Load Pixel Values from File" ), myLastDir, tr( "Textfile" ) + " (*.txt)" );
276276
QFile myInputFile( myFileName );
277277
if ( myInputFile.open( QFile::ReadOnly ) )
278278
{
@@ -351,12 +351,12 @@ void QgsRasterTransparencyWidget::pbnImportTransparentPixelValues_clicked()
351351

352352
if ( myImportError )
353353
{
354-
QMessageBox::warning( this, tr( "Import Error" ), tr( "The following lines contained errors\n\n%1" ).arg( myBadLines ) );
354+
QMessageBox::warning( this, tr( "Load Pixel Values from File" ), tr( "The following lines contained errors\n\n%1" ).arg( myBadLines ) );
355355
}
356356
}
357357
else if ( !myFileName.isEmpty() )
358358
{
359-
QMessageBox::warning( this, tr( "Read access denied" ), tr( "Read access denied. Adjust the file permissions and try again.\n\n" ) );
359+
QMessageBox::warning( this, tr( "Load Pixel Values from File" ), tr( "Read access denied. Adjust the file permissions and try again.\n\n" ) );
360360
}
361361
tableTransparency->resizeColumnsToContents();
362362
tableTransparency->resizeRowsToContents();

‎src/gui/raster/qgssinglebandpseudocolorrendererwidget.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ void QgsSingleBandPseudoColorRendererWidget::mLoadFromBandButton_clicked()
449449
}
450450
else
451451
{
452-
QMessageBox::warning( this, tr( "Load Color Map" ), tr( "The color map for band %1 has no entries" ).arg( bandIndex ) );
452+
QMessageBox::warning( this, tr( "Load Color Map" ), tr( "The color map for band %1 has no entries." ).arg( bandIndex ) );
453453
}
454454

455455
loadMinMaxFromTree();
@@ -463,7 +463,7 @@ void QgsSingleBandPseudoColorRendererWidget::mLoadFromFileButton_clicked()
463463
QString badLines;
464464
QgsSettings settings;
465465
QString lastDir = settings.value( QStringLiteral( "lastColorMapDir" ), QDir::homePath() ).toString();
466-
QString fileName = QFileDialog::getOpenFileName( this, tr( "Open file" ), lastDir, tr( "Textfile (*.txt)" ) );
466+
QString fileName = QFileDialog::getOpenFileName( this, tr( "Load Color Map from File" ), lastDir, tr( "Textfile (*.txt)" ) );
467467
QFile inputFile( fileName );
468468
if ( inputFile.open( QFile::ReadOnly ) )
469469
{
@@ -536,12 +536,12 @@ void QgsSingleBandPseudoColorRendererWidget::mLoadFromFileButton_clicked()
536536

537537
if ( importError )
538538
{
539-
QMessageBox::warning( this, tr( "Import Error" ), tr( "The following lines contained errors\n\n" ) + badLines );
539+
QMessageBox::warning( this, tr( "Load Color Map from File" ), tr( "The following lines contained errors\n\n" ) + badLines );
540540
}
541541
}
542542
else if ( !fileName.isEmpty() )
543543
{
544-
QMessageBox::warning( this, tr( "Read access denied" ), tr( "Read access denied. Adjust the file permissions and try again.\n\n" ) );
544+
QMessageBox::warning( this, tr( "Load Color Map from File" ), tr( "Read access denied. Adjust the file permissions and try again.\n\n" ) );
545545
}
546546

547547
loadMinMaxFromTree();
@@ -552,7 +552,7 @@ void QgsSingleBandPseudoColorRendererWidget::mExportToFileButton_clicked()
552552
{
553553
QgsSettings settings;
554554
QString lastDir = settings.value( QStringLiteral( "lastColorMapDir" ), QDir::homePath() ).toString();
555-
QString fileName = QFileDialog::getSaveFileName( this, tr( "Save file" ), lastDir, tr( "Textfile (*.txt)" ) );
555+
QString fileName = QFileDialog::getSaveFileName( this, tr( "Save Color Map as File" ), lastDir, tr( "Textfile (*.txt)" ) );
556556
if ( !fileName.isEmpty() )
557557
{
558558
if ( !fileName.endsWith( QLatin1String( ".txt" ), Qt::CaseInsensitive ) )
@@ -610,7 +610,7 @@ void QgsSingleBandPseudoColorRendererWidget::mExportToFileButton_clicked()
610610
}
611611
else
612612
{
613-
QMessageBox::warning( this, tr( "Write access denied" ), tr( "Write access denied. Adjust the file permissions and try again.\n\n" ) );
613+
QMessageBox::warning( this, tr( "Save Color Map as File" ), tr( "Write access denied. Adjust the file permissions and try again.\n\n" ) );
614614
}
615615
}
616616
}
@@ -625,7 +625,7 @@ void QgsSingleBandPseudoColorRendererWidget::mColormapTreeWidget_itemDoubleClick
625625
if ( column == ColorColumn )
626626
{
627627
item->setFlags( Qt::ItemIsEnabled | Qt::ItemIsSelectable );
628-
QColor newColor = QgsColorDialog::getColor( item->background( column ).color(), this, QStringLiteral( "Change color" ), true );
628+
QColor newColor = QgsColorDialog::getColor( item->background( column ).color(), this, QStringLiteral( "Change Color" ), true );
629629
if ( newColor.isValid() )
630630
{
631631
item->setBackground( ColorColumn, QBrush( newColor ) );
@@ -851,7 +851,7 @@ void QgsSingleBandPseudoColorRendererWidget::changeColor()
851851
}
852852
QTreeWidgetItem *firstItem = itemList.first();
853853

854-
QColor newColor = QgsColorDialog::getColor( firstItem->background( ColorColumn ).color(), this, QStringLiteral( "Change color" ), true );
854+
QColor newColor = QgsColorDialog::getColor( firstItem->background( ColorColumn ).color(), this, QStringLiteral( "Change Color" ), true );
855855
if ( newColor.isValid() )
856856
{
857857
Q_FOREACH ( QTreeWidgetItem *item, itemList )

‎src/gui/symbology/qgscategorizedsymbolrendererwidget.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -658,8 +658,8 @@ void QgsCategorizedSymbolRendererWidget::addCategories()
658658
// ask to abort if too many classes
659659
if ( unique_vals.size() >= 1000 )
660660
{
661-
int res = QMessageBox::warning( nullptr, tr( "High number of classes!" ),
662-
tr( "Classification would yield %1 entries which might not be expected. Continue?" ).arg( unique_vals.size() ),
661+
int res = QMessageBox::warning( nullptr, tr( "Classify Categories" ),
662+
tr( "High number of classes. Classification would yield %1 entries which might not be expected. Continue?" ).arg( unique_vals.size() ),
663663
QMessageBox::Ok | QMessageBox::Cancel,
664664
QMessageBox::Cancel );
665665
if ( res == QMessageBox::Cancel )
@@ -683,7 +683,7 @@ void QgsCategorizedSymbolRendererWidget::addCategories()
683683
!mRenderer->categories().isEmpty() )
684684
{
685685
int res = QMessageBox::question( this,
686-
tr( "Confirm Delete" ),
686+
tr( "Delete Classification" ),
687687
tr( "The classification field was changed from '%1' to '%2'.\n"
688688
"Should the existing classes be deleted before classification?" )
689689
.arg( mOldClassificationAttribute, attrName ),
@@ -910,7 +910,7 @@ void QgsCategorizedSymbolRendererWidget::matchToSymbolsFromXml()
910910
QgsSettings settings;
911911
QString openFileDir = settings.value( QStringLiteral( "UI/lastMatchToSymbolsDir" ), QDir::homePath() ).toString();
912912

913-
QString fileName = QFileDialog::getOpenFileName( this, tr( "Match to symbols from file" ), openFileDir,
913+
QString fileName = QFileDialog::getOpenFileName( this, tr( "Match to Symbols from File" ), openFileDir,
914914
tr( "XML files (*.xml *XML)" ) );
915915
if ( fileName.isEmpty() )
916916
{
@@ -923,20 +923,20 @@ void QgsCategorizedSymbolRendererWidget::matchToSymbolsFromXml()
923923
QgsStyle importedStyle;
924924
if ( !importedStyle.importXml( fileName ) )
925925
{
926-
QMessageBox::warning( this, tr( "Matching Error" ),
926+
QMessageBox::warning( this, tr( "Match to Symbols from File" ),
927927
tr( "An error occurred while reading file:\n%1" ).arg( importedStyle.errorString() ) );
928928
return;
929929
}
930930

931931
int matched = matchToSymbols( &importedStyle );
932932
if ( matched > 0 )
933933
{
934-
QMessageBox::information( this, tr( "Matched Symbols" ),
934+
QMessageBox::information( this, tr( "Match to Symbols from File" ),
935935
tr( "Matched %1 categories to symbols from file." ).arg( matched ) );
936936
}
937937
else
938938
{
939-
QMessageBox::warning( this, tr( "Matched Symbols" ),
939+
QMessageBox::warning( this, tr( "Match to Symbols from File" ),
940940
tr( "No categories could be matched to symbols in file." ) );
941941
}
942942
}

‎src/gui/symbology/qgsgraduatedsymbolrendererwidget.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ void QgsGraduatedSymbolRendererWidget::methodComboBox_currentIndexChanged( int i
690690

691691
if ( !ramp )
692692
{
693-
QMessageBox::critical( this, tr( "Error" ), tr( "No color ramp defined." ) );
693+
QMessageBox::critical( this, tr( "Select Method" ), tr( "No color ramp defined." ) );
694694
return;
695695
}
696696
mRenderer->setSourceColorRamp( ramp );
@@ -803,7 +803,7 @@ void QgsGraduatedSymbolRendererWidget::classifyGraduated()
803803
std::unique_ptr<QgsColorRamp> ramp( btnColorRamp->colorRamp() );
804804
if ( !ramp )
805805
{
806-
QMessageBox::critical( this, tr( "Error" ), tr( "No color ramp defined." ) );
806+
QMessageBox::critical( this, tr( "Apply Classification" ), tr( "No color ramp defined." ) );
807807
return;
808808
}
809809

@@ -823,7 +823,7 @@ void QgsGraduatedSymbolRendererWidget::classifyGraduated()
823823
// and give the user the chance to cancel
824824
if ( QgsGraduatedSymbolRenderer::Jenks == mode && mLayer->featureCount() > 50000 )
825825
{
826-
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 ) )
826+
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 ) )
827827
return;
828828
}
829829

@@ -836,7 +836,7 @@ void QgsGraduatedSymbolRendererWidget::classifyGraduated()
836836
{
837837
if ( !ramp )
838838
{
839-
QMessageBox::critical( this, tr( "Error" ), tr( "No color ramp defined." ) );
839+
QMessageBox::critical( this, tr( "Apply Classification" ), tr( "No color ramp defined." ) );
840840
return;
841841
}
842842
mRenderer->setSourceColorRamp( ramp.release() );
@@ -1047,7 +1047,7 @@ void QgsGraduatedSymbolRendererWidget::toggleBoundariesLink( bool linked )
10471047
{
10481048
int result = QMessageBox::warning(
10491049
this,
1050-
tr( "Linked range warning" ),
1050+
tr( "Link Class Boundaries" ),
10511051
tr( "Rows will be reordered before linking boundaries. Continue?" ),
10521052
QMessageBox::Ok | QMessageBox::Cancel );
10531053
if ( result != QMessageBox::Ok )

‎src/gui/symbology/qgsrendererwidget.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -288,7 +288,7 @@ QgsDataDefinedSizeLegendWidget *QgsRendererWidget::createDataDefinedSizeLegendWi
288288
QgsProperty ddSize = symbol->dataDefinedSize();
289289
if ( !ddSize || !ddSize.isActive() )
290290
{
291-
QMessageBox::warning( this, tr( "Data-defined size legend" ), tr( "Data-defined size is not enabled!" ) );
291+
QMessageBox::warning( this, tr( "Data-defined Size Legend" ), tr( "Data-defined size is not enabled!" ) );
292292
return nullptr;
293293
}
294294

‎src/gui/symbology/qgsrulebasedrendererwidget.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ void QgsRuleBasedRendererWidget::refineRuleScalesGui( const QModelIndexList &ind
316316
if ( ok )
317317
scales.append( scale );
318318
else
319-
QMessageBox::information( this, tr( "Error" ), QString( tr( "\"%1\" is not valid scale denominator, ignoring it." ) ).arg( item ) );
319+
QMessageBox::information( this, tr( "Scale Refinement" ), QString( tr( "\"%1\" is not valid scale denominator, ignoring it." ) ).arg( item ) );
320320
}
321321

322322
Q_FOREACH ( const QModelIndex &index, indexList )
@@ -757,7 +757,7 @@ void QgsRendererRulePropsWidget::testFilter()
757757
QgsExpression filter( editFilter->text() );
758758
if ( filter.hasParserError() )
759759
{
760-
QMessageBox::critical( this, tr( "Error" ), tr( "Filter expression parsing error:\n" ) + filter.parserErrorString() );
760+
QMessageBox::critical( this, tr( "Test Filter" ), tr( "Filter expression parsing error:\n" ) + filter.parserErrorString() );
761761
return;
762762
}
763763

@@ -771,7 +771,7 @@ void QgsRendererRulePropsWidget::testFilter()
771771

772772
if ( !filter.prepare( &context ) )
773773
{
774-
QMessageBox::critical( this, tr( "Evaluation error" ), filter.evalErrorString() );
774+
QMessageBox::critical( this, tr( "Test Filter" ), filter.evalErrorString() );
775775
return;
776776
}
777777

@@ -793,7 +793,7 @@ void QgsRendererRulePropsWidget::testFilter()
793793

794794
QApplication::restoreOverrideCursor();
795795

796-
QMessageBox::information( this, tr( "Filter" ), tr( "Filter returned %n feature(s)", "number of filtered features", count ) );
796+
QMessageBox::information( this, tr( "Test Filter" ), tr( "Filter returned %n feature(s)", "number of filtered features", count ) );
797797
}
798798

799799
void QgsRendererRulePropsWidget::apply()

‎src/gui/symbology/qgssmartgroupeditordialog.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ void QgsSmartGroupEditorDialog::buttonBox_accepted()
194194
{
195195
if ( mNameLineEdit->text().isEmpty() )
196196
{
197-
QMessageBox::critical( this, tr( "Invalid name" ), tr( "The smart group name field is empty. Kindly provide a name." ) );
197+
QMessageBox::critical( this, tr( "Edit Smart Group" ), tr( "The smart group name field is empty. Kindly provide a name." ) );
198198
return;
199199
}
200200
accept();

‎src/gui/symbology/qgsstyleexportimportdialog.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -121,14 +121,14 @@ void QgsStyleExportImportDialog::doExportImport()
121121
QModelIndexList selection = listItems->selectionModel()->selectedIndexes();
122122
if ( selection.isEmpty() )
123123
{
124-
QMessageBox::warning( this, tr( "Export/import error" ),
124+
QMessageBox::warning( this, tr( "Export/import Symbols or Color Ramps" ),
125125
tr( "You should select at least one symbol/color ramp." ) );
126126
return;
127127
}
128128

129129
if ( mDialogMode == Export )
130130
{
131-
QString fileName = QFileDialog::getSaveFileName( this, tr( "Save styles" ), QDir::homePath(),
131+
QString fileName = QFileDialog::getSaveFileName( this, tr( "Save Styles" ), QDir::homePath(),
132132
tr( "XML files (*.xml *.XML)" ) );
133133
if ( fileName.isEmpty() )
134134
{
@@ -146,14 +146,14 @@ void QgsStyleExportImportDialog::doExportImport()
146146
moveStyles( &selection, mStyle, mTempStyle );
147147
if ( !mTempStyle->exportXml( mFileName ) )
148148
{
149-
QMessageBox::warning( this, tr( "Export/import error" ),
149+
QMessageBox::warning( this, tr( "Export Symbols" ),
150150
tr( "Error when saving selected symbols to file:\n%1" )
151151
.arg( mTempStyle->errorString() ) );
152152
return;
153153
}
154154
else
155155
{
156-
QMessageBox::information( this, tr( "Export successful" ),
156+
QMessageBox::information( this, tr( "Export Symbols" ),
157157
tr( "The selected symbols were successfully exported to file:\n%1" )
158158
.arg( mFileName ) );
159159
}
@@ -180,7 +180,7 @@ bool QgsStyleExportImportDialog::populateStyles( QgsStyle *style )
180180
// NOTE mTempStyle is style here
181181
if ( !style->importXml( mFileName ) )
182182
{
183-
QMessageBox::warning( this, tr( "Import Error" ),
183+
QMessageBox::warning( this, tr( "Import Symbols or Color Ramps" ),
184184
tr( "An error occurred during import:\n%1" ).arg( style->errorString() ) );
185185
return false;
186186
}
@@ -278,7 +278,7 @@ void QgsStyleExportImportDialog::moveStyles( QModelIndexList *selection, QgsStyl
278278
{
279279
if ( dst->symbolNames().contains( symbolName ) && prompt )
280280
{
281-
int res = QMessageBox::warning( this, tr( "Duplicate Names" ),
281+
int res = QMessageBox::warning( this, tr( "Export/import Symbols" ),
282282
tr( "Symbol with name '%1' already exists.\nOverwrite?" )
283283
.arg( symbolName ),
284284
QMessageBox::Yes | QMessageBox::YesToAll | QMessageBox::No | QMessageBox::NoToAll | QMessageBox::Cancel );
@@ -322,7 +322,7 @@ void QgsStyleExportImportDialog::moveStyles( QModelIndexList *selection, QgsStyl
322322
{
323323
if ( dst->colorRampNames().contains( symbolName ) && prompt )
324324
{
325-
int res = QMessageBox::warning( this, tr( "Duplicate Names" ),
325+
int res = QMessageBox::warning( this, tr( "Export/import Color Ramps" ),
326326
tr( "Color ramp with name '%1' already exists.\nOverwrite?" )
327327
.arg( symbolName ),
328328
QMessageBox::Yes | QMessageBox::YesToAll | QMessageBox::No | QMessageBox::NoToAll | QMessageBox::Cancel );
@@ -482,7 +482,7 @@ void QgsStyleExportImportDialog::browse()
482482

483483
if ( type == QLatin1String( "file" ) )
484484
{
485-
mFileName = QFileDialog::getOpenFileName( this, tr( "Load styles" ), QDir::homePath(),
485+
mFileName = QFileDialog::getOpenFileName( this, tr( "Load Styles" ), QDir::homePath(),
486486
tr( "XML files (*.xml *XML)" ) );
487487
if ( mFileName.isEmpty() )
488488
{
@@ -549,8 +549,8 @@ void QgsStyleExportImportDialog::httpFinished()
549549
mTempFile->remove();
550550
mFileName.clear();
551551
mProgressDlg->hide();
552-
QMessageBox::information( this, tr( "HTTP Error!" ),
553-
tr( "Download failed: %1." ).arg( mNetReply->errorString() ) );
552+
QMessageBox::information( this, tr( "Import from URL" ),
553+
tr( "HTTP Error! Download failed: %1." ).arg( mNetReply->errorString() ) );
554554
return;
555555
}
556556
else

‎src/gui/symbology/qgsstylemanagerdialog.cpp

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -420,12 +420,12 @@ bool QgsStyleManagerDialog::addSymbol()
420420
// validate name
421421
if ( name.isEmpty() )
422422
{
423-
QMessageBox::warning( this, tr( "Save symbol" ),
423+
QMessageBox::warning( this, tr( "Save Symbol" ),
424424
tr( "Cannot save symbol without name. Enter a name." ) );
425425
}
426426
else if ( mStyle->symbolNames().contains( name ) )
427427
{
428-
int res = QMessageBox::warning( this, tr( "Save symbol" ),
428+
int res = QMessageBox::warning( this, tr( "Save Symbol" ),
429429
tr( "Symbol with name '%1' already exists. Overwrite?" )
430430
.arg( name ),
431431
QMessageBox::Yes | QMessageBox::No );
@@ -474,7 +474,7 @@ QString QgsStyleManagerDialog::addColorRampStatic( QWidget *parent, QgsStyle *st
474474
QStringList rampTypes;
475475
rampTypes << tr( "Gradient" ) << tr( "Color presets" ) << tr( "Random" ) << tr( "Catalog: cpt-city" );
476476
rampTypes << tr( "Catalog: ColorBrewer" );
477-
rampType = QInputDialog::getItem( parent, tr( "Color ramp type" ),
477+
rampType = QInputDialog::getItem( parent, tr( "Color Ramp Type" ),
478478
tr( "Please select color ramp type:" ), rampTypes, 0, false, &ok );
479479
}
480480
if ( !ok || rampType.isEmpty() )
@@ -569,7 +569,7 @@ QString QgsStyleManagerDialog::addColorRampStatic( QWidget *parent, QgsStyle *st
569569
}
570570
else if ( style->colorRampNames().contains( name ) )
571571
{
572-
int res = QMessageBox::warning( parent, tr( "Save color ramp" ),
572+
int res = QMessageBox::warning( parent, tr( "Save Color Ramp" ),
573573
tr( "Color ramp with name '%1' already exists. Overwrite?" )
574574
.arg( name ),
575575
QMessageBox::Yes | QMessageBox::No );
@@ -771,7 +771,7 @@ void QgsStyleManagerDialog::removeItem()
771771
bool QgsStyleManagerDialog::removeSymbol()
772772
{
773773
QModelIndexList indexes = listItems->selectionModel()->selectedIndexes();
774-
if ( QMessageBox::Yes != QMessageBox::question( this, tr( "Confirm removal" ),
774+
if ( QMessageBox::Yes != QMessageBox::question( this, tr( "Remove Symbol" ),
775775
QString( tr( "Do you really want to remove %n symbol(s)?", nullptr, indexes.count() ) ),
776776
QMessageBox::Yes,
777777
QMessageBox::No ) )
@@ -791,7 +791,7 @@ bool QgsStyleManagerDialog::removeSymbol()
791791
bool QgsStyleManagerDialog::removeColorRamp()
792792
{
793793
QModelIndexList indexes = listItems->selectionModel()->selectedIndexes();
794-
if ( QMessageBox::Yes != QMessageBox::question( this, tr( "Confirm removal" ),
794+
if ( QMessageBox::Yes != QMessageBox::question( this, tr( "Remove Color Ramp" ),
795795
QString( tr( "Do you really want to remove %n ramp(s)?", nullptr, indexes.count() ) ),
796796
QMessageBox::Yes,
797797
QMessageBox::No ) )
@@ -830,15 +830,15 @@ void QgsStyleManagerDialog::itemChanged( QStandardItem *item )
830830
}
831831
else
832832
{
833-
QMessageBox::critical( this, tr( "Cannot rename item" ),
833+
QMessageBox::critical( this, tr( "Save Item" ),
834834
tr( "Name is already taken by another item. Choose a different name." ) );
835835
item->setText( oldName );
836836
}
837837
}
838838

839839
void QgsStyleManagerDialog::exportItemsPNG()
840840
{
841-
QString dir = QFileDialog::getExistingDirectory( this, tr( "Exported selected symbols as PNG" ),
841+
QString dir = QFileDialog::getExistingDirectory( this, tr( "Export Selected Symbols as PNG" ),
842842
QDir::home().absolutePath(),
843843
QFileDialog::ShowDirsOnly
844844
| QFileDialog::DontResolveSymlinks );
@@ -847,7 +847,7 @@ void QgsStyleManagerDialog::exportItemsPNG()
847847

848848
void QgsStyleManagerDialog::exportItemsSVG()
849849
{
850-
QString dir = QFileDialog::getExistingDirectory( this, tr( "Exported selected symbols as SVG" ),
850+
QString dir = QFileDialog::getExistingDirectory( this, tr( "Export Selected Symbols as SVG" ),
851851
QDir::home().absolutePath(),
852852
QFileDialog::ShowDirsOnly
853853
| QFileDialog::DontResolveSymlinks );
@@ -1061,22 +1061,22 @@ int QgsStyleManagerDialog::addTag()
10611061
QString itemName;
10621062
int id;
10631063
bool ok;
1064-
itemName = QInputDialog::getText( this, tr( "Tag name" ),
1064+
itemName = QInputDialog::getText( this, tr( "Add Tag" ),
10651065
tr( "Please enter name for the new tag:" ), QLineEdit::Normal, tr( "New tag" ), &ok ).trimmed();
10661066
if ( !ok || itemName.isEmpty() )
10671067
return 0;
10681068

10691069
int check = mStyle->tagId( itemName );
10701070
if ( check > 0 )
10711071
{
1072-
QMessageBox::critical( this, tr( "Error!" ),
1072+
QMessageBox::critical( this, tr( "Add Tag" ),
10731073
tr( "Tag name already exists in your symbol database." ) );
10741074
return 0;
10751075
}
10761076
id = mStyle->addTag( itemName );
10771077
if ( !id )
10781078
{
1079-
QMessageBox::critical( this, tr( "Error!" ),
1079+
QMessageBox::critical( this, tr( "Add Tag" ),
10801080
tr( "New tag could not be created.\n"
10811081
"There was a problem with your symbol database." ) );
10821082
return 0;
@@ -1131,8 +1131,8 @@ void QgsStyleManagerDialog::removeGroup()
11311131
QString data = index.data( Qt::UserRole + 1 ).toString();
11321132
if ( data == QLatin1String( "all" ) || data == QLatin1String( "favorite" ) || data == QLatin1String( "tags" ) || index.data() == "smartgroups" )
11331133
{
1134-
int err = QMessageBox::critical( this, tr( "Invalid selection" ),
1135-
tr( "Cannot delete system defined categories.\n"
1134+
int err = QMessageBox::critical( this, tr( "Remove Group" ),
1135+
tr( "Invalid selection. Cannot delete system defined categories.\n"
11361136
"Kindly select a group or smart group you might want to delete." ) );
11371137
if ( err )
11381138
return;
@@ -1254,8 +1254,8 @@ void QgsStyleManagerDialog::regrouped( QStandardItem *item )
12541254
regrouped = mStyle->detagSymbol( type, symbolName, QStringList( tag ) );
12551255
if ( !regrouped )
12561256
{
1257-
int er = QMessageBox::critical( this, tr( "Database Error" ),
1258-
tr( "There was a problem with the Symbols database while regrouping." ) );
1257+
int er = QMessageBox::critical( this, tr( "Group Items" ),
1258+
tr( "There was a problem with the symbols database while regrouping." ) );
12591259
// call the slot again to get back to normal
12601260
if ( er )
12611261
tagSymbolsAction();
@@ -1502,7 +1502,7 @@ void QgsStyleManagerDialog::editSmartgroupAction()
15021502
QModelIndex present = groupTree->currentIndex();
15031503
if ( present.parent().data( Qt::UserRole + 1 ) != "smartgroups" )
15041504
{
1505-
QMessageBox::critical( this, tr( "Invalid Selection" ),
1505+
QMessageBox::critical( this, tr( "Edit Smart Group" ),
15061506
tr( "You have not selected a Smart Group. Kindly select a Smart Group to edit." ) );
15071507
return;
15081508
}
@@ -1521,7 +1521,7 @@ void QgsStyleManagerDialog::editSmartgroupAction()
15211521
int id = mStyle->addSmartgroup( dlg.smartgroupName(), dlg.conditionOperator(), dlg.conditionMap() );
15221522
if ( !id )
15231523
{
1524-
QMessageBox::critical( this, tr( "Database Error!" ),
1524+
QMessageBox::critical( this, tr( "Edit Smart Group" ),
15251525
tr( "There was some error while editing the smart group." ) );
15261526
return;
15271527
}

‎src/gui/symbology/qgssymbollayerwidget.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ QgsSimpleLineSymbolLayerWidget::QgsSimpleLineSymbolLayerWidget( QgsVectorLayer *
187187
<< QgsUnitTypes::RenderPoints << QgsUnitTypes::RenderInches );
188188

189189
btnChangeColor->setAllowOpacity( true );
190-
btnChangeColor->setColorDialogTitle( tr( "Select Line color" ) );
190+
btnChangeColor->setColorDialogTitle( tr( "Select Line Color" ) );
191191
btnChangeColor->setContext( QStringLiteral( "symbology" ) );
192192

193193
spinOffset->setClearValue( 0.0 );
@@ -1390,12 +1390,12 @@ QgsShapeburstFillSymbolLayerWidget::QgsShapeburstFillSymbolLayerWidget( QgsVecto
13901390
group2->addButton( mRadioUseMaxDistance );
13911391
group2->addButton( mRadioUseWholeShape );
13921392
btnChangeColor->setAllowOpacity( true );
1393-
btnChangeColor->setColorDialogTitle( tr( "Select Gradient color" ) );
1393+
btnChangeColor->setColorDialogTitle( tr( "Select Gradient Color" ) );
13941394
btnChangeColor->setContext( QStringLiteral( "symbology" ) );
13951395
btnChangeColor->setShowNoColor( true );
13961396
btnChangeColor->setNoColorString( tr( "Transparent" ) );
13971397
btnChangeColor2->setAllowOpacity( true );
1398-
btnChangeColor2->setColorDialogTitle( tr( "Select Gradient color" ) );
1398+
btnChangeColor2->setColorDialogTitle( tr( "Select Gradient Color" ) );
13991399
btnChangeColor2->setContext( QStringLiteral( "symbology" ) );
14001400
btnChangeColor2->setShowNoColor( true );
14011401
btnChangeColor2->setNoColorString( tr( "Transparent" ) );
@@ -2373,7 +2373,7 @@ QgsSymbolLayer *QgsSVGFillSymbolLayerWidget::symbolLayer()
23732373

23742374
void QgsSVGFillSymbolLayerWidget::mBrowseToolButton_clicked()
23752375
{
2376-
QString filePath = QFileDialog::getOpenFileName( nullptr, tr( "Select SVG texture file" ), QDir::homePath(), tr( "SVG file" ) + " (*.svg);;" + tr( "All files" ) + " (*.*)" );
2376+
QString filePath = QFileDialog::getOpenFileName( nullptr, tr( "Select SVG Texture File" ), QDir::homePath(), tr( "SVG file" ) + " (*.svg);;" + tr( "All files" ) + " (*.*)" );
23772377
if ( !filePath.isNull() )
23782378
{
23792379
mSVGLineEdit->setText( filePath );
@@ -3237,14 +3237,14 @@ void QgsRasterFillSymbolLayerWidget::mBrowseToolButton_clicked()
32373237
}
32383238

32393239
//show file dialog
3240-
QString filePath = QFileDialog::getOpenFileName( nullptr, tr( "Select image file" ), openDir );
3240+
QString filePath = QFileDialog::getOpenFileName( nullptr, tr( "Select Image File" ), openDir );
32413241
if ( !filePath.isNull() )
32423242
{
32433243
//check if file exists
32443244
QFileInfo fileInfo( filePath );
32453245
if ( !fileInfo.exists() || !fileInfo.isReadable() )
32463246
{
3247-
QMessageBox::critical( nullptr, QStringLiteral( "Invalid file" ), QStringLiteral( "Error, file does not exist or is not readable" ) );
3247+
QMessageBox::critical( nullptr, QStringLiteral( "Select Image File" ), QStringLiteral( "Error, file does not exist or is not readable." ) );
32483248
return;
32493249
}
32503250

0 commit comments

Comments
 (0)
Please sign in to comment.