[Zope3-dev] i18n:translate and tal:content should not use template
domain
Jim Fulton
jim at zope.com
Wed Nov 9 14:28:53 EST 2005
Jean-Marc Orliaguet wrote:
> Jim Fulton wrote:
>
>
>>Jean-Marc Orliaguet wrote:
>>...
>>
>>
>>>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:
>>>http://svn.nuxeo.org/trac/pub/changeset/27505
>>>
>>>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.
>>
>>
>>Nobody is objecting to getting message ids from exceptions,
>
>
> 'expressions' you mean?
Yes. Sorry.
>
>>They should be
>>message ids though, not strings. I think we need to work with strings,
>>but have tools to aid developers in detecting when they've used strings
>>rather than message ids.
>>
>
> and a message id would be a string with characters in lowercase without
> spaces but maybe with underscores or dots?
No, message ids are special types of objects that subclass unicode.
They carry extra data such as a translation domain, default, and
interpolation data. See zope.i18nmessageid.
message ids can have any unicode content.
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