[Zope3-dev] Re: Use case not covered for translation of message ids

Philipp von Weitershausen philipp at weitershausen.de
Sun Sep 19 04:47:15 EDT 2004


Godefroid Chapelle wrote:
> Hi,
> 
> while working at the mountain sprint on the port of message ids to Z2, 
> we found out that the following use case is not covered :
> 
> <div tal:content="string:My content item is of type ${type_msgid}." />
> 
> where type_msgid is a MessageID that a developer did define in Python 
> code for instance.
> 
> Currently, the message id is not translated : the id itself is 
> concatenated to the text in the string expression.

That is what I expect because message ids behave like unicode strings.

> This use case can be seen as wrong : the text "My content item is of 
> type" won't be translated.
> 
> Ideally the template developer should have written :
> 
> <div i18n:translate="">My content item is of type <span 
> tal:replace="type_msgid" i18n:name="type" />.</div>

Yes. Why didn't he?

> Anyway, in the first case, the developer made his part of the job 
> correctly : he said that this value should be translated.

No, where did he?

> So we think 
> that even if the template is badly written, the message id should be 
> translated.

I disagree. There was no markup whatsoever that told ZPT to translate.

Philipp



More information about the Zope3-dev mailing list