On Sun, Feb 11, 2007 at 11:00:51PM +1100, George Wright wrote:
> 
> OnFri, 9 Feb 2007 20:59:07 -0500 Vinny wrote:
> >You'll need to use the newer boilerplate (I am running zope 3.3.0  
> >FYI):
> >
> >from zope.i18n import MessageFactory
> >_ = MessageFactory("translationdomain")
> >
> >This can be found here:
> >
> >http://kpug.zwiki.org/WhatIsNewInZope33
> >
> >See section 7 Porting to Zope 3.3.0
> >
> >There is other useful information on how to deal with
> >the other areas of the book which are slightly out of
> >date as well.
> 
> Thanks Vinny
> I used
> from zope.i18n import MessageFactory
> _ = MessageFactory("worldcookery")
> 
> as suggested and made a bit of progress. Yet to work out necessary  
> changes to the time_report.mapping['time_to_cook'] = 45
> line - but working on it.

This is what you need to do:

    time_report = _(time_report, mapping={'time_to_cook': 45})

Or, if you have

    time_report = _("your message here")

just above, condense them all to

    time_report = _("Your message here",
                    mapping={'time_to_cook': 45,
                             'something_else': 'here'})

Marius Gedminas
-- 
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet?

Attachment: signature.asc
Description: Digital signature

_______________________________________________
Zope3-users mailing list
Zope3-users@zope.org
http://mail.zope.org/mailman/listinfo/zope3-users

Reply via email to