def __getEmptyListMsg(self, hasMessages):
     """
     Gets formatted empty list message
     """
     if not hasMessages:
         return _ms(MESSENGER.LISTVIEW_EMPTYLIST_TEMPLATE, listType=_ms(MESSENGER.listview_emptylist(self.__currentGroup)))
     return ''
 def __getEmptyListMsg(self, hasMessages):
     """
     Gets formatted empty list message
     """
     if not hasMessages:
         return _ms(MESSENGER.LISTVIEW_EMPTYLIST_TEMPLATE, listType=_ms(MESSENGER.listview_emptylist(self.__currentGroup)))
     return ''
Ejemplo n.º 3
0
def getChatActionName(actionID):
    actionName = _ACTIONS.getActionName(actionID)
    i18nKey = I18N_MESSENGER.chat_action(actionName)
    if i18nKey is not None:
        i18nName = i18n.makeString(i18nKey)
    else:
        i18nName = actionName
    return i18nName
Ejemplo n.º 4
0
def getChatActionName(actionID):
    actionName = _ACTIONS.getActionName(actionID)
    i18nKey = I18N_MESSENGER.chat_action(actionName)
    if i18nKey is not None:
        i18nName = i18n.makeString(i18nKey)
    else:
        i18nName = actionName
    return i18nName
Ejemplo n.º 5
0
def getChatErrorMessage(errorID, kwargs):
    errorName = _ERRORS.getErrorName(errorID)
    i18nKey = I18N_MESSENGER.chat_error(errorName)
    if i18nKey is not None:
        msg = i18n.makeString(i18nKey, **kwargs)
    else:
        msg = '{0}\\{1}'.format(errorName, kwargs)
    return msg
Ejemplo n.º 6
0
def getChatErrorMessage(errorID, kwargs):
    errorName = _ERRORS.getErrorName(errorID)
    i18nKey = I18N_MESSENGER.chat_error(errorName)
    if i18nKey is not None:
        msg = i18n.makeString(i18nKey, **kwargs)
    else:
        msg = '{0}\\{1}'.format(errorName, kwargs)
    return msg
Ejemplo n.º 7
0
 def getCommandText(self):
     cmd = _ACTIONS.adminChatCommandFromActionID(self._actionID)
     if not cmd:
         LOG_WARNING('Command is not found', self._actionID)
         return str(self._actionID)
     key = I18N_MESSENGER.command_success(cmd.name)
     if key:
         msg = i18n.makeString(key, **self._protoData)
     else:
         msg = cmd.name
     return unicode(msg, 'utf-8', errors='ignore')
Ejemplo n.º 8
0
 def getCommandText(self):
     cmd = _ACTIONS.adminChatCommandFromActionID(self._actionID)
     if not cmd:
         LOG_WARNING('Command is not found', self._actionID)
         return str(self._actionID)
     key = I18N_MESSENGER.command_success(cmd.name)
     if key:
         msg = i18n.makeString(key, **self._protoData)
     else:
         msg = cmd.name
     return msg
Ejemplo n.º 9
0
 def getI18nKey(self):
     return I18N_MESSENGER.chat_error(self.getName())
Ejemplo n.º 10
0
 def getI18nKey(self):
     return I18N_MESSENGER.client_error_channel(self.getName())
Ejemplo n.º 11
0
 def getI18nKey(self):
     return I18N_MESSENGER.server_error_user_room_creation(self.getName())
Ejemplo n.º 12
0
 def __getEmptyListMsg(self, hasMessages):
     return _ms(MESSENGER.LISTVIEW_EMPTYLIST_TEMPLATE,
                listType=_ms(
                    MESSENGER.listview_emptylist(
                        self.__currentGroup))) if not hasMessages else ''
Ejemplo n.º 13
0
 def getI18nName(self):
     name = self.getName()
     key = I18N_MESSENGER.client_action(name)
     if key:
         name = i18n.makeString(key)
     return name
Ejemplo n.º 14
0
 def getI18nKey(self):
     return I18N_MESSENGER.client_error_shared(self.getName())
Ejemplo n.º 15
0
 def getI18nKey(self):
     return I18N_MESSENGER.server_error_user_room_creation(self.getName())
Ejemplo n.º 16
0
 def getI18nKey(self):
     return I18N_MESSENGER.client_error_limit(self.getName())
Ejemplo n.º 17
0
 def getI18nName(self):
     name = self.getName()
     key = I18N_MESSENGER.client_action(name)
     if key:
         name = i18n.makeString(key)
     return name
Ejemplo n.º 18
0
 def getI18nKey(self):
     return I18N_MESSENGER.client_error_contact(self.getName())
Ejemplo n.º 19
0
 def getI18nKey(self):
     return I18N_MESSENGER.chat_error(self.getName())
Ejemplo n.º 20
0
 def getI18nKey(self):
     return I18N_MESSENGER.client_error_channel(self.getName())