[ZCM] [ZC] 2135/ 1 Request "Need a better error message from ZPT/i18n problem"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Wed Jun 21 06:05:07 EDT 2006


Issue #2135 Update (Request) "Need a better error message from ZPT/i18n problem"
 Status Pending, Zope/feature medium
To followup, visit:
  http://www.zope.org/Collectors/Zope/2135

==============================================================
= Request - Entry #1 by chrisw on Jun 21, 2006 6:05 am

Got this weird error message:
   Module TAL.TALInterpreter, line 701, in translate
   Module Products.PageTemplates.TALES, line 261, in translate
   Module Products.Five.i18n, line 51, in translate
   Module Products.PageTemplates.GlobalTranslationService, line 33, in 
translate
TypeError: expected string or buffer

...and eventually tracked it down to this code:

<meta name="description" content="blah"
       i18n:attributes="description"/>

The bug, of course, is that the i18:attributes should be content, not 
description, which doesn't exist.

This results in a None msgid, which PTS used to do something (I don't 
know whether it was sane or not, no errors) with but which Five/Zope 2.9.3/Zope 3.whatever's i18n stuff raises the 
rather obscure error above.

I don't know if anything should be done here. Obviously it'd be nice if 
the error message was a bit nicer ("i18:attributes specified attribute 
'description', which did not exist on tag 'meta' in 
/standard_template.pt") but it's a pretty obscure error.
==============================================================



More information about the Zope-Collector-Monitor mailing list