[Zope3-checkins] CVS: Zope3/src/zope/app/services - view.py:1.31

Philipp von Weitershausen philikon at philikon.de
Thu Aug 7 19:36:57 EDT 2003


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

Modified Files:
	view.py 
Log Message:
Sanitize returned i18n string.


=== Zope3/src/zope/app/services/view.py 1.30 => 1.31 ===
--- Zope3/src/zope/app/services/view.py:1.30	Fri Jul  4 09:28:16 2003
+++ Zope3/src/zope/app/services/view.py	Thu Aug  7 18:36:53 2003
@@ -250,10 +250,16 @@
             ifname = _("(Anything)")
         else:
             ifname = self.forInterface.__name__
-        L = [self.viewName, self.ptype.__name__, _("View"), _("for"), ifname]
+        summary = _("${view_name} ${ptype} View for {iface_name}")
         if self.layer and self.layer != "default":
-            L.extend([_("in layer"), self.layer])
-        return " ".join(L)
+            summary = _(
+                "${view_name} ${ptype} View for {iface_name} in layer ${layer}"
+                )
+        summary.mapping = {'view_name':  self.viewName,
+                           'ptype':      self.ptype.__name__,
+                           'iface_name': ifname,
+                           'layer':      self.layer}
+        return summary
 
     def implementationSummary(self):
         # XXX This should report the ZCML that it came from.
@@ -289,11 +295,19 @@
             ifname = _("(Anything)")
         else:
             ifname = self.forInterface.__name__
+
         pname = self.presentationType.__name__
-        L = [self.viewName, _("for"), pname, self._what, ifname]
+        summary = _("${view_name} for ${pname} {what} {iface_name}")
         if self.layer and self.layer != "default":
-            L.extend([_("in layer"), self.layer])
-        return " ".join(L)
+            summary = _(
+                "${view_name} for ${pname} {what} {iface_name} in layer ${layer}"
+                )
+        summary.mapping = {'view_name':  self.viewName,
+                           'pname':      pname,
+                           'what':       self._what,
+                           'iface_name': ifname,
+                           'layer':      self.layer}
+        return summary
 
 class PageRegistration(ViewRegistration):
 




More information about the Zope3-Checkins mailing list