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

Nathan R. Yergler nathan@yergler.net
Tue, 25 Mar 2003 11:21:49 -0500


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

Modified Files:
	dummyengine.py 
Log Message:
Updated DummyDomain to simulate an unknown message id when translating.


=== Zope3/src/zope/tal/dummyengine.py 1.3 => 1.4 ===
--- Zope3/src/zope/tal/dummyengine.py:1.3	Mon Dec 30 21:52:22 2002
+++ Zope3/src/zope/tal/dummyengine.py	Tue Mar 25 11:21:48 2003
@@ -223,6 +223,11 @@
         # First, transform a string with ${name} placeholders into a list of
         # substrings.  Then upcase everything but the placeholders, then glue
         # things back together.
+
+        # simulate an unknown msgid by returning None
+        if msgid=="don't translate me":
+            return None
+        
         def repl(m):
             return mapping[m.group(m.lastindex).lower()]
         cre = re.compile(r'\$(?:([_A-Z]\w*)|\{([_A-Z]\w*)\})')