[Zope3-dev] Re: Unused local variable?

Hanno Schlichting plone at hannosch.info
Tue Jul 11 18:21:01 EDT 2006


Hi.

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.

Hanno

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...



More information about the Zope3-dev mailing list