[ZPT] AssertionError with i18n:domain

Olivier Laurent oli at aragne.com
Tue Feb 3 07:32:29 EST 2004


I'm developping a product with Localizer and
PlacelessTranslationService. When I define the i18n:domain at the top
level of the application (the <html> tag), I get an AssertionError. I also
have this error at some lower level, for exemple, when defining the
'body' slot:
             <div i18n:domain="my_domain"
                  define-slot="body"> The Body </div>

If I try to use the i18n:domain statement with another slot, it works
right. So I suppose the problem is near the 'body' slot.

Here is an example page:

<div metal:use-macro="container/template_standard/macros/page">
<div metal:fill-slot="body" tal:omit-tag="">

<p i18n:translate=""> introduction </p>

</div>
</div>
    

The Traceback is not very helpfull but I have attached it. It points to
line 490 in TAL.TALInterpreter.do_endI18nContext:

    def do_endI18nContext(self, notused=None):
        self.i18nContext = self.i18nContext.parent
        assert self.i18nContext is not None
    bytecode_handlers["endI18nContext"] = do_endI18nContext

I'm using Zope 2.6.1 and PlacelessTranslationService 1.0fork-beta4

-- 
Olivier Laurent.
P3B    : Club Python(-Zope) Belge ---------- http://www.p3b.org
OS3B   : Club Open-Software(-Linux) Carolo   http://www.os3b.org
Aragne : Python-Zope Solutions & Formations  http://www.aragne.com
-------------- next part --------------
Traceback (innermost last):
  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.PageTemplates.ZopePageTemplate, line 228, in _exec
  Module Products.PageTemplates.PageTemplate, line 95, in pt_render
   - <ZopePageTemplate at /eshop/demo3/search/index_html>
  Module TAL.TALInterpreter, line 200, in __call__
  Module TAL.TALInterpreter, line 244, in interpret
  Module TAL.TALInterpreter, line 703, in do_useMacro
  Module TAL.TALInterpreter, line 244, in interpret
  Module TAL.TALInterpreter, line 412, in do_optTag_tal
  Module TAL.TALInterpreter, line 394, in no_tag
  Module TAL.TALInterpreter, line 244, in interpret
  Module TAL.TALInterpreter, line 490, in do_endI18nContext
AssertionError


More information about the ZPT mailing list