On Fri, 30 Aug 2002 01:30, Nicola Ken Barozzi wrote:
> Hmmm... I'd just keep the description in one language with descriptions
> via a key in a bundle...

How do you define key? Would it be with attributes?

How about when you start breaking up description into multiple parts. For 
example heres the things that I can think of off the top of my head that may 
be needed long term;

* display name (how displayed on screen)
* Short description (basically a one liner ala the javadocs first line)
* Description (2-3 paragraphs)
* Long Description (potentially this would be needed if there were lots of 
detail)

Though "Long Description" may not be needed and Short Description could be 
derived from Description via same way javadocs derives one liners (ie take 
first sentence).

> >>We could just use a standard name for the bundle, keep english stuff in
> >>the descriptor and a key for external translations.
> >
> > WHich is precisely the reasoning that lead me to use attributes ;)
>
> What about this then.
> I changed the example componentinfo dtd to make it more consistent,
> extensible and near to literate programming, which has struck a cord in
> me lately.

Maybe - thats kinda like we originally had ir. We went from avalons to flat, 
then back to whate we have now which is essentially

-info
  -group
    -entry
       -attribute


Though entry may be complex (for usability purposes).

I still think that 

<attribute name="doc:display-name" value="Mr Fancy Pants Component"/>
<attribute name="doc:description" value="Fantastic and great component!!!"/>

is simpler. Or if we want i18n then we go with

<attribute name="doc:display-name-key" value="display.name"/>
<attribute name="doc:description-key" value="description"/>
<attribute name="doc:i18n-bundle" value="MyBundle"/>

I guess having content in an attribute is kinda ugly. So maybe we just state 
that if a component has a long description it has to be in resource file. 
This has two advantages
* descriptions wont be loaded unless the user explicitly asks
* attributes no longer need content

-- 
Cheers,

Peter Donald
--------------------------------------------------
 Logic: The art of being wrong with confidence...
--------------------------------------------------


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to