[Zope3-dev] Re: i18n domains vs. unique message ids -OR-
whyShakespearean English was better
Philipp von Weitershausen
philipp at weitershausen.de
Mon Aug 18 15:02:20 EDT 2003
Shane Hathaway wrote:
> Philipp von Weitershausen wrote:
>
>> What if there is more than just the 'title' attribute that is to be
>> translated?
>
>
> Well, that would be quite a surprise to me. In my universe, permissions
> are so simple that only the 'title' attribute will be presented to the
> user. Developers might want to see the raw permission ID sometimes.
I'm not talking about this example specifically. There are quite a few
directives that have more than one attribute translated. For example::
<browser:editform
schema="some.schema"
name="edit"
label="This form label shall be translated"
menu="some_menu_id"
title="This menu title shall be translated"
/>
>> Martijn Faassen and Godefroid Chapelle are currently arguing on IRC,
>> that an XML namespace like i18n (as known in ZPTs) should be used.
>>
>> <permission id="zope.View" i18n:attributes="title" title="View" />
>>
>> Stephan Richter and I basically vote against this as
>>
>> 1.) Namespaces have a different meaning in ZCML than in ZPT. In ZPT,
>> they 'hide' tal, metal and i18n commands from the xhtml namespace and
>> they are meant to be used as attributes. In ZCML, we use namespaces to
>> indicate different configuration domains, like 'zope', 'browser',
>> 'meta', etc.
>>
>> 2.) Supporting this ZPT-like i18n namespace in ZCML would require
>> extensive changes to the ZCML XML machinery. One could argue that it
>> doesn't belong there. As stated above, schema fields contain all the
>> logic that is necessary to resolve the data provided in the XML
>> attribute. They are self-contained, so to speak.
>>
>> 3.) Not every attribute would be allowed to be translated. In the
>> above example, the 'id' attribute would not be allowed, because it's a
>> global identifier. How would ZCML know that? Maybe only allow
>> MessageID fields to be translated? Well, why not put that
>> funcationally into the MessageID field in the first place...?
>>
>> What are your opinions on this?
>
>
> You're right that you can't expect ZCML to understand arbitrary i18n
> attributes. It doesn't make sense at that level.
Amen
Philipp
More information about the Zope3-dev
mailing list