[Zope3-dev] There's something wrong with having message ids in schemas

Martijn Faassen faassen at infrae.com
Thu Dec 9 08:55:40 EST 2004


Jim Fulton wrote:
> Stephan Richter wrote:
[snip]
>> I agree with Martijn, selecting a domain is part of the I18n process. 
>> I have two suggestions here:
>  
> I18n is presentation, IMO.  Here we are introducing presentation
> code into code that is not otherwise about presentation.

Whether i18n is presentation or not is debatable. If you go by the 
guideline that all user-visible text that exists in source code belongs 
in a presentation layer, then that's true. I'd need to think about it a 
bit more to figure out whether I believe that guideline to be correct.

Wouldn't it be possible to remove the whole message id story from this
layer, and have the presentation layer create a message id from the 
underlying title and description? If you really want to have an explicit 
message id different from the literal text, you'd need to specify it 
somewhere else, but in Infrae's experience explicit message ids tend to 
be more pain than they're worth anyway.

[snip]
>> I totally agree. Another layer would be a big burden on the developer 
>> and anyone who wants to read the code, since they have to look in two 
>> places now.
> 
> Perhaps this layer could be optional.  Perhaps we'd use it in cases
> where we have a schema that, for whatever reason, doesn't use
> message ids (or titles or descriotions that we like).  In cases
> where it's convenient not to have to create a separate component, perhaps
> we'd do what we do now.

If you follow the approach that message ids are constructed from the 
title and description strings in some presentation layer, then you'd 
only need an explicit layer if you really want to specify different 
message ids than the ones taken from the literal text.

Regards,

Martijn


More information about the Zope3-dev mailing list