r46688 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r46687‎ | r46688 | r46689 >
Date:21:22, 1 February 2009
Author:ashley
Status:deferred (Comments)
Tags:
Comment:
partial revert of r46264: "improve i18n for 'user-count-separator'". this did not work and instead of stuff like "4 of 10" being shown, only "of" was.
Modified paths:
  • /trunk/extensions/SocialProfile/UserProfile/UserProfile.i18n.php (modified) (history)
  • /trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php (modified) (history)

Diff [purge]

Index: trunk/extensions/SocialProfile/UserProfile/UserProfilePage.php
@@ -607,9 +607,9 @@
608608 $output .= '</div>
609609 <div class="action-left">';
610610 if( intval( str_replace( ",", "", $relationship_count ) ) > 4 ) {
611 - $output .= wfMsg( 'user-count-separator', $per_row, $relationship_count );
 611+ $output .= "{$per_row} ".wfMsg('user-count-separator')." {$relationship_count}";
612612 } else {
613 - $output .= wfMsg( 'user-count-separator', $relationship_count, $relationship_count );
 613+ $output .= "{$relationship_count} ".wfMsg('user-count-separator')." {$relationship_count}";
614614 }
615615 $output .= '</div>
616616 </div>
@@ -687,9 +687,9 @@
688688 $output .= '</div>
689689 <div class="action-left">';
690690 if( $gift_count > 4 ) {
691 - $output .= wfMsg( 'user-count-separator', "4", $gift_count );
 691+ $output .= "4 ".wfMsg('user-count-separator')." {$gift_count}";
692692 } else {
693 - $output .= wfMsg( 'user-count-separator', $gift_count, $gift_count );
 693+ $output .= "{$gift_count} ".wfMsg('user-count-separator')." {$gift_count}";
694694 }
695695 $output .= '</div>
696696 <div class="cleared"></div>
@@ -770,9 +770,9 @@
771771 $output .= '</div>
772772 <div class="action-left">';
773773 if( $system_gift_count > 4 ) {
774 - $output .= wfMsg( 'user-count-separator', "4", $system_gift_count );
 774+ $output .= "4 ".wfMsg('user-count-separator')." {$system_gift_count}";
775775 } else {
776 - $output .= wfMsg( 'user-count-separator', $system_gift_count, $system_gift_count );
 776+ $output .= "{$system_gift_count}&nbsp;".wfMsg('user-count-separator')."&nbsp;{$system_gift_count}";
777777 }
778778 $output .= "</div>
779779 <div class=\"cleared\"></div>
@@ -846,9 +846,9 @@
847847 $output .= '</div>
848848 <div class="action-left">';
849849 if( $total > 10 ) {
850 - $output .= wfMsg( 'user-count-separator', "10", $total );
 850+ $output .= "10 ".wfMsg('user-count-separator')." {$total}";
851851 } else if( $total > 0 ) {
852 - $output .= wfMsg( 'user-count-separator', $total, $total );
 852+ $output .= "{$total} ".wfMsg('user-count-separator')." {$total}";
853853 }
854854 $output .= '</div>
855855 <div class="cleared"></div>
@@ -939,9 +939,9 @@
940940 $output .= '</div>
941941 <div class="action-left">';
942942 if( $fanbox_count > 10 ) {
943 - $output .= wfMsg('user-count-separator', "10", $fanbox_count );
 943+ $output .= "10 ".wfMsg('user-count-separator')." {$fanbox_count}";
944944 } else {
945 - $output .= wfMsg( 'user-count-separator',$fanbox_count, $fanbox_count);
 945+ $output .= "{$fanbox_count} ".wfMsg('user-count-separator')." {$fanbox_count}";
946946 }
947947 $output .= '</div>
948948 <div class="cleared"></div>
Index: trunk/extensions/SocialProfile/UserProfile/UserProfile.i18n.php
@@ -16,7 +16,7 @@
1717 'populateuserprofiles' => 'Populate user profiles',
1818 'user-awards-title' => 'Awards',
1919 'user-gifts-title' => 'Gifts',
20 - 'user-count-separator' => '$1 of $2',
 20+ 'user-count-separator' => 'of',
2121 'user-view-all' => 'View all',
2222 'user-upload-image' => 'Upload image',
2323 'user-edit-this' => 'Edit this',

Follow-up revisions

RevisionCommit summaryAuthorDate
r46690* re-revert r46688 to r46264. The fixes are proper, as tested. See screenshot...siebrand22:26, 1 February 2009

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r46264* add plural support for 'user-profile-points'...siebrand16:07, 26 January 2009

Comments

#Comment by Siebrand (talk | contribs)   22:29, 1 February 2009
Screenshot

Partially reverted in r46688. Re-reverted in r46690. Also see screenshot.

Status & tagging log