[pmwiki-users] Feature request: Action lists in skins
Joachim Durchholz
jo at durchholz.org
Wed Apr 6 15:29:01 CDT 2005
Patrick R. Michaud wrote:
> On Wed, Apr 06, 2005 at 12:40:47PM +0200, Joachim Durchholz wrote:
>
>> i18n doesn't work well with action names anyway. In fact most of
>> the action entries in skins that I have seen don't use i18n at all,
>> and I had to hand-translate them. ... In another, "more normal"
>> case, I saw an action list that was a mixture of standard actions
>> (properly enclosed in $[...]) and recipe-specific actions written
>> without the i18n stuff surrounding them. I'm not sure how to
>> prevent such things from happening in the future.
>
> IMO, this is all just because the skin designers aren't designing for
> i18n. It's not at all hard to put the $[...] around any label that
> might need translating into another language.
Hmm... what will happen if there is no translation? Will $[...] simply
pass through its contents then?
> And the fact that skin designers aren't considering the needs of
> i18n, when it's fairly trivial to do so, means it's also likely that
> skin designers won't consider the complexities/importance of
> implementing shared actions lists either.
Funny - I draw the exact opposite conclusion.
For example, including the SideBar (not exactly a trivial option either)
doesn't seem to bother skin designers.
Yet it is quite complex: it has a nonobvious syntax (when compared to
its in-wiki equivalent), and it has a mechanism for selecting from a
series of pages.
I believe it's a nonproblem because the boilerplate code is already in
pmwiki.tmpl, so skin designers who don't wish to bother with <!--wiki's
complexities simply copy that code and be done with it.
Now that's exactly how an action list markup should work, too. It may
offer complex possibilities, but the common cases should be simple. E.g.
we have a way to say "action list goes HERE", a way to say "actions in
action list should be wrapped with THIS", and a way to say "THIS should
go between two actions".
Technically, this could be done as three markups:
<!--function:ActionList-->
(action list goes HERE)
<!--function:ActionWrapper {{ $action }} -->
(action list should be wrapped in {{ ... }} )
<!--function:ActionSeparator ~ -->
(actions in list should be separated by ~ )
This sequence
<!--function:ActionSeparator ~ -->
<!--function:ActionWrapper (( $action )) -->
<!--function:ActionList-->
would then give something like this:
(( edit )) ~ (( print )) ~ ((history))
(In reality, one would probably use some HTML markup instead of ((, )),
and ~ .)
This is just a rough sketch how it *could* be done. What I like about
this approach is that the simple case would remain simple: just place
the ActionList markup and be done with it. Add just the complexity you
need - for example, most skins will use either Wrapper or Separator, not
both.
What does everybody think - is the general direction OK, or am I running
off into some unwelcome direction again?
If the direction is OK, I'm willing to add the missing design details
(the variation within the <a href> tags isn't accounted for yet) and
carry the thing to completion.
> If we throw too much complexity into the system, then we end up
> barring (or discouraging) a lot of potential skin creators and site
> admins.
I agree with that - but complexity can be hidden or boilerplated so that
it's not a real problem.
Regards,
Jo
More information about the pmwiki-users
mailing list