Use jqueryMsg wikitext parser to parse interface messages at client side. Support...
[lhc/web/wiklou.git] / resources / mediawiki / mediawiki.js
index c9bcdec..bb6cb85 100644 (file)
@@ -158,14 +158,9 @@ var mw = ( function ( $, undefined ) {
                                }
                                return '<' + this.key + '>';
                        }
-                       var     text = this.map.get( this.key ),
-                               parameters = this.parameters;
-
-                       text = text.replace( /\$(\d+)/g, function ( str, match ) {
-                               var index = parseInt( match, 10 ) - 1;
-                               return parameters[index] !== undefined ? parameters[index] : '$' + match;
-                       } );
-
+                       
+                       var text = mw.jqueryMsg.getMessageFunction( )( this.key, this.parameters );
+                       
                        if ( this.format === 'plain' ) {
                                return text;
                        }