r48862 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r48861‎ | r48862 | r48863 >
Date:07:57, 26 March 2009
Author:ialex
Status:ok (Comments)
Tags:
Comment:
Use parsemag rather than parseinline since the content will be escaped by Xml::radioLabel().
This breaks French messages since something like "some text here :" will be converted to "some text here :" but Parser::parse() and then escape so the " " will be visible to the user
Modified paths:
  • /trunk/phase3/includes/specials/SpecialContributions.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialContributions.php
@@ -251,7 +251,7 @@
252252 Xml::element( 'legend', array(), wfMsg( 'sp-contributions-search' ) ) .
253253 Xml::radioLabel( wfMsgExt( 'sp-contributions-newbies', array( 'parseinline' ) ),
254254 'contribs', 'newbie' , 'newbie', $this->opts['contribs'] == 'newbie' ? true : false ) . '<br />' .
255 - Xml::radioLabel( wfMsgExt( 'sp-contributions-username', array( 'parseinline' ) ),
 255+ Xml::radioLabel( wfMsgExt( 'sp-contributions-username', array( 'parsemag' ) ),
256256 'contribs' , 'user', 'user', $this->opts['contribs'] == 'user' ? true : false ) . ' ' .
257257 Xml::input( 'target', 20, $this->opts['target']) . ' '.
258258 '<span style="white-space: nowrap">' .

Comments

#Comment by IAlex (talk | contribs)   07:58, 26 March 2009

It's "by Parser::parse()" and not "but" ;)

#Comment by Brion VIBBER (talk | contribs)   00:20, 16 April 2009

If this breaks French text, maybe it's the wrong thing to do then? Does this need further cleanup?

#Comment by IAlex (talk | contribs)   09:11, 16 April 2009

I'm not sure to understand you, the problem is that Parser::parse() (which is called when you pass "parseinline" to wfMsgExt()) automatically converts spaces before colons to   and then it is escaped by Xml::radioLabel(). "parsemag" doesn't have this problem since it doesn't call Parser::parse().

If you want to see the problem (with the visible  ), open http://fr.wikipedia.org/wiki/Sp%C3%A9cial:Contributions?uselang=fr where you'll see "Adresse IP ou nom d’utilisateur :".

Status & tagging log