Skip to content

Commit

Permalink
Use ngettext
Browse files Browse the repository at this point in the history
  • Loading branch information
slusarz committed Mar 12, 2015
1 parent 7d82b68 commit 5b96b1e
Showing 1 changed file with 11 additions and 5 deletions.
16 changes: 11 additions & 5 deletions imp/lib/Spam.php
Expand Up @@ -182,11 +182,17 @@ public function report(IMP_Indices $indices)
if ($msg_count === false) {
$result = 0;
} else {
if ($msg_count == 1) {
$notification->push(_("The message has been deleted."), 'horde.message');
} else {
$notification->push(sprintf(_("%d messages have been deleted."), $msg_count), 'horde.message');
}
$notification->push(
ngettext(
_("The message has been deleted."),
sprintf(
_("%d messages have been deleted."),
$msg_count
),
$msg_count
),
'horde.message'
);
}
break;

Expand Down

0 comments on commit 5b96b1e

Please sign in to comment.