clean up

parent e1d05930
......@@ -11,18 +11,17 @@
#
##############################################################################
from GlobalTranslationService import getGlobalTranslationService
from zope.tales.tales import ExpressionEngine
from zope.tales.expressions import PathExpr, StringExpr, NotExpr, DeferExpr, SubPathExpr
from zope.tales.expressions import SimpleModuleImporter, _marker
from zope.tales.expressions import PathExpr, StringExpr, NotExpr
from zope.tales.expressions import DeferExpr, SubPathExpr
from zope.tales.expressions import SimpleModuleImporter
from zope.tales.pythonexpr import PythonExpr
from zope.tales.tales import _valid_name, _parse_expr, NAME_RE, Undefined, Context
from zope.i18n import translate
GTS = getGlobalTranslationService()
from Products.PageTemplates.GlobalTranslationService import getGlobalTranslationService
_marker = object()
def BoboTraverseAwareSimpleTraverse(object, path_items, econtext):
""" a slightly modified version of zope.tales.expressions.simpleTraverse()
......@@ -68,9 +67,9 @@ class PathExpr(PathExpr):
class Context(Context):
def translate(self, msgid, domain=None, mapping=None, default=None):
return GTS.translate(msgid, domain, mapping,
return getGlobalTranslationService().translate(
msgid, domain, mapping,
context=self.contexts['context'], default=default)
def translate(self, domain, msgid, mapping=None,
......@@ -108,4 +107,3 @@ def Engine():
return e
Engine = Engine()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment