On 1/3/12 1:39 PM, Roan Kattouw wrote:
However, it's not clear to me what other features jQueryMsg has
exactly.
Neil hinted that there are some HTML-related features, but I
haven't looked at that.
jQueryMsg has a ton of features, documented here.
http://www.mediawiki.org/wiki/Extension:JQueryMsg
I have probably not stressed adequately that this isn't just another way
of processing strings. You don't use it to get a string that you then
put into HTML. As the name implies, it's fundamentally based on jQuery
objects.
So:
- as the discussion implies, we can do PLURAL in the frontend, and we
could extend if for GENDER and so on.
- you should never need to escape anything. I'm adding a patch soon
to remove the last justification for that.
- you can do very advanced things with your $1, $2 parameters, like
dropping a link or a button or javascript hover behaviour into the
middle of a message. Even if those items are in different order in
different languages. There isn't any other i18n framework that I know of
that does this.
Since we are decided that in the near future we'll use jQueryMsg as is,
we can still talk about the hack that Roan suggested. If I had known how
to do that, I never would have gone the route of writing a miniature parser.
There are some bugs related to mixing structures like {{PLURAL}} and
HTML. We might be able to correct those with your new hacks. I wrote
some design thoughts into the related bug.
https://bugzilla.wikimedia.org/show_bug.cgi?id=29542
--
Neil Kandalgaonkar |) <neilk(a)wikimedia.org>