Index: trunk/phase3/RELEASE-NOTES-1.19 |
— | — | @@ -110,6 +110,8 @@ |
111 | 111 | * Added $wgSend404Code, true by default, which can be set to false to send a |
112 | 112 | 200 status code instead of 404 for nonexistent articles. |
113 | 113 | * (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. |
114 | 116 | |
115 | 117 | === Bug fixes in 1.19 === |
116 | 118 | * $wgUploadNavigationUrl should be used for file redlinks if. |
Index: trunk/phase3/resources/Resources.php |
— | — | @@ -706,6 +706,7 @@ |
707 | 707 | 'jquery.placeholder', |
708 | 708 | 'jquery.mw-jump', |
709 | 709 | 'mediawiki.util', |
| 710 | + 'mediawiki.jqueryMsg' |
710 | 711 | ), |
711 | 712 | ), |
712 | 713 | 'mediawiki.page.startup' => array( |
Index: trunk/phase3/resources/mediawiki/mediawiki.js |
— | — | @@ -158,14 +158,9 @@ |
159 | 159 | } |
160 | 160 | return '<' + this.key + '>'; |
161 | 161 | } |
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 | | - |
| 162 | + |
| 163 | + var text = mw.jqueryMsg.getMessageFunction( )( this.key, this.parameters ); |
| 164 | + |
170 | 165 | if ( this.format === 'plain' ) { |
171 | 166 | return text; |
172 | 167 | } |