Fix up r108203: just loading mw.jqueryMsg in the bottom queue, then assuming its...
authorRoan Kattouw <catrope@users.mediawiki.org>
Fri, 6 Jan 2012 14:11:34 +0000 (14:11 +0000)
committerRoan Kattouw <catrope@users.mediawiki.org>
Fri, 6 Jan 2012 14:11:34 +0000 (14:11 +0000)
commit844e6f0d7f6a927b3a3cbfdbf6255f01c9110400
treee3ffa4276ffa0dc0034b7bafd2657b7526399a6e
parente7e4e4fbf5a54170684a3c3587a2198c4a3ed45b
Fix up r108203: just loading mw.jqueryMsg in the bottom queue, then assuming its presence in mw.Message doesn't work, see CR comments.

* Moved message parsing (including $1 replacement) to Message.prototype.parser(), and let jqueryMsg override that when loaded
** Make the Message constructor public to make this possible
** Moved logic for skipping jqueryMsg when the message is simple from mw.Message to mw.jqueryMsg, where it belongs
* Remove mw.jqueryMsg from the default modules list in OutputPage. Modules that require PLURAL/GENDER should depend on mw.jqueryMsg
* TODOs
** The jqueryMsg parser is recreated for every mw.msg() call. It should probably be cached, but the only way I can think of is to add it as a member of the Map object, which is kind of weird
** Because jqueryMsg doesn't support a 'text' mode that expands PLURAL/GENDER but doesn't output HTML (leaves e.g. links alone), mw.Message.plain() and mw.Message.parse() currently behave identically. This is wrong and should be fixed, but that needs support in jqueryMsg too
includes/OutputPage.php
resources/mediawiki/mediawiki.jqueryMsg.js
resources/mediawiki/mediawiki.js