[ZPT] Bug in i18n support/TALInterpreter

Andreas Jung Andreas Jung <lists@andreas-jung.com>
Tue, 14 Jan 2003 19:13:28 +0100


The following part of a macro


  <span class="ObjectStatus" i18n:translate="top_bar_obj_status"> Status: 
</span>
  <span tal:content="wf_state" tal:omit-tag="" 
i18n:name="state">Private</span>

raise the error (latest 2.6/CMF CVS checkouts):


 Site Error

 An error was encountered while publishing this resource.

 IndexError
 Sorry, a site error occurred.

 Traceback (innermost last):

     * Module ZPublisher.Publish, line 150, in publish_module
     * Module Products.Localizer, line 58, in new_publish
     * Module ZPublisher.Publish, line 114, in publish
     * Module Zope.App.startup, line 182, in zpublisher_exception_hook
     * Module ZPublisher.Publish, line 98, in publish
     * Module ZPublisher.mapply, line 88, in mapply
     * Module ZPublisher.Publish, line 39, in call_object
     * Module Shared.DC.Scripts.Bindings, line 252, in __call__
     * Module Shared.DC.Scripts.Bindings, line 283, in _bindAndExec
     * Module Products.CMFCore.FSPageTemplate, line 189, in _exec
     * Module Products.CMFCore.FSPageTemplate, line 122, in pt_render
     * Module Products.PageTemplates.PageTemplate, line 95, in pt_render
       <FSPageTemplate at /trackers/test used for /trackers/p22>
     * Module TAL.TALInterpreter, line 186, in __call__
     * Module TAL.TALInterpreter, line 230, in interpret
     * Module TAL.TALInterpreter, line 689, in do_useMacro
     * Module TAL.TALInterpreter, line 230, in interpret
     * Module TAL.TALInterpreter, line 689, in do_useMacro
     * Module TAL.TALInterpreter, line 230, in interpret
     * Module TAL.TALInterpreter, line 689, in do_useMacro
     * Module TAL.TALInterpreter, line 230, in interpret
     * Module TAL.TALInterpreter, line 655, in do_condition
     * Module TAL.TALInterpreter, line 230, in interpret
     * Module TAL.TALInterpreter, line 655, in do_condition
     * Module TAL.TALInterpreter, line 230, in interpret
     * Module TAL.TALInterpreter, line 519, in do_i18nVariable

 IndexError: list index out of range (Also, an error occurred while
 attempting to render the standard error message.)

I took a look at the TALInterpreter code but I have too few knowledge
about the TAL internals.

Andreas


    ---------------------------------------------------------------------
   -    Andreas Jung                     http://www.andreas-jung.com   -
  -   EMail: andreas at andreas-jung.com                              -
   -            "Life is too short to (re)write parsers"               -
    ---------------------------------------------------------------------