"Krinkle" posted a comment on MediaWiki.r107556.
URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/107556#c28641

Commit summary for MediaWiki.r107556:

Use jqueryMsg wikitext parser to parse interface messages at client side. 
Support for PLURAL in javascript.

Krinkle's comment:

Also note that unit tests dependencies are kept up to date manually. So next 
time keep <tt>./phase3/tests/qunit/index.html</tt> in sync to load everything 
correctly (and while at it, run QUnit tests in your browser before committing 
something like this).

The manually keeping up to date is a known issue and is fixed in the JSTesting 
branch which I plan to merge into trunk later this week.

If we do this, please do not change the "plain" format. Right now this revision 
basically brakes the "plain" method. There is a comment 5 lines down from that 
diff with a place holder for a parse mode. I'd recommend, if anything, to 
instead utilize the parse() placeholder and turn it into an asynchronous method 
(both to allow lazy loading of the module as well as futuristic plans for 
parsing that interacts with the API):
<pre>
var parser;

parse: function ( callback ) {
        var msg = this;

        msg.format = 'parse';

        mw.loader.using( 'mw.jqueryMsg', function () {
                parser = parser || mw.jqueryMsg.getMessageFunction( );
                callback( parser( msg.key, msg.parameters ) );
        });
},
</pre>

_______________________________________________
MediaWiki-CodeReview mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview

Reply via email to