def __makeBlocksData(self):
        result = []
        for blockName in ('block1', 'block2', 'block3'):
            result.append({'blockTitle': text_styles.promoSubTitle(i18n.makeString(QUESTS.questspersonalwelcomeview_textblock_header(blockName))),
             'blockBody': text_styles.main(i18n.makeString(QUESTS.questspersonalwelcomeview_textblock_body(blockName)))})

        return result
Пример #2
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)
Пример #3
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))
Пример #4
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)
Пример #5
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))
    def getUserString(self):
        result = []
        for bType in self._bonusTypes:
            result.append(
                i18n.makeString(QUESTS.getDetailsDossier(
                    bType, self._getKey())))

        return ', '.join(result)
Пример #7
0
    def __makeBlocksData(self):
        result = []
        for blockName in ('block1', 'block2', 'block3'):
            result.append({
                'blockTitle':
                text_styles.promoSubTitle(
                    i18n.makeString(
                        QUESTS.questspersonalwelcomeview_textblock_header(
                            blockName))),
                'blockBody':
                text_styles.main(
                    i18n.makeString(
                        QUESTS.questspersonalwelcomeview_textblock_body(
                            blockName)))
            })

        return result
Пример #8
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)
Пример #9
0
    def getUserString(self):
        result = []
        for bType in self._bonusTypes:
            result.append(i18n.makeString(QUESTS.getDetailsDossier(bType, self._getKey())))

        if not result:
            _logger.warning('There are no matching condition strings for selected arenaBonusTypes')
            return ''
        return ', '.join(result)
def getChainVehTypeAndLevelRestrictions(operation, chainID):
    _eventsCache = dependency.instance(IEventsCache)
    pmCache = _eventsCache.getPersonalMissions()
    minLevel, maxLevel = pmCache.getVehicleLevelRestrictions(operation.getID())
    vehType = _ms(QUESTS.getAddBottomVehType(operation.getChainClassifier(chainID).classificationAttr))
    if operation.getBranch() == PM_BRANCH.PERSONAL_MISSION_2:
        nations = getNationsForChain(operation, chainID)
        nationsText = []
        for nation in GUI_NATIONS:
            if nation in nations:
                nationsText.append(getNationText(nation))

        vehType = _ms(vehType, nations=', '.join(nationsText))
    return (vehType, int2roman(minLevel), int2roman(maxLevel))
Пример #11
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
 def _getUserName(cls, nameID):
     return i18n.makeString(QUESTS.getBonusName(nameID))
Пример #13
0
 def _getShortDescription(self, stepName, **kwargs):
     formatter = 'short/{}'.format(self.__modifyName(stepName))
     return i18n.makeString(QUESTS.getActionDescription(formatter), **kwargs)
Пример #14
0
 def _getButtonName(cls, stepName):
     formatter = 'button/{}'.format(stepName)
     return i18n.makeString(QUESTS.getActionDescription(formatter))
Пример #15
0
 def getUserString(self, battleTypeName='random'):
     return i18n.makeString(
         QUESTS.getDetailsDossier(battleTypeName, self._getKey()))
Пример #16
0
 def _getAutoDescription(self, stepName):
     formatter = 'auto/{}'.format(self.__modifyName(stepName))
     return i18n.makeString(QUESTS.getActionDescription(formatter))
 def _getUserName(cls, bonus):
     return i18n.makeString(QUESTS.getBonusName(bonus.getName()))
    def __makeBlocksData(self):
        result = []
        for blockName in ('block1', 'block2', 'block3'):
            result.append({'blockTitle': self.app.utilsManager.textManager.getText(TEXT_MANAGER_STYLES.PROMO_SUB_TITLE, i18n.makeString(QUESTS.questspersonalwelcomeview_textblock_header(blockName))),
             'blockBody': self.app.utilsManager.textManager.getText(TEXT_MANAGER_STYLES.MAIN_TEXT, i18n.makeString(QUESTS.questspersonalwelcomeview_textblock_body(blockName)))})

        return result
 def _getUserName(cls, item):
     c11nItem = cls.__getC11nItem(item)
     return i18n.makeString(QUESTS.getBonusName(c11nItem.itemTypeName))