示例#1
0
        def post_title():
            message = _(u"posts_by_authors", default=u"Posts by $authors", mapping={"authors": context.getTitle()})
            if translate:
                ## Plone 4
                return translate(message)

            ## for Plone 3
            return context.translate(message)
示例#2
0
        def post_title():
            message = _(
                u"posts_by_keywords", default=u"Posts about $keywords", mapping={"keywords": context.getTitle()}
            )
            if translate:
                ## Plone 4
                return translate(message)

            ## for Plone 3
            return context.translate(message)