From: Matthew Flaschen Date: Wed, 31 Jul 2013 19:21:04 +0000 (-0400) Subject: mediawiki.js: Document that default message format is 'text' X-Git-Tag: 1.31.0-rc.0~19068^2 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=8bf7db0bcbf0b4705bd286ad60c8ba4797836400;p=lhc%2Fweb%2Fwiklou.git mediawiki.js: Document that default message format is 'text' Follows-up 2564de082e. Change-Id: I73470cb9005051e4a43618ab8fd0707f3bd885f0 --- diff --git a/resources/mediawiki/mediawiki.js b/resources/mediawiki/mediawiki.js index 46b74f1daf..741e2314a7 100644 --- a/resources/mediawiki/mediawiki.js +++ b/resources/mediawiki/mediawiki.js @@ -143,8 +143,12 @@ var mw = ( function ( $, undefined ) { }; /** - * Object constructor for messages, - * similar to the Message class in MediaWiki PHP. + * Object constructor for messages. + * + * Similar to the Message class in MediaWiki PHP. + * + * Format defaults to 'text'. + * * @class mw.Message * * @constructor @@ -357,7 +361,9 @@ var mw = ( function ( $, undefined ) { /* Public Methods */ /** - * Gets a message object, similar to wfMessage(). + * Get a message object. + * + * Similar to wfMessage() in MediaWiki PHP. * * @param {string} key Key of message to get * @param {Mixed...} parameters Parameters for the $N replacements in messages. @@ -370,14 +376,16 @@ var mw = ( function ( $, undefined ) { }, /** - * Gets a message string, similar to wfMessage() + * Get a message string using 'text' format. + * + * Similar to wfMsg() in MediaWiki PHP. * - * @see mw.Message#toString + * @see mw.Message * @param {string} key Key of message to get * @param {Mixed...} parameters Parameters for the $N replacements in messages. * @return {string} */ - msg: function ( /* key, parameters... */ ) { + msg: function () { return mw.message.apply( mw.message, arguments ).toString(); },