[Zope-CMF] [dev] Portal status messages and i18n: a proposal
yuppie
y.2006_ at wcm-solutions.de
Thu Feb 23 06:15:59 EST 2006
Hi!
Currently the portal status message is always translated in the i18n
domain of main_template if sent through a redirect. This makes it
impossible to use different domains (and mappings or defaults).
Add-on products might want to use their own i18n domain. CMFCalendar
demonstrates that use case. "Event changed." is currently not translated
because of that issue.
There are more sophisticated approaches than using the query string for
status messages. Depending on your needs sessions or the statusmessages
product (http://dev.plone.org/collective/browser/statusmessages) might
be more appropriate.
But I'd like to keep the solution used in CMF simple and don't want to
create any dependencies on third party products. So I propose to resolve
the issue like this:
1.) Translate portal status messages and encode them with
default_charset before they are added to the query string. To make this
easier I'd like to add a translate function to CMFDefault utils.
2.) Decode the messages again before they are passed to the
main_template. No longer use i18n:translate="" in the template.
Comments are welcome! If there are no objections I'll implement this on
the trunk before the 2.0 beta release.
Cheers,
Yuppie
More information about the Zope-CMF
mailing list