r109585 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r109584‎ | r109585 | r109586 >
Date:23:52, 19 January 2012
Author:krinkle
Status:ok
Tags:
Comment:
[mediawiki.js] edit comment
* Follows-up r108230
Modified paths:
  • /trunk/phase3/resources/mediawiki/mediawiki.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki/mediawiki.js
@@ -163,7 +163,9 @@
164164 * @return string Message as a string in the current form or <key> if key does not exist.
165165 */
166166 toString: function() {
167 - if ( !this.exists( ) ) {
 167+ var text;
 168+
 169+ if ( !this.exists() ) {
168170 // Use <key> as text if key does not exist
169171 if ( this.format !== 'plain' ) {
170172 // format 'escape' and 'parse' need to have the brackets and key html escaped
@@ -172,13 +174,11 @@
173175 return '<' + this.key + '>';
174176 }
175177
176 - var text;
177178 if ( this.format === 'plain' ) {
178 - // FIXME this is wrong. There should be a way
179 - // to tell parser() whether we're looking for
180 - // plain text or HTML, but I don't know jQueryMsg
181 - // well enough to implement this.
182 - // Currently it always outputs HTML
 179+ // @todo FIXME: Although not applicable to core Message,
 180+ // Plugins like jQueryMsg should be able to distinguish
 181+ // between 'plain' (only variable replacement and plural/gender)
 182+ // and actually parsing wikitext to HTML.
183183 text = this.parser();
184184 }
185185

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r108230Fix up r108203: just loading mw.jqueryMsg in the bottom queue, then assuming ...catrope14:11, 6 January 2012

Status & tagging log