From: Santhosh Thottingal Date: Thu, 29 Dec 2011 14:06:12 +0000 (+0000) Subject: Revert r107556 based on the discussion. X-Git-Tag: 1.31.0-rc.0~25689 X-Git-Url: http://git.heureux-cyclage.org/?p=lhc%2Fweb%2Fwiklou.git;a=commitdiff_plain;h=18d4be5f55f6c48b53182bab5d0adf9b78f11616 Revert r107556 based on the discussion. --- diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index 0eb0c6b011..c75295d115 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -110,8 +110,6 @@ 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. diff --git a/resources/Resources.php b/resources/Resources.php index e13a0e8592..8edbc24b64 100644 --- a/resources/Resources.php +++ b/resources/Resources.php @@ -706,7 +706,6 @@ return array( 'jquery.placeholder', 'jquery.mw-jump', 'mediawiki.util', - 'mediawiki.jqueryMsg' ), ), 'mediawiki.page.startup' => array( diff --git a/resources/mediawiki/mediawiki.js b/resources/mediawiki/mediawiki.js index bb6cb85677..c9bcdec386 100644 --- a/resources/mediawiki/mediawiki.js +++ b/resources/mediawiki/mediawiki.js @@ -158,9 +158,14 @@ var mw = ( function ( $, undefined ) { } return '<' + this.key + '>'; } - - var text = mw.jqueryMsg.getMessageFunction( )( this.key, this.parameters ); - + 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; + } ); + if ( this.format === 'plain' ) { return text; }