Re: Automatic Generation of Menus
Andreas Hochsteger <[email protected]> Fri, 7 Mar 2003 07:59:35 +0100
| Newsgroups | gmane.comp.cms.wyona.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi!
On Thursday 06 March 2003 20:30, Andreas Hartmann wrote:
[snip]
> - For each transition, a menu item is created:
>
> Document documents[] = page.getDocuments();
> foreach document in documents {
>
> Transition transitions[]
> = Workflow.getNextTransitions(document);
>
> foreach transition in transitions {
>
> String eventLabel = transition.getEvent().getLabel();
> String doctypeLabel = document.getType().getLabel();
>
> addMenuItem(eventLabel + " " + doctypeLabel, ...);
> // "Publish Article"
> }
> }
[snip]
Looks good. I didn't know, that there is already workflow integrated into
Lenya, is it?
I've got one hint for you from an i18n perspective:
It's generally bad to construct text which should be displayed this way,
because it's not easy to translate:
addMenuItem(eventLabel + " " + doctypeLabel, ...);
In english you have: "Publish Article" but in german it's vice versa: "Artikel
publizieren".
I know that this is not really what you wanted to hear, but every project
which aims to be used all over the world has to take care about i18n.
BTW, is it currently possible to i18n Lenya? I don't think so ...
Bye,
Andreas Hochsteger