[Zope3-checkins] CVS: Zope3/src/zope/tal - dummyengine.py:1.11.18.1

Stephan Richter srichter at cosmos.phy.tufts.edu
Fri Aug 8 11:41:35 EDT 2003


Update of /cvs-repository/Zope3/src/zope/tal
In directory cvs.zope.org:/tmp/cvs-serv1433/src/zope/tal

Modified Files:
      Tag: srichter-i18n-macro-interaction-branch
	dummyengine.py 
Log Message:
New bug identified.


=== Zope3/src/zope/tal/dummyengine.py 1.11 => 1.11.18.1 ===
--- Zope3/src/zope/tal/dummyengine.py:1.11	Tue Jun  3 11:20:06 2003
+++ Zope3/src/zope/tal/dummyengine.py	Fri Aug  8 10:41:00 2003
@@ -1,6 +1,6 @@
 ##############################################################################
 #
-# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# Copyright (c) 2001, 2002, 2003 Zope Corporation and Contributors.
 # All Rights Reserved.
 #
 # This software is subject to the provisions of the Zope Public License,
@@ -12,14 +12,16 @@
 #
 ##############################################################################
 """Dummy TAL expression engine so that I can test out the TAL implementation.
-"""
 
+$Id$
+"""
 import re
 
 from zope.interface import implements
 from zope.tal.taldefs import NAME_RE, TALExpressionError, ErrorInfo
 from zope.tal.interfaces import ITALExpressionCompiler, ITALExpressionEngine
 from zope.i18n.interfaces import ITranslationService
+from zope.i18n.messageid import MessageID
 
 Default = object()
 
@@ -227,6 +229,11 @@
         # If the domain is a string method, then transform the string
         # by calling that method.
 
+        # MessageID attributes override arguments
+        if isinstance(msgid, MessageID):
+            domain = msgid.domain
+            mapping = msgid.mapping
+            default = msgid.default
 
         # simulate an unknown msgid by returning None
         if msgid == "don't translate me":




More information about the Zope3-Checkins mailing list