[Zope-Checkins] CVS: Zope3/lib/python/Zope/App/PageTemplate - Engine.py:1.3
Stephan Richter
srichter@cbu.edu
Wed, 12 Jun 2002 20:04:27 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/App/PageTemplate
In directory cvs.zope.org:/tmp/cvs-serv26470/lib/python/Zope/App/PageTemplate
Modified Files:
Engine.py
Log Message:
YEAH! The first translations work. If you switch your user language to 'de'
you can see two German phrases in the management screen of a Translation
Service.
I also made somce changes in the TALInterpretor, but I dunno whether my
changes were correct...lack of sleep... Fred and Barry, could you double
check?
=== Zope3/lib/python/Zope/App/PageTemplate/Engine.py 1.2 => 1.3 ===
from Zope.Security.RestrictedBuiltins import RestrictedBuiltins
from Zope.Proxy.ProxyIntrospection import removeAllProxies
+from Zope.I18n.GlobalTranslationService import translationService
import sys
def zopeTraverser(object, path_items, econtext):
@@ -57,6 +58,11 @@
macro = Context.evaluateMacro(self, expr)
macro = removeAllProxies(macro)
return macro
+
+ def translate(self, domain, msgid, mapping):
+ return translationService.translate(domain, msgid, mapping,
+ self.request)
+
class ZopeEngine(ExpressionEngine):