[Zope-Checkins] CVS: Zope3/lib/python/Zope/TAL - TALInterpreter.py:1.75

Stephan Richter srichter@cbu.edu
Sat, 15 Jun 2002 05:12:15 -0400


Update of /cvs-repository/Zope3/lib/python/Zope/TAL
In directory cvs.zope.org:/tmp/cvs-serv12603

Modified Files:
	TALInterpreter.py 
Log Message:
I hooked up Sidei's stylesheets and icon. Cleaned up th eHTML and CSS a bit
too.

There was also a buglet in the TAL interpreter, where the message id was
sometimes None. This was due to a wrong usage of i18n:attributes, where
someone did:

<input name="Delete"
       i18n:attributes="name string:delete_button">

whereby the right form is:

<input name="Delete"
       tal:attributes="name string:delete_button"
       i18n:attributes="name">

After I removed the wrong syntax no None was sent to translate anymore, but
just to make sure I left the code inside.

I think that an exception should be raised, if i18n:attributes is used
incorrectly like this, but that is really Fred and Barry's department.



=== Zope3/lib/python/Zope/TAL/TALInterpreter.py 1.74 => 1.75 ===
         if not self.i18nInterpolate:
             return msgid
+        # XXX Mmmh, it seems that sometimes the msgid is None; is that really
+        # possible?
+        if msgid is None:
+            return None
         # XXX We need to pass in one of context or target_language
         return self.engine.translate(self.i18nContext.domain, msgid, i18ndict)