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

Dmitry Vasiliev lists at hlabs.spb.ru
Tue Dec 6 06:29:12 EST 2005


Martijn Faassen wrote:

> * if a i18n:translate has to be explictily added, extraction tools will 
> find the i18n:translate="" in the ZPT and think there's a message in the 
> ZPT to translate. But there's not, it's coming from Python code. This 
> might result in the extraction tool mistakenly extracting dummy text:
> 
> <p tal:content="context/something" i18n:translate="">This dummy text is 
> replaced</p>
> 
> Unless the tool is so smart it notices this case. Anyway, the tools 
> already extracted the *real* message anyway.

Currently i18nextract just extracts '${DYNAMIC_CONTENT}' marker for all dynamic 
content.

> Risks
> -----

+1 for translate message ids without explicit 'i18n:translate' attribute but 
some open questions still remain:

* currently you can translate any string (not only a message id) like this:

<p tal:content="string: STRING TO TRANSLATE" i18n:translate=""></p>

In this case the string will be automatically converted to message id and then 
translated. I think we definitely shouldn't translate any string, only message ids.

-- 
Dmitry Vasiliev (dima at hlabs.spb.ru)
     http://hlabs.spb.ru


More information about the Zope3-dev mailing list