[Zope-CMF] Skinning (translating) the actionbox
Jens Quade
jq@jquade.de
04 Apr 2001 14:27:32 +0200
Jeffrey P Shell <jeffrey@Digicool.com> writes:
> > I've been playing around with the skinning functionality in CMF, in my
> > case focussing on translating the text. Works quite flexible, except for
> > the actionbox. I couldn't find a DTML-doc or otherwise properties to
> In the Types Tool, you can change the name of the actions (don't change the
> id!) for the Content Types. This doesn't help for the global actions
> though.
>
> Ultimately, more of the tools, including the ActionsTool, need a UI where
> this can be configured. The TypesTool is a good start by exposing this for
> the content objects, I don't know what other tools like Workflow that
> participate in Actions do (or are capable of).
Translating often happens to several languages, not just to one.
People want to switch to another language...
Every string that should be shown on the screen (like
action names) must go through a "translater", something like GNU
gettext.
The basic translator just returns the string unmodified.
A real translator function looks up the translation for the requested
language and returns it.
Globally configurable names will not work here, and the translation
should happen at one single point, not one form for every tool.
I also think this translation layer is better called where the string
appears, and that's obviously not always in the skins.
e.g.
actions = [
{'name': 'Log in',
should read
actions = [
{'name': i18n('Log in'),
in ActionTools.py.
The same scheme could apply to skins:
<dtml-let portal_status_message="i18n('Document changed.')">
in document_edit.dtml
This would enable internationalization. The support for the i18n
function (and its context, etc) should better be part of Zope, not
CMF. CMF could then plug-in its own TTW translator.
btw, lot of internationalization issues are solved e.g. in KDE,
this howto shows how it should work in Zope, too:
http://developer.kde.org/kde2arch/kde-i18n-howto.html
jens
--
Shipping software is an unnatural act