appstore2.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:x-mario-center 作者: fossasia 项目源码 文件源码
def _category_translate(self, catname):
        """ helper that will look into the categories we got from the
            parser and returns the translated name if it find it,
            otherwise it resorts to plain gettext
        """
        # look into parsed categories that use .directory translation
        for cat in self.all_categories:
            if cat.untranslated_name == catname:
                return cat.name
        # try normal translation first
        translated_catname = _(catname)
        if translated_catname == catname:
            # if no normal translation is found, try to find a escaped
            # translation (LP: #872760)
            translated_catname = _(GObject.markup_escape_text(catname))
            # the parent expect the string unescaped
            translated_catname = unescape(translated_catname)
        return translated_catname
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号