| Index: trunk/phase3/resources/mediawiki/mediawiki.js |
| — | — | @@ -163,7 +163,9 @@ |
| 164 | 164 | * @return string Message as a string in the current form or <key> if key does not exist. |
| 165 | 165 | */ |
| 166 | 166 | toString: function() { |
| 167 | | - if ( !this.exists( ) ) { |
| | 167 | + var text; |
| | 168 | + |
| | 169 | + if ( !this.exists() ) { |
| 168 | 170 | // Use <key> as text if key does not exist |
| 169 | 171 | if ( this.format !== 'plain' ) { |
| 170 | 172 | // format 'escape' and 'parse' need to have the brackets and key html escaped |
| — | — | @@ -172,13 +174,11 @@ |
| 173 | 175 | return '<' + this.key + '>'; |
| 174 | 176 | } |
| 175 | 177 | |
| 176 | | - var text; |
| 177 | 178 | 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. |
| 183 | 183 | text = this.parser(); |
| 184 | 184 | } |
| 185 | 185 | |