On Thu, Feb 19, 2004 at 09:10:30AM -0500, Stephan Richter wrote: > On Thursday 19 February 2004 08:08, seb bacon wrote: > > Zope 2.7 introduced a change in its translation interface. Previously a > > translation service could return None, but now returning None causes an > > assertion error. > > > > http://cvs.zope.org/Zope/lib/python/TAL/TALInterpreter.py.diff?r1=1.77&r2=1 > >.78 > > That is strange. The Zope 3 translation service can also still return None and > we use the same TAL code. I cannot see which code change would not handle the > None.
The new implementation would appear to expect the service to return the default value passed in, instead of None. >From the diff linked to above: r1.77 has: xlated_msgid = self.translate(msgid, i18ndict, obj) # If there is no translation available, use evaluated content. if xlated_msgid is None: # do some stuff r1.78 has: xlated_msgid = self.translate(msgid, default, i18ndict, obj) assert xlated_msgid is not None, self.position seb _______________________________________________ Zope-Dev maillist - [EMAIL PROTECTED] http://mail.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope )