[Zope3-checkins] CVS: Zope3/src/zope/app/pagetemplate - engine.py:1.8

Stephan Richter srichter@cbu.edu
Tue, 25 Mar 2003 19:20:28 -0500


Update of /cvs-repository/Zope3/src/zope/app/pagetemplate
In directory cvs.zope.org:/tmp/cvs-serv32029/src/zope/app/pagetemplate

Modified Files:
	engine.py 
Log Message:
Whee, 'make test' was not working for me. It took all these changes to fix
it.


=== Zope3/src/zope/app/pagetemplate/engine.py 1.7 => 1.8 ===
--- Zope3/src/zope/app/pagetemplate/engine.py:1.7	Tue Mar 25 15:21:27 2003
+++ Zope3/src/zope/app/pagetemplate/engine.py	Tue Mar 25 19:19:57 2003
@@ -62,8 +62,11 @@
         return macro
 
     def translate(self, domain, msgid, mapping):
+        # When running Zope, request is a Proxy, but no mutation is done here,
+        # so it is safe to remove all proxies
+        request = removeAllProxies(self.request)
         # XXX should we cache the translator instance?
-        translator = Translator(self.request.locale, domain, self.context)
+        translator = Translator(request.locale, domain, self.context)
         return translator.translate(msgid, mapping)