[ZPT] i18n:data - how to ?

Gitte Wange gitte@mmmanager.org
Thu, 27 Mar 2003 16:44:42 +0100


On Thursday 27 March 2003 04:40 pm, Gitte Wange wrote:
> Hello,
>
> I am a very happy user of the i18n-translation stuff in ZPT.
> But I miss one thing - the functionality of the i18n:data attribute.
>
> I have tried to put a date argument into i18n:data in order to translate
> the way dates are dislayed but with no luck.
> Is there some magic I have missed ?

Here's an example of how the error is:
I use this piece of code:
<td i18n:translate="dateOnly" i18n:data="python:event.start()"></td>

And I get this error:
Exception Type  	TypeError
Exception Value 	argument must be dictionary, not instance

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.CMFCore.FSPageTemplate, line 167, in _exec
    * Module Products.PageTemplates.ZopePageTemplate, line 228, in _exec
    * Module Products.CMFCore.FSPageTemplate, line 139, in pt_render
    * Module Products.PageTemplates.PageTemplate, line 95, in pt_render
      <FSPageTemplate at /lm1/agenda_marklist used for 
/lm1/Members/gitte/1048770395924350714>
    * 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 726, in do_defineSlot
    * 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 636, in do_loop_tal
    * Module TAL.TALInterpreter, line 244, in interpret
    * Module TAL.TALInterpreter, line 567, in do_insertTranslation
    * Module TAL.TALInterpreter, line 644, in translate

TypeError: argument must be dictionary, not instance

Any hints ?
-- 
Gitte Wange
Technical Manager

Email: gitte@mmmanager.org
Web: http://www.mmmanager.org
Tlf: +45 36 46 20 02

> We'll tell you when we try out the code you've written ;-)
Ahha, the classic open-source sanity pill/ thorn in my side....
What You Want Is What You Should Code Yourself ( WYWIWYSCY )

    -- Tom Smith: Zope Mailing List, About using ZODB as ODBC data source.