-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
+1
Egon
Dmitry Vasiliev schrieb am 18.12.2005 12:00:
>
> Currently variables inside the message id's text substituted to None if
> variable name hadn't found in the mapping, like this:
>
> >>> from zope.i18nmessageid import Message
> >>> from zope.i18n import translate
> >>> message = Message("some text ${variable}", mapping={"typo":
> "variable"})
> >>> translate(message)
> u'some text None'
>
> but:
>
> >>> message = Message("some text ${variable}")
> >>> translate(message)
> u'some text ${variable}'
>
> Would it to be better if no substitution will happens if variable name
> hasn't found in the mapping? So instead of u'some text None' we'll
> always get u'some text ${variable}'. I think it would be better for
> debugging purposes and also we'll get some optimizations in case of the
> empty mapping (seems like the ZPT engine always pass empty dictionary as
> default value for the mapping) for free.
>
- --
Egon Frerich, Freudenbergstr. 16, 28213 Bremen
E-Mail: [EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.2 (MingW32)
Comment: GnuPT 2.7.2
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org
iD8DBQFDpUZouTzybIiyjvURAm4mAKCFAR9uxe2BWiycc6t5/4cbR0+GXACgokwu
eWWJVKfgoeXHAaBqSVIBIqc=
=fqEQ
-END PGP SIGNATURE-
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com