[Zope-Checkins] CVS: Zope/lib/python/TAL - TALGenerator.py:1.63.4.1
Godefroid Chapelle
gotcha@swing.be
Tue, 22 Jul 2003 10:52:53 -0400
Update of /cvs-repository/Zope/lib/python/TAL
In directory cvs.zope.org:/tmp/cvs-serv11616
Modified Files:
Tag: Zope-2_7-branch
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.63.4.1 ===
--- Zope/lib/python/TAL/TALGenerator.py:1.63 Mon Apr 7 13:38:27 2003
+++ Zope/lib/python/TAL/TALGenerator.py Tue Jul 22 10:52:18 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: