mediawiki.jqueryMsg: Deprecate window.gM
authorBartosz Dziewoński <matma.rex@gmail.com>
Thu, 13 Feb 2014 18:19:22 +0000 (19:19 +0100)
committerMattflaschen <mflaschen@wikimedia.org>
Fri, 14 Feb 2014 01:04:26 +0000 (01:04 +0000)
The comment already said it was.  Make this more obvious with mw.log.deprecate.

Change-Id: I60af043eb7a136a0f52618fdbc9bb76b17788b83

resources/mediawiki/mediawiki.jqueryMsg.js

index e4a9316..5f20ee4 100644 (file)
                        return this.language.convertNumber( number, isInteger );
                }
        };
+
        // Deprecated! don't rely on gM existing.
        // The window.gM ought not to be required - or if required, not required here.
        // But moving it to extensions breaks it (?!)
        // Need to fix plugin so it could do attributes as well, then will be okay to remove this.
-       window.gM = mw.jqueryMsg.getMessageFunction();
+       // @deprecated since 1.23
+       mw.log.deprecate( window, 'gM', mw.jqueryMsg.getMessageFunction(), 'Use mw.message( ... ).parse() instead' );
 
        /**
         * @method