Stephan Richter wrote:
On Friday 06 May 2005 12:11, Godefroid Chapelle wrote:
Stephan also have pointed that automatic translation doesn't allow somebody to disable translation on purpose for some piece of content.
Right. That's one reason why it's bad.
Can someone explain this use case a bit deeper ?
If this is a crucial use case, we could still better have i18n:translate="nothing" or i18n:disable="" or i18n:omit-translate or whatever on the specific places that needs to disable translation when the python module author thought it should be translated.
Oh come on, this just sucks. I think Philipp raised numerous other good points I agree with, especially the comparison with Python code. Really, automatic translation violates the laws of explicitness.
I think we have more an expected behaviour problem rather an explicitness problem.
Maybe. Though writing code in an i18n-compliant manner is not very untuitive most of the time. I've seen good programmers do very simple mistakes regarding i18n-aware code. It's ok, it's not a trivial thing. IMO, writing i18n-aware code takes experience and with experience, you will expect less of the i18n machinery.
For example when I create a msgid I guess that it will be translated at some point later. For a static content i18n:translate just creates a msgid and then translate it later, why then msgids created in Python code should be explicitly translated? Maybe then we should split i18n:translate to i18n:define and i18n:translate? I don't think so. :-)
The splitting there is YAGNI indeed.
Sometimes people even don't realize what a msgid is just a definition phase of a translation process, and do things like "str + msgid" and so I guess they will be confused by explicit translation process.
I agree that people often don't realize how to properly deal with message ids. The "str + msgid" problem you mention is exactly one of the non-intuitive issues I mentioned above.
However, I don't understand your conclusion, I would assume the direct opposite. *Because* we have an automatic, magic translation process, people don't realize that a message id is just a definition. They must think it's the translation process. That assumption is, of course, wrong and leads to code like "str + msgid".
BTW, I've just found another case of automatic translation for evaluated i18nVar values.
And some more related questions:
- Should we do automatic translation for msgid's inside a TALES expression?
IMO we shouldn't do automatic translation at all.
- Maybe we need some new TALES expression type for msgid definition? For example:
<tal:block define="name msgid:Specific">
Why? Use case?
Philipp _______________________________________________ Zope3-dev mailing list Zope3email@example.com Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com