r92617 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r92616‎ | r92617 | r92618 >
Date:10:12, 20 July 2011
Author:ashley
Status:ok (Comments)
Tags:
Comment:
SocialProfile: run the amount of points through Language::formatNum() to fix an i18n bug with the Finnish (fi) translation -- it was treating "1,000" (one thousand) as 1
Modified paths:
  • /trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php
@@ -850,7 +850,11 @@
851851 if ( $wgUserLevels ) {
852852 $output .= '<div id="points-level">
853853 <a href="' . $level_link->escapeFullURL() . '">' .
854 - wfMsgExt( 'user-profile-points', 'parsemag', $stats_data['points'] ) .
 854+ wfMsgExt(
 855+ 'user-profile-points',
 856+ 'parsemag',
 857+ $wgLang->formatNum( $stats_data['points'] )
 858+ ) .
855859 '</a>
856860 </div>
857861 <div id="honorific-level">

Follow-up revisions

RevisionCommit summaryAuthorDate
r92624SocialProfile: follow-up to r92621, r92617: remove DIY avatar code from UserW...ashley11:25, 20 July 2011

Comments

#Comment by Nikerabbit (talk | contribs)   10:18, 20 July 2011

it=?

#Comment by Jack Phoenix (talk | contribs)   10:23, 20 July 2011

wfMsgExt()

#Comment by Nikerabbit (talk | contribs)   10:26, 20 July 2011

I don't quite understand this. wfMsgExt shouldn't mangle the parameters in any way.

#Comment by Jack Phoenix (talk | contribs)   10:31, 20 July 2011

Don't worry, neither do I. :)

I'll try to explain this a bit. The Finnish (fi) translation for [[MediaWiki:User-profile-points]] is currently $1 {{PLURAL:$1|piste|pistettä}}; before this change, if a user had one thousand points (the default), you'd see "1,000 piste" on their profile page instead of "1,000 pistettä". After this change, you'll see "1 000 pistettä" (even the thousands separator is correct, whee!).

#Comment by Nikerabbit (talk | contribs)   10:32, 20 July 2011

It makes perfect sense now :)

Status & tagging log