[Zope3-checkins] CVS: Zope3/src/zope/tal - talgenerator.py:1.8

Godefroid Chapelle gotcha@swing.be
Tue, 22 Jul 2003 08:38:03 -0400


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

Modified Files:
	talgenerator.py 
Log Message:
deny attributes being both part of tal:attributes
and having a messageid in i18n:attributes



=== Zope3/src/zope/tal/talgenerator.py 1.7 => 1.8 ===
--- Zope3/src/zope/tal/talgenerator.py:1.7	Mon Jun 30 14:38:18 2003
+++ Zope3/src/zope/tal/talgenerator.py	Tue Jul 22 08:37:28 2003
@@ -655,6 +655,10 @@
             # Convert repldict's name-->expr mapping to a
             # name-->(compiled_expr, translate) mapping
             for key, value in repldict.items():
+                if i18nattrs.get(key, None):
+                    raise I18NError(
+                "attribute [%s] cannot both be part of tal:attributes and have a msgid in i18n:attributes" % key,
+                    position)
                 ce = self.compileExpression(value)
                 repldict[key] = ce, key in i18nattrs, i18nattrs.get(key)
             for key in i18nattrs: