[Zope3-dev] Internationalisation
Marcus J. Ertl
marcus.ertl at larp-welt.de
Wed Jan 7 18:19:49 EST 2004
Hi!
Im just playing around with i18nextract.py, it works fine, but it
doesn't extract the string needed im mi ISized-adapter!
What's wrong with folling code (part's that don't other are removed):
from zope.i18n import MessageIDFactory
_ = MessageIDFactory('lwproducts')
class MessageSized:
implements(ISized)
def sizeForDisplay(self):
'See ISized'
[...]
if number == 1:
size = "1 reply"
else:
size = "${replies} replies"
size = _(size)
size.mapping = {'replies':`number`}
return size
Thank you very much!
Bye
Marcus
More information about the Zope3-dev
mailing list