summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomás Touceda <chiiph@leap.se>2014-01-14 11:47:15 -0300
committerTomás Touceda <chiiph@leap.se>2014-01-14 11:47:15 -0300
commit3a3c8063b059121f85419bd9cde06194210bb0fe (patch)
tree5c049fdc5e8bdd0011d911cfe1c1de13e0af0bf7
parent60ff19439ffc850dd83974b1d7574056e0b8d298 (diff)
parentcd1ddb919b535800cee96d38a908f31f93f85e29 (diff)
Merge remote-tracking branch 'refs/remotes/ivan/bug/4952_fix-unread-email-wording' into develop
-rw-r--r--changes/bug-4952_fix-unread-email-wording1
-rw-r--r--src/leap/bitmask/gui/mail_status.py10
2 files changed, 8 insertions, 3 deletions
diff --git a/changes/bug-4952_fix-unread-email-wording b/changes/bug-4952_fix-unread-email-wording
new file mode 100644
index 00000000..7bfee8b2
--- /dev/null
+++ b/changes/bug-4952_fix-unread-email-wording
@@ -0,0 +1 @@
+- Client should say 1 unread email, not emails. Closes #4952.
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: