[Zope3-dev] Re: RFC: undeprecate auto-message id translation

Florent Guillaume fg at nuxeo.com
Tue Dec 6 17:18:00 EST 2005


Martijn Faassen wrote:
> Zope 2.8 *is* actually interpolating and translating message ids 
> correctly *without* i18n:translate already. I think that this is the 
> same as Zope 3's (deprecated) behavior.
> 
> The problem is when 'structure' is used in TALES. If this isn't used, 
> translations happen normally. If it is used, translations suddenly 
> break, as do_insertStructure_tal is used instead of do_insertText_tal.
> 
> I can see that this makes sense if you "structure in" large pieces of 
> HTML -- they won't have translations. It does however break a usecase 
> where your message ids contain HTML. This isn't really clean, but very 
> handy for translators sometimes, especially if they want to use HTML 
> entities and the like. You can then use i18n:translate="" explicitly on 
> the structure, which will cause the *string* to be translated, without 
> interpolation happening. This put me on the wrong track initially, not 
> realizing the impact of 'structure' on the functioning of the TAL 
> interpreter.

I agree that the use case of having translations containing HTML is 
important, and thus that we'll have to make sure do_insertStructure_tal 
also does correct interpolation when faced with a MessageID.

Florent

-- 
Florent Guillaume, Nuxeo (Paris, France)   Director of R&D
+33 1 40 33 71 59   http://nuxeo.com   fg at nuxeo.com


More information about the Zope3-dev mailing list