def _GetArticleEN_US(self, typeID, *args, **kwargs):
        try:
            messageID = evetypes.GetNameID(typeID)
        except KeyError:
            return '[no type: %d]' % typeID

        try:
            return localization.GetMetaData(
                messageID, 'article', languageID=locconst.LOCALE_SHORT_ENGLISH)
        except KeyError:
            return ''
Exemple #2
0
        def getPronunciation(messageID):
            if not messageID:
                return ''
            ret = ''
            try:
                ret = localization.GetMetaData(messageID,
                                               'pronounciation',
                                               languageID=languageID)
            except KeyError:
                ret = localization.GetByMessageID(messageID, languageID)

            return ret
Exemple #3
0
    def _GetArticleEN_US(self, npcOrganizationID, *args, **kwargs):
        try:
            messageID = cfg.eveowners.Get(npcOrganizationID).ownerNameID
        except KeyError:
            log.LogException()
            return '[no npcOrganization: %d]' % npcOrganizationID

        try:
            return localization.GetMetaData(messageID, 'article', languageID=localization.LOCALE_SHORT_ENGLISH)
        except:
            localization.LogWarn("npcOrganizationID %s does not have the requested metadata 'article' in language '%s. Returning empty string by default." % (itemID, localization.LOCALE_SHORT_ENGLISH))
            return ''
Exemple #4
0
    def _GetGenderRU(self, typeID, *args, **kwargs):
        try:
            messageID = cfg.invtypes.Get(typeID).typeNameID
        except KeyError:
            log.LogException()
            return locconst.GENDER_MALE

        try:
            return localization.GetMetaData(
                messageID, 'gender', languageID=locconst.LOCALE_SHORT_RUSSIAN)
        except KeyError:
            LogWarn(
                "itemID %s does not have the requested metadata 'gender' in language '%s. Returning masculine gender by default."
                % (typeID, locconst.LOCALE_SHORT_RUSSIAN))
            return locconst.GENDER_MALE
Exemple #5
0
    def _GetArticleEN_US(self, typeID, *args, **kwargs):
        """
        Retrieve article for the item name. If the "article" is not filled in for this 
        itemID, then return empty string. However if the "article" property is not defined for
        this set of messages, then will be logging error and returning that no such
        property/metadata exists.
        returns:
            string       - if article was found
            ""           - if metadata article wasnt filled in or found
            error string - if property "article" is invalid
        """
        try:
            messageID = cfg.invtypes.Get(typeID).typeNameID
        except KeyError:
            return '[no type: %d]' % typeID

        try:
            return localization.GetMetaData(
                messageID, 'article', languageID=locconst.LOCALE_SHORT_ENGLISH)
        except KeyError:
            return ''