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 | + |
2 | 6 | ( function( mw, $j ) { |
3 | 7 | |
4 | 8 | /** |
— | — | @@ -30,7 +34,7 @@ |
31 | 35 | * @param {Array} parser options |
32 | 36 | * @return {Function} function suitable for assigning to window.gM |
33 | 37 | */ |
34 | | - mw.language.parser.getMessageFunction = function( options ) { |
| 38 | + mw.language.getMessageFunction = function( options ) { |
35 | 39 | var parser = new mw.language.parser( options ); |
36 | 40 | /** |
37 | 41 | * Note replacements are gleaned from 2nd parameter, or variadic args starting with 2nd parameter. |
— | — | @@ -55,7 +59,7 @@ |
56 | 60 | * @param {Array} parser options |
57 | 61 | * @return {Function} function suitable for assigning to jQuery plugin, such as $j.fn.msg |
58 | 62 | */ |
59 | | - mw.language.parser.getJqueryPlugin = function( options ) { |
| 63 | + mw.language.getJqueryMessagePlugin = function( options ) { |
60 | 64 | var parser = new mw.language.parser( options ); |
61 | 65 | /** |
62 | 66 | * Note replacements are gleaned from 2nd parameter, or variadic args starting with 2nd parameter. |
— | — | @@ -88,7 +92,7 @@ |
89 | 93 | */ |
90 | 94 | mw.language.parser = function( options ) { |
91 | 95 | 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 ); |
93 | 97 | }; |
94 | 98 | |
95 | 99 | mw.language.parser.prototype = { |
— | — | @@ -498,7 +502,7 @@ |
499 | 503 | /** |
500 | 504 | * htmlEmitter - object which primarily exists to emit HTML from parser ASTs |
501 | 505 | */ |
502 | | - mw.language.parser.htmlEmitter = function( language, magic ) { |
| 506 | + mw.language.htmlEmitter = function( language, magic ) { |
503 | 507 | this.language = language; |
504 | 508 | var _this = this; |
505 | 509 | |
— | — | @@ -548,7 +552,7 @@ |
549 | 553 | // |
550 | 554 | // An emitter method takes the parent node, the array of subnodes and the array of replacements (the values that $1, $2... should translate to). |
551 | 555 | // 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 = { |
553 | 557 | |
554 | 558 | /** |
555 | 559 | * Parsing has been applied depth-first we can assume that all nodes here are single nodes |