From cd1ddb919b535800cee96d38a908f31f93f85e29 Mon Sep 17 00:00:00 2001 From: Ivan Alejandro Date: Tue, 14 Jan 2014 11:07:45 -0300 Subject: Add an extra string for the singular 'email' word. Client should say 1 unread email, not emails. [Closes #4952] --- src/leap/bitmask/gui/mail_status.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) (limited to 'src/leap/bitmask/gui/mail_status.py') diff --git a/src/leap/bitmask/gui/mail_status.py b/src/leap/bitmask/gui/mail_status.py index 3c933c9a..6db17427 100644 --- a/src/leap/bitmask/gui/mail_status.py +++ b/src/leap/bitmask/gui/mail_status.py @@ -363,9 +363,13 @@ class MailStatusWidget(QtGui.QWidget): if req.event == proto.IMAP_UNREAD_MAIL: if self._started: - if req.content != "0": - self._set_mail_status(self.tr("%s Unread Emails") % - (req.content,), ready=2) + count = req.content + if count != "0": + status = self.tr("{0} Unread Emails").format(count) + if count == "1": + status = self.tr("1 Unread Email") + + self._set_mail_status(status, ready=2) else: self._set_mail_status("", ready=2) elif req.event == proto.IMAP_SERVICE_STARTED: -- cgit v1.2.3