Closed gforcada closed 9 years ago
Is this also true for the latest zope.tal? In the i18ndude buildout we use 4.1.1. But I think it indeed happens there as well.
So: i18ndude is completely happy, but when Zope/Plone tries to show the template you get the above error, right?
The code in i18ndude handling i18n:ignore
or i18n:ignore-attributes
was added by @janjaapdriessen. Maybe he has an idea? Jan-Jaap, are you actually using zope.tal or something else? Did you run into this problem too?
I was looking at it today and both zope.tal and Chameleon have a whitelist of attributes that are ok for i18n domain, any other attribute raises that error (or a similar one with Chameleon).
I already made PR for both:
https://github.com/zopefoundation/zope.tal/pull/4 https://github.com/malthe/chameleon/pull/205
@mauritsvanrees in the original commit collective/i18ndude@1b73cb152efd8d3c9944ef37cf9a4dfab2dd26b2 I wrote that when using Chameleon, it's necessary to update the i18n.WHITELIST:
# Make it a non-frozen set.
chameleon.i18n.WHITELIST = set(chameleon.i18n.WHITELIST)
chameleon.i18n.WHITELIST.update(('ignore', 'ignore-attributes'))
This comment didn't make it into the changes of the i18ndude release and I was too lazy to do a pull request on chameleon. Thank you @gforcada for fixing this properly!
It gives me the following traceback:
Seems that the problem comes from
zope.tal
(version 3.5.2) where only a few specific attributes are allowed and asignore
is not one of them it raises an error.I will submit a pull request to zope.tal to allow it, we should probably warn in our docs about this?