[Zope3-dev] Re: Use case not covered for translation of message
ids
Stephan Richter
srichter at cosmos.phy.tufts.edu
Sat Oct 2 14:31:08 EDT 2004
On Wednesday 29 September 2004 10:56, Martijn Faassen wrote:
> > This has not happened in all of Zope 3 so far. In fact, I cannot even
> > think about a sensible use-case where it would happen. You have to try
> > pretty hard to make cause this problem.
>
> I don't understand why you'd need to try hard. You just need an
> i18n:translate attribute with message id in a page template and it
> calling some method which returns an i18n string which already has a
> message id associated to it, right? One of them would not be used (or in
> case of the i18n string, at least not used *in that ZPT*) but clogging
> up the .po file.
In this case the Python version would not be used and you are right, both
message ids would be in the PO file. However, I do not think the Python
version would "clog" the PO file, since the message id could be used in
another view.
That said your example is the same as saying:
def changeStatus():
... # update status
return 'some status'
# print the status
status = changeStatus()
print 'another status message.'
In this case it is totally pointless to return the status from changeStatus().
However, that does not mean that every presentation will ignore the returned
status message.
Regards,
Stephan
--
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training
More information about the Zope3-dev
mailing list