Hi all. in zope/i18n/__init__.py, the _translate method used by translate, if the msgid is a MessageID or a Message then the domain, default, and mapping are all used in preference to keyword arguments, even if, for instance, the keyword is non-None and the attribute is None.

Because of the immutability of Message, it would be nice if, minimally, the mapping keyword were honored.

My strawman is that all non-None `translate` keyword arguments should win over msgid values.

A valid counter-argument for domain, at least, is that this is really an attribute of the msgid, and overriding it effectively changes the msgid into an entirely different token. But I'm tempted to go with simple logic and just say 'keywords override msgids'.

This seems to be in direct opposition with the current code, so I'm guessing someone put some thought behind the current behavior. Would anyone care to champion it?

Zope3-dev mailing list
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to