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

Jim Fulton jim at zope.com
Fri Sep 24 11:02:22 EDT 2004


Godefroid Chapelle wrote:
> Jim Fulton wrote:
> 
>> Godefroid Chapelle wrote:
>>
>> ...
>>
>>> But I really want the current comportment of implicitely translating 
>>> messageids coming back from the Python code to stay as it is.
>>
>>
>>
>> Why? What benefit does this serve, except to confuse?  I'm not 
>> necessarily
>> in a hurry to fix this.  I plan to talk to Fred to see if he knows of a
>> reason why this is being done.
>>
>> Jim
>>
> The follow-ups on this thread make me feel that some explanation might 
> be needed.
> 
> I have (almost ;-) no problems with the fact that the patch gets refused.

Great. :)

> OTOH, I'd rather be disappointed if the current comportment gets cancelled.
> 
> This comportment being:
> 
> <p tal:content="context/message_id">is translated</p>
>
> 
> In this case, the output of the tal:content will be translated even 
> though there is no i18n:translate attribute.

This means, for example, that it is impossible, without weird extra
workarounds, to write applications that manage message ids, because
the system has outguessed the programmer.


> If you take thr POV of a team building software, I think it really makes 
> sense that both type of actors have the responsibility of marking what 
> needs to be translated.

I don't agree.  Whether to translate something depends on what it's
being used for.  If the ZPT developer wants something translated, they
should indicate that explicitly. If a Python programmer wants something
translated (e.g. in presentation code) *they* can invoke the translation
API themselves.

> I understand what you mean by saying that message ids should comport as 
> much as possible as strings. But I think that a message id is meant to 
> mark translation as it states things like the domain and the default 
> string. IOW, it is normal to me that it has a different comportment in 
> case of translation.

No, it's meant to support translation by associating extra meta data
with a string.

> I would like to remind that if the site manager does not setup any 
> language, the default string will be output : this avoids any surprises 
> like german in the middle of english.

You mean, if translation is disabled, there will be no translation.
I don't see what this has to do with whether translation should be
implicit.

> 
> This maybe leads to this question : is Z3 currently implicitely 
> multilingual ?

I don't know what that means.  Z3 is designed to support localization.

 > IOW, is there any place where the site manager can
> explicitely switch languages on ?

There is a language-negotiation component that decides what the
target language should be based on some policy.  The site-manager
can control the policy through the selection of this component.

Jim

-- 
Jim Fulton           mailto:jim at zope.com       Python Powered!
CTO                  (540) 361-1714            http://www.python.org
Zope Corporation     http://www.zope.com       http://www.zope.org


More information about the Zope3-dev mailing list