[Zope3-dev] Re: idea: attr:foo addition to tal

Godefroid Chapelle gotcha at bubblenet.be
Fri Jul 23 04:00:22 EDT 2004


Philipp von Weitershausen wrote:

> It could even combine in the following way:
> 
> <input type="submit"
>        attr:value="here/label"
>        i18nattr:value="button-label" />
> 
> where button-label is the message id.
 >
 > +1 from me for SteveA's idea!
 >
 > Philipp
 >

I think the exemple hereabove does not make sense.

If attr:value is used, it is to be dynamically generated; this implies 
that it should not be translated by a static message (iow no static 
message id).


To go on for brainstorming, lets sum up.

<input type="submit"
        attr:value="here/label" />

is very readable when generating an attribute.

<input type="submit"
        i18nattr:value="button-label" />

is also readable when inserting one of x translations of a static message.

But what about the situation currently expressed as the following :

<input type="submit"
        tal:attributes="value here/label"
        i18n:attributes="value" />

where we want to state that the dynamically generated value needs to be 
translated.

The more generic our framework will be, the more often this situation 
will appear.

A first alternative would be :

<input type="submit"
        attr:value="here/label"
        i18n:attributes="value" />

I think that this is already a step further.

A second alternative could be :

<input type="submit"
        attr:value="here/label"
        i18nattr:value="" />

I must say I dislike empty attributes that are supposed to mean sthing !



-- 
Godefroid Chapelle (aka __gotcha)                http://bubblenet.be



More information about the Zope3-dev mailing list