Use jqueryMsg wikitext parser to parse interface messages at client side. Support...
authorSanthosh Thottingal <santhosh@users.mediawiki.org>
Thu, 29 Dec 2011 09:29:07 +0000 (09:29 +0000)
committerSanthosh Thottingal <santhosh@users.mediawiki.org>
Thu, 29 Dec 2011 09:29:07 +0000 (09:29 +0000)
RELEASE-NOTES-1.19
resources/Resources.php
resources/mediawiki/mediawiki.js

index c75295d..0eb0c6b 100644 (file)
@@ -110,6 +110,8 @@ production.
 * Added $wgSend404Code, true by default, which can be set to false to send a 
   200 status code instead of 404 for nonexistent articles.
 * (bug 23427) Introduced {{PAGEID}} variable to expose page.page_id
+* Use jqueryMsg wikitext parser to parse interface messages at client side.
+  Support for PLURAL in javascript.
 
 === Bug fixes in 1.19 ===
 * $wgUploadNavigationUrl should be used for file redlinks if.
index 8edbc24..e13a0e8 100644 (file)
@@ -706,6 +706,7 @@ return array(
                        'jquery.placeholder',
                        'jquery.mw-jump',
                        'mediawiki.util',
+                       'mediawiki.jqueryMsg'
                ),
        ),
        'mediawiki.page.startup' => array(
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;
                        }