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

Godefroid Chapelle gotcha at bubblenet.be
Wed Sep 29 06:55:02 EDT 2004


Martijn Faassen wrote:

<snip>

> 
> 
> It in part probably depends on what i18n-ed applications in Zope 3 will 
> look like. Will most message ids be declared in Python, or in the page 
> templates?

This is maybe the biggest question : the first reflex is to say that any 
string should be in the ZPT. This way, presentation layer holds everything.

The problem is about frameworks, components and genericity. The more 
components we use, the more UI comes from somewhere else : elsewhere 
being Python, ZCML or any other location you can dream of.

If you look at the current thread about errors and widgets, you'll see a 
lot of UI strings. Those won't be in the ZPT as the form is 
autogenerated and it's obvious the error messages needs to be translated 
in 99% of the cases.

I still find nobody who explains why marking it as translatable and 
letting the presentation layer make the translation (because the string 
has been marked) is wrong.

I feel this is a normal decoupling mechanism. If someone wants to muck 
up with translations he can still do it in the translation engine in a 
unique place.

> If most happens in Python anyway, a very easy way to make a 
> particular section i18ned is to have a tag/attribute saying 'everything 
> inside is auto-i18ned'. You could even have another tag that says 
> 'except this section'. The rules for static text in the ZPT can still 
> stand as they are.
> 
> I think that's still explicit, and less work.
> 

I think the auto-i18ned should not be used. This is a configuration that 
should be centralized.

OTOH, i18n:except makes sense to be able in some given cases to present 
the untranslated message ids.



The current thinking mechanism is like this :

let's build an application,
let's i18n it.

where the process is sequential.

Actually, any string part of the UI should be marked from the very 
beginning. Regardless if they will be translated or not. To make a clear 
separation between software and data.

When a string has been marked as UI, I (and this is not a repetition ;-) 
do not understand why it is wrong to have the presentation layer 
translate it (as long as the translation mechanism is ON). The ZPT 
engine can be setup for translation OFF by the site manager if he wants.

IOW, it is good that the translation happens in the ZPT engine, I am in 
no way meaning that it should happen right away in th different modules

<snip>

> 
> Martijn


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



More information about the Zope3-dev mailing list