As far as I understand there is really a bug. The code should deal with
the situation where msgid is a Message object. What it does right now is
to look up a translation for that Message object in the translation
domain of the current TranslationDomain (self). The line you mention is
part of the code that should make sure that the Message object is looked
up in its own domain instead, but as you noticed this never happens.

There is even a test for this in tests/test_translationdomain.py
testMessageIDTranslateForDifferentDomain but it seems, it doesn't find
the problem.


Chris Withers wrote:
> Hi All,
> Puzzling as to what this chunk of code:
>             if msgid.domain != self.domain:
>                 util = getUtility(ITranslationDomain, msgid.domain)
> ..from:
> http://svn.zope.org/Zope3/trunk/src/zope/i18n/translationdomain.py?rev=68771&view=auto
> ...is supposed to do? util isn't used anywhere as far as I can see...

Zope3-dev mailing list
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to