[Zope3-dev] Re: Another change was Re: Re: small proposed widget change

Garrett Smith garrett at mojave-corp.com
Fri Sep 26 12:57:00 EDT 2003


Gary Poster wrote:

> 
> 
> Gary Poster wrote:
> 
>> Garrett Smith wrote:
> 
> 
>>> Here are some items that I think should be handled by the skin, not 
>>> hard coded by the widgets:
>>>
>>> - field label
>>
>>
>>
>> Well, the label is just the translated title.  The title is already 
>> available from the widget (line 158 in the same file above).  Maybe 
>> the widget title should be a method (or, for backwards compatibility, 
>> a property) that returns the translated title: this would be 
>> sufficient for this use case, and code would still be able to get 
>> widget.context.title if the untranslated version needed.
> 
> 
> Anyone object to making widget title a property that returns the 
> translated title, if a context is available, and the untranslated field 
> title otherwise?
> 
> Gary

+1

On a somewhat related topic, I noticed that Widget already implements a 
'description' attribute. What are your thoughts on:

- adding a 'description' Attribute to IWidget for completeness

- implementing description as a property w/translation ala title


  -- Garrett





More information about the Zope3-dev mailing list