[Zope-Checkins] CVS: Zope/lib/python/TAL - TALGenerator.py:1.64
Godefroid Chapelle
gotcha@swing.be
Tue, 22 Jul 2003 09:29:19 -0400
Update of /cvs-repository/Zope/lib/python/TAL
In directory cvs.zope.org:/tmp/cvs-serv30718
Modified Files:
TALGenerator.py
Log Message:
deny attributes being both part of tal:attributes
and having a messageid in i18n:attributes
=== Zope/lib/python/TAL/TALGenerator.py 1.63 => 1.64 ===
--- Zope/lib/python/TAL/TALGenerator.py:1.63 Mon Apr 7 13:38:27 2003
+++ Zope/lib/python/TAL/TALGenerator.py Tue Jul 22 09:28:43 2003
@@ -664,6 +664,11 @@
# 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: