mediawiki.js: Document that default message format is 'text'
authorMatthew Flaschen <mflaschen@wikimedia.org>
Wed, 31 Jul 2013 19:21:04 +0000 (15:21 -0400)
committerTimo Tijhof <krinklemail@gmail.com>
Thu, 1 Aug 2013 00:17:08 +0000 (02:17 +0200)
Follows-up 2564de082e.

Change-Id: I73470cb9005051e4a43618ab8fd0707f3bd885f0

resources/mediawiki/mediawiki.js

index 46b74f1..741e231 100644 (file)
@@ -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();
                },