r83624 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83623‎ | r83624 | r83625 >
Date:01:31, 10 March 2011
Author:neilk
Status:deferred
Tags:
Comment:
clobber parser namespace less
Modified paths:
  • /trunk/extensions/UploadWizard/resources/mediawiki.language.parser.js (modified) (history)

Diff [purge]

Index: trunk/extensions/UploadWizard/resources/mediawiki.language.parser.js
@@ -1,3 +1,7 @@
 2+/**
 3+ * n.b. if this is ever moved to be mediawiki.language.parser, then mediawiki.language.procPLURAL will be obsolete
 4+ */
 5+
26 ( function( mw, $j ) {
37
48 /**
@@ -30,7 +34,7 @@
3135 * @param {Array} parser options
3236 * @return {Function} function suitable for assigning to window.gM
3337 */
34 - mw.language.parser.getMessageFunction = function( options ) {
 38+ mw.language.getMessageFunction = function( options ) {
3539 var parser = new mw.language.parser( options );
3640 /**
3741 * Note replacements are gleaned from 2nd parameter, or variadic args starting with 2nd parameter.
@@ -55,7 +59,7 @@
5660 * @param {Array} parser options
5761 * @return {Function} function suitable for assigning to jQuery plugin, such as $j.fn.msg
5862 */
59 - mw.language.parser.getJqueryPlugin = function( options ) {
 63+ mw.language.getJqueryMessagePlugin = function( options ) {
6064 var parser = new mw.language.parser( options );
6165 /**
6266 * Note replacements are gleaned from 2nd parameter, or variadic args starting with 2nd parameter.
@@ -88,7 +92,7 @@
8993 */
9094 mw.language.parser = function( options ) {
9195 this.settings = $j.extend( {}, parserDefaults, options );
92 - this.emitter = new mw.language.parser.htmlEmitter( settings.language, settings.magic );
 96+ this.emitter = new mw.language.htmlEmitter( this.settings.language, this.settings.magic );
9397 };
9498
9599 mw.language.parser.prototype = {
@@ -498,7 +502,7 @@
499503 /**
500504 * htmlEmitter - object which primarily exists to emit HTML from parser ASTs
501505 */
502 - mw.language.parser.htmlEmitter = function( language, magic ) {
 506+ mw.language.htmlEmitter = function( language, magic ) {
503507 this.language = language;
504508 var _this = this;
505509
@@ -548,7 +552,7 @@
549553 //
550554 // An emitter method takes the parent node, the array of subnodes and the array of replacements (the values that $1, $2... should translate to).
551555 // Note: all such functions must be pure, with the exception of referring to other pure functions via this.language (convertPlural and so on)
552 - mw.language.parser.htmlEmitter.prototype = {
 556+ mw.language.htmlEmitter.prototype = {
553557
554558 /**
555559 * Parsing has been applied depth-first we can assume that all nodes here are single nodes

Status & tagging log