Martijn Faassen wrote:
Dmitry Vasiliev wrote:

* 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.

This is an interesting usecase. If I understand you correctly, the question, put a bit broader, is the following:

<p tal:content="some/call" i18n:translate=""></p>

Should this translate whatever string (not message id) is returned from some/call or should it leave it alone?

You seem to be arguing it shouldn't. I can also see a usecase where this would be handy -- you can just add the string to your translation dictionary without having to mark anything in your codebase. This is a *disadvantage* if you're already using extraction tools, though.

I think only message ids should be translated since you always need to have a message id at some stage anyway to be extracted by i18nextract. Translating a string (not message id) returned by 'tal:content' is just a chortcut for lazy programmers. :-)

Dmitry Vasiliev (dima at
Zope3-dev mailing list

Reply via email to