Revision: 46238
Author:   siebrand
Date:     2009-01-25 23:24:53 +0000 (Sun, 25 Jan 2009)

Log Message:
-----------
Add plural support for user stats

Modified Paths:
--------------
    trunk/extensions/SocialProfile/UserProfile/UserProfile.i18n.php
    trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php

Modified: trunk/extensions/SocialProfile/UserProfile/UserProfile.i18n.php
===================================================================
--- trunk/extensions/SocialProfile/UserProfile/UserProfile.i18n.php     
2009-01-25 23:10:35 UTC (rev 46237)
+++ trunk/extensions/SocialProfile/UserProfile/UserProfile.i18n.php     
2009-01-25 23:24:53 UTC (rev 46238)
@@ -33,14 +33,14 @@
        'user-send-gift' => 'Send a gift',
        'user-contributions' => 'Contributions',
        'user-stats-title' => 'Statistics',
-       'user-stats-edits' => 'Edits',
-       'user-stats-votes' => 'Votes',
-       'user-stats-comments' => 'Comments',
-       'user-stats-recruits' => 'Recruits',
-       'user-stats-poll-votes' => 'Poll votes',
-       'user-stats-picture-game-votes' => 'Picture game votes',
-       'user-stats-quiz-points' => 'Quiz points',
-       'user-stats-pick-points' => 'Pick \'em points',
+       'user-stats-edits' => '{{PLURAL:$1|Edit|Edits}}',
+       'user-stats-votes' => '{{PLURAL:$1|Vote|Votes}}',
+       'user-stats-comments' => '{{PLURAL:$1|Comment|Comments}}',
+       'user-stats-recruits' => '{{PLURAL:$1|Recruit|Recruits}}',
+       'user-stats-poll-votes' => 'Poll {{PLURAL:$1|vote|votes}}',
+       'user-stats-picture-game-votes' => 'Picture game 
{{PLURAL:$1|vote|votes}}',
+       'user-stats-quiz-points' => 'Quiz {{PLURAL:$1|point|points}}',
+       'user-stats-pick-points' => 'Pick \'em {{PLURAL:$1|point|points}}',
        'other-info-title' => 'Other information',
        'user-friends-title' => 'Friends',
        'user-foes-title' => 'Foes',

Modified: trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php
===================================================================
--- trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php      
2009-01-25 23:10:35 UTC (rev 46237)
+++ trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php      
2009-01-25 23:24:53 UTC (rev 46238)
@@ -145,15 +145,15 @@
                        </div>
                        <div class="cleared"></div>
                        <div class="profile-info-container bold-fix">'.
-                               
$this->getUserStatsRow(wfMsg('user-stats-edits'), $stats_data['edits']).
-                               
$this->getUserStatsRow(wfMsg('user-stats-votes'), $stats_data['votes']).
-                               
$this->getUserStatsRow(wfMsg('user-stats-comments'), $stats_data['comments']).
-                               
$this->getUserStatsRow(wfMsg('user-stats-recruits'), $stats_data['recruits']).
-                               
$this->getUserStatsRow(wfMsg('user-stats-poll-votes'), 
$stats_data['poll_votes']).
-                               
$this->getUserStatsRow(wfMsg('user-stats-picture-game-votes'), 
$stats_data['picture_game_votes']).
-                               
$this->getUserStatsRow(wfMsg('user-stats-quiz-points'), 
$stats_data['quiz_points']);
+                               $this->getUserStatsRow( wfMsg( 
'user-stats-edits', $stats_data['edits'] ), $stats_data['edits'] ) .
+                               $this->getUserStatsRow( wfMsg( 
'user-stats-votes', $stats_data['votes'] ), $stats_data['votes'] ) .
+                               $this->getUserStatsRow( wfMsg( 
'user-stats-comments', $stats_data['comments'] ), $stats_data['comments'] ) .
+                               $this->getUserStatsRow( wfMsg( 
'user-stats-recruits', $stats_data['recruits'] ), $stats_data['recruits'] ) .
+                               $this->getUserStatsRow( wfMsg( 
'user-stats-poll-votes', $stats_data['poll_votes'] ), $stats_data['poll_votes'] 
) .
+                               $this->getUserStatsRow( wfMsg( 
'user-stats-picture-game-votes', $stats_data['picture_game_votes']), 
$stats_data['picture_game_votes'] ) .
+                               $this->getUserStatsRow( wfMsg( 
'user-stats-quiz-points', $stats_data['quiz_points'] ), 
$stats_data['quiz_points'] );
                                if( $stats_data['currency'] != '10,000' )
-                                       $output .= $this->getUserStatsRow( 
wfMsg('user-stats-pick-points'), $stats_data['currency'] );
+                                       $output .= $this->getUserStatsRow( 
wfMsg( 'user-stats-pick-points', $stats_data['currency'] ), 
$stats_data['currency'] );
                        $output .= '</div>';
                }
 



_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to