Dmitry Vasiliev wrote:

> Jim Fulton wrote:
>> IMO, if a template an element with both i18n:translate and tal:content
>> and the value inserted is not a message id, the template's domain will
>> be used.  This seems like a bad idea.  It can hide failures to provide
>> message ids because everything ultimately gets a domain.  I'm working on
>> tools to help people see when text hasn't been internationalized and the
>> implicit use of of the template's domain makes these tools less useful.
>> Basically, the domain given in the template source applies to the source
>> only and shouldn't be used for data coming from elsewhere.
>> I propose that we should never use the templates domain when
>> inserting data
>> via tal:content.  Note however, if the tal expression results in the
>> use of the
>> template's example text, the templates domain should be used.
>> Thoughts?
> Maybe we should translate *only* a message id values in case of
> i18n:translate and tal:content/tal:replace and print a warning for any
> other values? Moreover it's Zope-3.1 behavior. For Zope-3.2 there was
> a bug report at partially
> fixed by me. Now I'm not sure the fix was a good idea. Main
> disadvantage I see is that it leads to bad i18n style for users.


there are cases where you need to evaluate an expression to get the
msgid for instance in:

there is a workaround, but it is very inelegant:

the translation could be done in python, but I guess you would need to
create special i18n views whose sole purpose would be to translate
information that's already available.

the risk would be that users start translating msgid in python code that
is not meant to be presented in a view.


Zope3-dev mailing list

Reply via email to