On 08/11/2010 02:51 PM, Platonides wrote:
I remember some time ago we discussed in wikitech-l
the possibility of
doing a late replace of plural: and {{sitename}} to have the rest of the
message parsed in a cache.
It may be worth to bring back that idea if such light parser is going to
be done in JS too.
For transforming the templates into a JSON tree, the DOM preprocessor
may be easy to transform.
I think the we should do server side msg parse and cache for everything
it can, with variable substitution arguments like {{PLURAL:$1|value 1|
value 2}} being delivered to the client in a way that it can manage
relevant in-line substitutions. I am open to that template being
represented as a wikitext string or as a JSON tree. I lean towrds
wikitext string since it will be helpful for javascript to be able to
deal with 'light' wikitext strings.
--michael