Comment 4 for bug 219011

Revision history for this message
Philipp von Weitershausen (philikon) wrote : Re: [Bug 219011] Re: zope.session 3.4.1 and zope.i18nmessageid 3.4.0a1 incompatibility

On 21 Apr 2008, at 09:23 , Christian Zagrodnick wrote:
> On 18.04.2008, at 12:36, Philipp von Weitershausen wrote:
>> I shall add that I believe importing ZopeMessageFactory from
>> anywhere is
>> stupid, for two reasons:
>>
>> 1. It's dead-easy to recreate:
>>
>> from zope.i18nmessageid import MessageFactory
>> _ = MessageFactory('zope')
>>
>> Importing this is like importing an integer or a string.
>
> I think exactly the other way round. It is a constant so bind it to
> something you can track and import it. This is a very common pattern I
> think. For instance docutils declars constants like REPORT_NDIFF. I
> suppose you're not writing down those integers but import?

No, but there the integer has a meaning that's hidden from me.
Recreating the message factory in individual packages was also common
practice in split-ups before (it's even documented in proposals).
Either way, in the light of splitting up projects, the dependency
shouldn't have been introduced in the first place (nor should the
ZopeMessageFactory thing have moved to zope.i18n). And it wasn't
covered by a proposal...

But let's bury the past. I just hope we can learn from this, we need
to be pragmatic in some places if we want to reduce the
interdependencies of packages. It's a mess, and stuff like this
doesn't make it better.

>> 2. With the independent projects now, we should really split up the
>> translation domains as well.
>
> Ack. I think over the time this will happen naturally when new
> translations are required.

I disagree. If so, whoever did the package refactoring that led to
this very bug would've realized the same thing and done it. But they
didn't. This would actually be a nice sprint task, I think.