User "Krinkle" changed the status of MediaWiki.r88140. Old Status: new New Status: ok
User "Krinkle" also posted a comment on MediaWiki.r88140. Full URL: http://www.mediawiki.org/wiki/Special:Code/MediaWiki/88140#c17390 Commit summary: * Basic gallery functionality * Basic error messages This still needs major cleanup but I wanted to commit this huge thing first. Comment: Marking OK. A little hint, the Message contructor in the mw.js lib supports $(N) parameters natively since a few months now. Documentation isn't great yet, but here's a basic example (look at mediawiki.js) <source lang="javascript"> /** * suppose we have a message key "user-welcome" with value * "Hello $1. Welcome to $2. Last visit by $1: $3". * mw.message(key /* , ... */ ) * mw.message is something like: * var parameters = arguments.shift(); return new Message(msgBlob, key, parameters); * not to confuse with mw.msg(), which is like: return mw.message(key).toString() */ // Get instance of Message var welcome = mw.message('user-welcome', 'Krinkle', 'Wikipedia', 'now'); // Get it as a plain string welcome.format = 'plain'; welcome.toString(); // Shortcut for the above welcome.plain(); // Returns: "Hello Krinkle. Welcome to Wikipedia. Last visit by Krinkle: now" </source> _______________________________________________ MediaWiki-CodeReview mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-codereview
