diff options
author | Ivan Alejandro <ivanalejandro0@gmail.com> | 2013-11-08 11:24:13 -0300 |
---|---|---|
committer | Ivan Alejandro <ivanalejandro0@gmail.com> | 2013-11-08 16:10:55 -0300 |
commit | f3217d074ff20e6973ec382ad78100c77c6af081 (patch) | |
tree | 9b7057a11be99ae3d92cc0e89d26a2f20936e937 /src/leap/bitmask/gui/mail_status.py | |
parent | 540734c3aaffcdcd9140f0f6f723a7fac4ab18f0 (diff) |
Use display service name instead of hardcode it.
Diffstat (limited to 'src/leap/bitmask/gui/mail_status.py')
-rw-r--r-- | src/leap/bitmask/gui/mail_status.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/leap/bitmask/gui/mail_status.py b/src/leap/bitmask/gui/mail_status.py index d637fd52..2ca0fb0a 100644 --- a/src/leap/bitmask/gui/mail_status.py +++ b/src/leap/bitmask/gui/mail_status.py @@ -22,6 +22,7 @@ import logging from PySide import QtCore, QtGui from leap.bitmask.platform_init import IS_LINUX +from leap.bitmask.services import get_service_display_name, MX_SERVICE from leap.common.check import leap_assert, leap_assert_type from leap.common.events import register from leap.common.events import events_pb2 as proto @@ -58,6 +59,7 @@ class MailStatusWidget(QtGui.QWidget): # set systray tooltip status self._mx_status = "" + self._service_name = get_service_display_name(MX_SERVICE) # Set the Mail status icons self.CONNECTING_ICON = None @@ -213,7 +215,8 @@ class MailStatusWidget(QtGui.QWidget): icon = self.ERROR_ICON if ready == 0: self.ui.lblMailStatus.setText( - self.tr("You must be logged in to use encrypted email.")) + self.tr("You must be logged in to use {0}.").format( + self._service_name)) elif ready == 1: icon = self.CONNECTING_ICON self._mx_status = self.tr('Starting..') @@ -436,5 +439,6 @@ class MailStatusWidget(QtGui.QWidget): Displays the correct UI for the disabled state. """ self._disabled = True - self._set_mail_status( - self.tr("You must be logged in to use encrypted email."), -1) + status = self.tr("You must be logged in to use {0}.").format( + self._service_name) + self._set_mail_status(status, -1) |