Skip to content

Commit 806545b

Browse files
committed
Plural disambiguation
1 parent 87bb4bc commit 806545b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/app/qgisapp.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7327,7 +7327,7 @@ void QgisApp::deleteSelected( QgsMapLayer *layer, QWidget *parent, bool checkFea
73277327
}
73287328

73297329
//validate selection
7330-
int numberOfSelectedFeatures = vlayer->selectedFeatureIds().size();
7330+
const int numberOfSelectedFeatures = vlayer->selectedFeatureCount();
73317331
if ( numberOfSelectedFeatures == 0 )
73327332
{
73337333
messageBar()->pushMessage( tr( "No Features Selected" ),
@@ -7355,7 +7355,7 @@ void QgisApp::deleteSelected( QgsMapLayer *layer, QWidget *parent, bool checkFea
73557355
if ( !allFeaturesInView )
73567356
{
73577357
// for extra safety to make sure we are not removing geometries by accident
7358-
int res = QMessageBox::warning( mMapCanvas, tr( "Delete %1 features on layer \"%2\"" ).arg( QString::number( vlayer->selectedFeatureCount() ), vlayer->name() ),
7358+
int res = QMessageBox::warning( mMapCanvas, tr( "Delete %n feature(s) on layer \"%1\"", nullptr, numberOfSelectedFeatures ).arg( vlayer->name() ),
73597359
tr( "Some of the selected features are outside of the current map view. Would you still like to continue?" ),
73607360
QMessageBox::Yes | QMessageBox::No );
73617361
if ( res != QMessageBox::Yes )
@@ -7368,7 +7368,7 @@ void QgisApp::deleteSelected( QgsMapLayer *layer, QWidget *parent, bool checkFea
73687368
if ( !vlayer->deleteSelectedFeatures( &deletedCount ) )
73697369
{
73707370
messageBar()->pushMessage( tr( "Problem deleting features" ),
7371-
tr( "A problem occurred during deletion of %1 feature(s)" ).arg( numberOfSelectedFeatures - deletedCount ),
7371+
tr( "A problem occurred during deletion on layer \"%1\". %n feature(s) not deleted.", nullptr, numberOfSelectedFeatures - deletedCount ).arg( vlayer->name() ),
73727372
Qgis::Warning );
73737373
}
73747374
else

0 commit comments

Comments
 (0)