# HG changeset patch # User Thierry Florac # Date 1333150145 -7200 # Node ID aab380e3c8216c3807c8059e2c15062a1e30303f # Parent 864a0cee13c05b0a2d425568bed76ac099189045 Use ztfy.utils "text:translate" TAL adapter to display status diff -r 864a0cee13c0 -r aab380e3c821 ztfy/utils/tal/interfaces.py --- a/ztfy/utils/tal/interfaces.py Thu Mar 29 19:18:44 2012 +0200 +++ b/ztfy/utils/tal/interfaces.py Sat Mar 31 01:29:05 2012 +0200 @@ -46,6 +46,9 @@ def breaks(): """Replace '|' by newlines in adapted text""" + def translate(): + """Use I18n translation of given text""" + class IHTMLTalesAPI(Interface): """'html' TALES namespace interface""" diff -r 864a0cee13c0 -r aab380e3c821 ztfy/utils/tal/text.py --- a/ztfy/utils/tal/text.py Thu Mar 29 19:18:44 2012 +0200 +++ b/ztfy/utils/tal/text.py Sat Mar 31 01:29:05 2012 +0200 @@ -24,6 +24,7 @@ from ztfy.utils.tal.interfaces import ITextStartTalesAPI, ITextOutputTalesAPI # import Zope3 packages +from zope.i18n import translate from zope.interface import implements # import local packages @@ -70,3 +71,6 @@ def breaks(self): return self.context.replace('|', '\n') + + def translate(self): + return translate(self.context, context=self.request)