r107571 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107570‎ | r107571 | r107572 >
Date:14:06, 29 December 2011
Author:santhosh
Status:ok
Tags:
Comment:
Revert r107556 based on the discussion.
Modified paths:
  • /trunk/phase3/RELEASE-NOTES-1.19 (modified) (history)
  • /trunk/phase3/resources/Resources.php (modified) (history)
  • /trunk/phase3/resources/mediawiki/mediawiki.js (modified) (history)

Diff [purge]

Index: trunk/phase3/RELEASE-NOTES-1.19
@@ -110,8 +110,6 @@
111111 * Added $wgSend404Code, true by default, which can be set to false to send a
112112 200 status code instead of 404 for nonexistent articles.
113113 * (bug 23427) Introduced {{PAGEID}} variable to expose page.page_id
114 -* Use jqueryMsg wikitext parser to parse interface messages at client side.
115 - Support for PLURAL in javascript.
116114
117115 === Bug fixes in 1.19 ===
118116 * $wgUploadNavigationUrl should be used for file redlinks if.
Index: trunk/phase3/resources/Resources.php
@@ -706,7 +706,6 @@
707707 'jquery.placeholder',
708708 'jquery.mw-jump',
709709 'mediawiki.util',
710 - 'mediawiki.jqueryMsg'
711710 ),
712711 ),
713712 'mediawiki.page.startup' => array(
Index: trunk/phase3/resources/mediawiki/mediawiki.js
@@ -158,9 +158,14 @@
159159 }
160160 return '<' + this.key + '>';
161161 }
162 -
163 - var text = mw.jqueryMsg.getMessageFunction( )( this.key, this.parameters );
164 -
 162+ var text = this.map.get( this.key ),
 163+ parameters = this.parameters;
 164+
 165+ text = text.replace( /\$(\d+)/g, function ( str, match ) {
 166+ var index = parseInt( match, 10 ) - 1;
 167+ return parameters[index] !== undefined ? parameters[index] : '$' + match;
 168+ } );
 169+
165170 if ( this.format === 'plain' ) {
166171 return text;
167172 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r107556Use jqueryMsg wikitext parser to parse interface messages at client side. Sup...santhosh09:29, 29 December 2011

Status & tagging log