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

Philipp von Weitershausen philipp at weitershausen.de
Sun Sep 19 06:10:29 EDT 2004


Godefroid Chapelle wrote:
>>> 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?
> 
> In the Python code when he used a MessageID and not a string.

That does not imply translation yet. Not even in Python code:

   >>> msg = _(u'foobar')
   >>> from zope.i18n import translate
   >>> translate(msg)
   ...

>>> 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.
> 
> I think you do not know that there is no need for explicit use of 
> i18n:translate when rendering a MessageID. The interpreter finds out by 
> itself and translate.

That is not how it works anywhere. Translation is explicit. Why should 
we change that?

> This let each member of the team manage his part of the job : python 
> coders take care of strings that should be translated by using MessageID 
> and template designers take of their strings by inserting i18n namespace 
> where needed.
> 
> With the current implementation, the template designer does not need to 
> know if what he'll get from the python code needs to be translated or 
> not : which is good imho.

No, it's not. Translation needs to be explicit, IMO.

Philipp


More information about the Zope3-dev mailing list