Пример #1
0
 def _getFullDescription(self, stepName, discount=None, forHeroCard=False):
     modifiedStepName = self.__modifyName(stepName)
     locKey = None
     if forHeroCard:
         locKey = QUESTS.getActionDescription('hero/full/{}'.format(modifiedStepName))
     if locKey is None:
         locKey = QUESTS.getActionDescription('full/{}'.format(modifiedStepName))
     return i18n.makeString(locKey, discount=discount)
Пример #2
0
 def _getButtonName(cls, stepName):
     """Button text
     :param stepName: step name
     :return: i18n button text
     """
     formatter = 'button/{}'.format(stepName)
     return i18n.makeString(QUESTS.getActionDescription(formatter))
Пример #3
0
 def _getFullDescription(self, stepName, discount=None, forHeroCard=False):
     if stepName == 'set_MarathonFinished':
         locKey = QUESTS.getActionDescription(
             'hero/full/{}'.format(stepName))
         return i18n.makeString(
             locKey, value=self._marathonCtrl.getExtraDaysToBuy())
     return super(MarathonEventActionInfo,
                  self)._getFullDescription(stepName, discount, forHeroCard)
Пример #4
0
 def _getAutoDescription(self, stepName):
     """Card description text
     Used only for coming soon cards
     :param stepName: step name
     :return: i18n description string
     """
     formatter = 'auto/{}'.format(self.__modifyName(stepName))
     return i18n.makeString(QUESTS.getActionDescription(formatter))
Пример #5
0
 def _getShortDescription(self, stepName, **kwargs):
     """Card description text
     Used for small cards
     :param stepName: step name
     :param kwargs: dict params for text
     :return: i18n description string
     """
     formatter = 'short/{}'.format(self.__modifyName(stepName))
     return i18n.makeString(QUESTS.getActionDescription(formatter), **kwargs)
Пример #6
0
    def getTableData(self):
        res = []
        for data in self.__sortBoosters():
            booster = data.discountName
            guiType = booster.boosterGuiType
            formatter = 'booster/{}'.format(guiType)
            busterName = i18n.makeString(QUESTS.getActionDescription(formatter))
            busterSmallIcon = RES_ICONS.getBusterSmallIcon(guiType)
            item = {'icon': busterSmallIcon,
             'additionalIcon': '',
             'title': busterName,
             'discount': formatStrDiscount(data),
             'price': self._formatPriceIcon(booster, False)}
            res.append(item)

        return res
Пример #7
0
 def _getButtonName(cls, stepName):
     formatter = 'button/{}'.format(stepName)
     return i18n.makeString(QUESTS.getActionDescription(formatter))
Пример #8
0
 def _getShortDescription(self, stepName, **kwargs):
     formatter = 'short/{}'.format(self.__modifyName(stepName))
     return i18n.makeString(QUESTS.getActionDescription(formatter), **kwargs)
Пример #9
0
 def _getAutoDescription(self, stepName):
     formatter = 'auto/{}'.format(self.__modifyName(stepName))
     return i18n.makeString(QUESTS.getActionDescription(formatter))