Fix pluralization of confirmation prompts

This commit is contained in:
Edward Jones 2018-03-13 20:03:59 +00:00
parent e66adfbf68
commit 963a7802d1
2 changed files with 25 additions and 28 deletions

View file

@ -305,9 +305,10 @@ void EditWidgetIcons::removeCustomIcon()
int iconUseCount = entriesWithSameIcon.size() + groupsWithSameIcon.size();
if (iconUseCount > 0) {
QMessageBox::StandardButton ans = MessageBox::question(this, tr("Confirm Delete"),
tr("This icon is used by %1 entries, and will be replaced "
"by the default icon. Are you sure you want to delete it?")
.arg(iconUseCount), QMessageBox::Yes | QMessageBox::No);
tr("This icon is used by %n entry(s), and will be replaced "
"by the default icon. Are you sure you want to delete it?",
"", iconUseCount),
QMessageBox::Yes | QMessageBox::No);
if (ans == QMessageBox::No) {
// Early out, nothing is changed