Ticket #6368: 6368.2.diff
File 6368.2.diff, 18.7 KB (added by , 10 years ago) |
---|
-
src/bp-activity/bp-activity-template.php
847 847 $to_num = bp_core_number_format( ( $start_num + ( $activities_template->pag_num - 1 ) > $activities_template->total_activity_count ) ? $activities_template->total_activity_count : $start_num + ( $activities_template->pag_num - 1 ) ); 848 848 $total = bp_core_number_format( $activities_template->total_activity_count ); 849 849 850 return sprintf( _n( 'Viewing 1 item', 'Viewing %1$s - %2$s of %3$s items', $total, 'buddypress' ), $from_num, $to_num, $total ); 850 if ( 1 == $activities_template->total_activity_count ) { 851 $message = __( 'Viewing 1 item', 'buddypress' ); 852 } else { 853 $message = sprintf( _n( 'Viewing %1$s - %2$s of %3$s item', 'Viewing %1$s - %2$s of %3$s items', $activities_template->total_activity_count, 'buddypress' ), $from_num, $to_num, $total ); 854 } 855 856 return $message; 851 857 } 852 858 853 859 /** -
src/bp-blogs/bp-blogs-template.php
472 472 $to_num = bp_core_number_format( ( $start_num + ( $blogs_template->pag_num - 1 ) > $blogs_template->total_blog_count ) ? $blogs_template->total_blog_count : $start_num + ( $blogs_template->pag_num - 1 ) ); 473 473 $total = bp_core_number_format( $blogs_template->total_blog_count ); 474 474 475 echo sprintf( _n( 'Viewing 1 site', 'Viewing %1$s - %2$s of %3$s sites', $total, 'buddypress' ), $from_num, $to_num, $total ); 475 if ( 1 == $blogs_template->total_blog_count ) { 476 $message = __( 'Viewing 1 site', 'buddypress' ); 477 } else { 478 $message = sprintf( _n( 'Viewing %1$s - %2$s of %3$s site', 'Viewing %1$s - %2$s of %3$s sites', $blogs_template->total_blog_count, 'buddypress' ), $from_num, $to_num, $total ); 479 } 480 481 echo $message; 476 482 } 477 483 478 484 /** -
src/bp-forums/bp-forums-template.php
1878 1878 if ( 'tags' == $forum_template->type && !empty( $forum_template->search_terms ) ) 1879 1879 $pag_filter = sprintf( __( ' matching tag "%s"', 'buddypress' ), $forum_template->search_terms ); 1880 1880 1881 if ( 1 == $forum_template->total_topic_count ) { 1882 $message = __( 'Viewing 1 topic', 'buddypress' ); 1883 } else { 1884 $message = sprintf( _n( 'Viewing %1$s - %2$s of %3$s topic', 'Viewing %1$s - %2$s of %3$s topics', (int) $forum_template->total_topic_count, 'buddypress' ), $from_num, $to_num, $total, $pag_filter ) 1885 } 1886 1881 1887 /** 1882 1888 * Filters the pagination count for the current topic list. 1883 1889 * … … 1888 1894 * @param string $to_num High end count in the view. 1889 1895 * @param string $total Total count of topics found. 1890 1896 */ 1891 return apply_filters( 'bp_get_forum_pagination_count', sprintf( _n( 'Viewing 1 topic', 'Viewing %1$s - %2$s of %3$s topics', (int) $forum_template->total_topic_count, 'buddypress' ), $from_num, $to_num, $total, $pag_filter ), $from_num, $to_num, $total );1897 return apply_filters( 'bp_get_forum_pagination_count', $message, $from_num, $to_num, $total ); 1892 1898 } 1893 1899 1894 1900 /** … … 2622 2628 $to_num = bp_core_number_format( ( $start_num + ( $topic_template->pag_num - 1 ) > $topic_template->total_post_count ) ? $topic_template->total_post_count : $start_num + ( $topic_template->pag_num - 1 ) ); 2623 2629 $total = bp_core_number_format( $topic_template->total_post_count ); 2624 2630 2631 if ( 1 == $topic_template->total_post_count ) { 2632 $message = __( 'Viewing 1 post', 'buddypress' ); 2633 } else { 2634 $message = sprintf( _n( 'Viewing %1$s - %2$s of %3$s post', 'Viewing %1$s - %2$s of %3$s posts', (int) $topic_template->total_post_count, 'buddypress' ), $from_num, $to_num, $total ) 2635 } 2636 2625 2637 /** 2626 2638 * Filters the pagination count for the current topic page. 2627 2639 * … … 2632 2644 * @param string $to_num High end count in the view. 2633 2645 * @param string $total Total count of topics found. 2634 2646 */ 2635 echo apply_filters( 'bp_the_topic_pagination_count', sprintf( _n( 'Viewing 1 post', 'Viewing %1$s - %2$s of %3$s posts', (int) $topic_template->total_post_count, 'buddypress' ), $from_num, $to_num, $total ), $from_num, $to_num, $total );2647 echo apply_filters( 'bp_the_topic_pagination_count', $message, $from_num, $to_num, $total ); 2636 2648 } 2637 2649 2638 2650 /** -
src/bp-groups/bp-groups-admin.php
1039 1039 'current' => $page, 1040 1040 ) ); 1041 1041 1042 $viewing_text = sprintf( 1043 _n( 'Viewing 1 member', 'Viewing %1$s - %2$s of %3$s members', $query->total_users, 'buddypress' ), 1044 number_format_i18n( $current_page_start ), 1045 number_format_i18n( $current_page_end ), 1046 (int) $query->total_users 1047 ); 1042 if ( 1 == $query->total_users ) { 1043 $viewing_text = __( 'Viewing 1 member', 'buddypress' ); 1044 } else { 1045 $viewing_text = sprintf( 1046 _n( 'Viewing %1$s - %2$s of %3$s member', 'Viewing %1$s - %2$s of %3$s members', $query->total_users, 'buddypress' ), 1047 number_format_i18n( $current_page_start ), 1048 number_format_i18n( $current_page_end ), 1049 (int) $query->total_users 1050 ); 1051 } 1048 1052 1049 1053 $pagination .= '<span class="bp-group-admin-pagination-viewing">' . $viewing_text . '</span>'; 1050 1054 $pagination .= '<span class="bp-group-admin-pagination-links">' . $pag_links . '</span>'; -
src/bp-groups/bp-groups-template.php
1793 1793 $to_num = bp_core_number_format( ( $start_num + ( $groups_template->pag_num - 1 ) > $groups_template->total_group_count ) ? $groups_template->total_group_count : $start_num + ( $groups_template->pag_num - 1 ) ); 1794 1794 $total = bp_core_number_format( $groups_template->total_group_count ); 1795 1795 1796 if ( 1 == $groups_template->total_group_count ) { 1797 $message = __( 'Viewing 1 group', 'buddypress' ); 1798 } else { 1799 $message = sprintf( _n( 'Viewing %1$s - %2$s of %3$s group', 'Viewing %1$s - %2$s of %3$s groups', $groups_template->total_group_count, 'buddypress' ), $from_num, $to_num, $total ); 1800 } 1801 1796 1802 /** 1797 1803 * Filters the "Viewing x-y of z groups" pagination message. 1798 1804 * … … 1803 1809 * @param string $to_num Total amount for the high value in the range. 1804 1810 * @param string $total Total amount of groups found. 1805 1811 */ 1806 return apply_filters( 'bp_get_groups_pagination_count', sprintf( _n( 'Viewing 1 group', 'Viewing %1$s - %2$s of %3$s groups', $total, 'buddypress' ), $from_num, $to_num, $total ), $from_num, $to_num, $total );1812 return apply_filters( 'bp_get_groups_pagination_count', $message, $from_num, $to_num, $total ); 1807 1813 } 1808 1814 1809 1815 /** … … 4115 4121 $to_num = bp_core_number_format( ( $start_num + ( $members_template->pag_num - 1 ) > $members_template->total_member_count ) ? $members_template->total_member_count : $start_num + ( $members_template->pag_num - 1 ) ); 4116 4122 $total = bp_core_number_format( $members_template->total_member_count ); 4117 4123 4124 if ( 1 == $members_template->total_member_count ) { 4125 $message = __( 'Viewing 1 member', 'buddypress' ); 4126 } else { 4127 $message = sprintf( _n( 'Viewing %1$s - %2$s of %3$s member', 'Viewing %1$s - %2$s of %3$s groups', $members_template->total_member_count, 'buddypress' ), $from_num, $to_num, $total ); 4128 } 4129 4118 4130 /** 4119 4131 * Filters the "Viewing x-y of z members" pagination message. 4120 4132 * … … 4125 4137 * @param string $to_num Total amount for the high value in the range. 4126 4138 * @param string $total Total amount of members found. 4127 4139 */ 4128 return apply_filters( 'bp_get_group_member_pagination_count', sprintf( _n( 'Viewing 1 member', 'Viewing %1$s - %2$s of %3$s members', $total, 'buddypress' ), $from_num, $to_num, $total ), $from_num, $to_num, $total );4140 return apply_filters( 'bp_get_group_member_pagination_count', $message, $from_num, $to_num, $total ); 4129 4141 } 4130 4142 4131 4143 function bp_group_member_admin_pagination() { … … 5238 5250 $to_num = bp_core_number_format( ( $start_num + ( $requests_template->pag_num - 1 ) > $requests_template->total_request_count ) ? $requests_template->total_request_count : $start_num + ( $requests_template->pag_num - 1 ) ); 5239 5251 $total = bp_core_number_format( $requests_template->total_request_count ); 5240 5252 5253 if ( 1 == $requests_template->total_request_count ) { 5254 $message = __( 'Viewing 1 request', 'buddypress' ); 5255 } else { 5256 $message = sprintf( _n( 'Viewing %1$s - %2$s of %3$s request', 'Viewing %1$s - %2$s of %3$s requests', $requests_template->total_request_count, 'buddypress' ), $from_num, $to_num, $total ); 5257 } 5258 5241 5259 /** 5242 5260 * Filters pagination count text for group membership requests. 5243 5261 * … … 5245 5263 * 5246 5264 * @param string $value Pagination count text for group membership requests. 5247 5265 */ 5248 return apply_filters( 'bp_get_group_requests_pagination_count', sprintf( _n( 'Viewing 1 request', 'Viewing %1$s - %2$s of %3$s requests', $total, 'buddypress' ), $from_num, $to_num, $total ), $from_num, $to_num, $total );5266 return apply_filters( 'bp_get_group_requests_pagination_count', $message, $from_num, $to_num, $total ); 5249 5267 } 5250 5268 5251 5269 /** Group Invitations *********************************************************/ … … 5608 5626 $to_num = bp_core_number_format( ( $start_num + ( $invites_template->pag_num - 1 ) > $invites_template->total_invite_count ) ? $invites_template->total_invite_count : $start_num + ( $invites_template->pag_num - 1 ) ); 5609 5627 $total = bp_core_number_format( $invites_template->total_invite_count ); 5610 5628 5629 if ( 1 == $invites_template->total_invite_count ) { 5630 $message = __( 'Viewing 1 invitation', 'buddypress' ); 5631 } else { 5632 $message = sprintf( _n( 'Viewing %1$s - %2$s of %3$s invitation', 'Viewing %1$s - %2$s of %3$s invitations', $invites_template->total_invite_count, 'buddypress' ), $from_num, $to_num, $total ); 5633 } 5634 5611 5635 /** This filter is documented in bp-groups/bp-groups-template.php */ 5612 return apply_filters( 'bp_get_groups_pagination_count', sprintf( _n( 'Viewing 1 invitation', 'Viewing %1$s - %2$s of %3$s invitations', $total, 'buddypress' ), $from_num, $to_num, $total ), $from_num, $to_num, $total );5636 return apply_filters( 'bp_get_groups_pagination_count', $message, $from_num, $to_num, $total ); 5613 5637 } 5614 5638 5615 5639 /** Group RSS *****************************************************************/ -
src/bp-members/bp-members-admin.php
1894 1894 switch ( $action ) { 1895 1895 case 'delete' : 1896 1896 $header_text = __( 'Delete Pending Accounts', 'buddypress' ); 1897 $helper_text = _n( 'You are about to delete the following account:', 'You are about to delete the following accounts:', count( $signup_ids ), 'buddypress' ); 1897 if ( 1 == count( $signup_ids ) ) { 1898 $helper_text = __( 'You are about to delete the following account:', 'buddypress' ); 1899 } else { 1900 $helper_text = __( 'You are about to delete the following accounts:', 'buddypress' ); 1901 } 1898 1902 break; 1899 1903 1900 1904 case 'activate' : 1901 1905 $header_text = __( 'Activate Pending Accounts', 'buddypress' ); 1902 $helper_text = _n( 'You are about to activate the following account:', 'You are about to activate the following accounts:', count( $signup_ids ), 'buddypress' ); 1906 if ( 1 == count( $signup_ids ) ) { 1907 $helper_text = __( 'You are about to activate the following account:', 'buddypress' ); 1908 } else { 1909 $helper_text = __( 'You are about to activate the following accounts:', 'buddypress' ); 1910 } 1903 1911 break; 1904 1912 1905 1913 case 'resend' : 1906 1914 $header_text = __( 'Resend Activation Emails', 'buddypress' ); 1907 $helper_text = _n( 'You are about to resend an activation email to the following account:', 'You are about to resend activation emails to the following accounts:', count( $signup_ids ), 'buddypress' ); 1915 if ( 1 == count( $signup_ids ) ) { 1916 $helper_text = __( 'You are about to resend an activation email to the following account:', 'buddypress' ); 1917 } else { 1918 $helper_text = __( 'You are about to resend an activation email to the following accounts:', 'buddypress' ); 1919 } 1908 1920 break; 1909 1921 } 1910 1922 -
src/bp-members/bp-members-template.php
631 631 $to_num = bp_core_number_format( ( $start_num + ( $members_template->pag_num - 1 ) > $members_template->total_member_count ) ? $members_template->total_member_count : $start_num + ( $members_template->pag_num - 1 ) ); 632 632 $total = bp_core_number_format( $members_template->total_member_count ); 633 633 634 if ( 'active' == $members_template->type ) 635 $pag = sprintf( _n( 'Viewing 1 active member', 'Viewing %1$s - %2$s of %3$s active members', $members_template->total_member_count, 'buddypress' ), $from_num, $to_num, $total ); 636 elseif ( 'popular' == $members_template->type ) 637 $pag = sprintf( _n( 'Viewing 1 member with friends', 'Viewing %1$s - %2$s of %3$s members with friends', $members_template->total_member_count, 'buddypress' ), $from_num, $to_num, $total ); 638 elseif ( 'online' == $members_template->type ) 639 $pag = sprintf( _n( 'Viewing 1 online member', 'Viewing %1$s - %2$s of %3$s online members', $members_template->total_member_count, 'buddypress' ), $from_num, $to_num, $total ); 640 else 641 $pag = sprintf( _n( 'Viewing 1 member', 'Viewing %1$s - %2$s of %3$s members', $members_template->total_member_count, 'buddypress' ), $from_num, $to_num, $total ); 634 if ( 'active' == $members_template->type ) { 635 if ( 1 == $members_template->total_member_count ) { 636 $pag = __( 'Viewing 1 active member', 'buddypress' ); 637 } else { 638 $pag = sprintf( _n( 'Viewing %1$s - %2$s of %3$s active member', 'Viewing %1$s - %2$s of %3$s active members', $members_template->total_member_count, 'buddypress' ), $from_num, $to_num, $total ); 639 } 640 } elseif ( 'popular' == $members_template->type ) { 641 if ( 1 == $members_template->total_member_count ) { 642 $pag = __( 'Viewing 1 member with friends', 'buddypress' ); 643 } else { 644 $pag = sprintf( _n( 'Viewing %1$s - %2$s of %3$s member with friends', 'Viewing %1$s - %2$s of %3$s members with friends', $members_template->total_member_count, 'buddypress' ), $from_num, $to_num, $total ); 645 } 646 } elseif ( 'online' == $members_template->type ) { 647 if ( 1 == $members_template->total_member_count ) { 648 $pag = __( 'Viewing 1 online member', 'buddypress' ); 649 } else { 650 $pag = sprintf( _n( 'Viewing %1$s - %2$s of %3$s online member', 'Viewing %1$s - %2$s of %3$s online members', $members_template->total_member_count, 'buddypress' ), $from_num, $to_num, $total ); 651 } 652 } else { 653 if ( 1 == $members_template->total_member_count ) { 654 $pag = __( 'Viewing 1 member', 'buddypress' ); 655 } else { 656 $pag = sprintf( _n( 'Viewing %1$s - %2$s of %3$s member', 'Viewing %1$s - %2$s of %3$s members', $members_template->total_member_count, 'buddypress' ), $from_num, $to_num, $total ); 657 } 658 } 642 659 643 660 /** 644 661 * Filters the members pagination count. -
src/bp-messages/bp-messages-template.php
1086 1086 $to_num = bp_core_number_format( ( $start_num + ( $messages_template->pag_num - 1 ) > $messages_template->total_thread_count ) ? $messages_template->total_thread_count : $start_num + ( $messages_template->pag_num - 1 ) ); 1087 1087 $total = bp_core_number_format( $messages_template->total_thread_count ); 1088 1088 1089 echo sprintf( _n( 'Viewing 1 message', 'Viewing %1$s - %2$s of %3$s messages', $total, 'buddypress' ), $from_num, $to_num, number_format_i18n( $total ) ); 1089 if ( 1 == $messages_template->total_thread_count ) { 1090 $message = __( 'Viewing 1 message', 'buddypress' ); 1091 } else { 1092 $message = sprintf( _n( 'Viewing %1$s - %2$s of %3$s message', 'Viewing %1$s - %2$s of %3$s messages', $messages_template->total_thread_count, 'buddypress' ), $from_num, $to_num, $total ); 1093 } 1094 1095 echo $message; 1090 1096 } 1091 1097 1092 1098 /** -
src/bp-notifications/bp-notifications-template.php
1184 1184 $from_num = bp_core_number_format( $start_num ); 1185 1185 $to_num = bp_core_number_format( ( $start_num + ( $query_loop->pag_num - 1 ) > $query_loop->total_notification_count ) ? $query_loop->total_notification_count : $start_num + ( $query_loop->pag_num - 1 ) ); 1186 1186 $total = bp_core_number_format( $query_loop->total_notification_count ); 1187 $pag = sprintf( _n( 'Viewing 1 notification', 'Viewing %1$s - %2$s of %3$s notifications', $total, 'buddypress' ), $from_num, $to_num, $total );1188 1187 1188 if ( 1 == $query_loop->total_notification_count ) { 1189 $pag = __( 'Viewing 1 notification', 'buddypress' ); 1190 } else { 1191 $pag = sprintf( _n( 'Viewing %1$s - %2$s of %3$s notification', 'Viewing %1$s - %2$s of %3$s notifications', $query_loop->total_notification_count, 'buddypress' ), $from_num, $to_num, $total ); 1192 } 1193 1189 1194 /** 1190 1195 * Filters the pagination count for the current notification loop. 1191 1196 * -
src/bp-templates/bp-legacy/buddypress/members/single/groups/invites.php
11 11 <a href="<?php bp_group_permalink(); ?>"><?php bp_group_avatar( 'type=thumb&width=50&height=50' ); ?></a> 12 12 </div> 13 13 14 <h4><a href="<?php bp_group_permalink(); ?>"><?php bp_group_name(); ?></a><span class="small"> - <?php printf( _nx( ' 1member', '%d members', bp_get_group_total_members( false ),'Group member count', 'buddypress' ), bp_get_group_total_members( false ) ); ?></span></h4>14 <h4><a href="<?php bp_group_permalink(); ?>"><?php bp_group_name(); ?></a><span class="small"> - <?php printf( _nx( '%d member', '%d members', bp_get_group_total_members( false ),'Group member count', 'buddypress' ), bp_get_group_total_members( false ) ); ?></span></h4> 15 15 16 16 <p class="desc"> 17 17 <?php bp_group_description_excerpt(); ?>