Changeset 9765
- Timestamp:
- 04/17/2015 01:27:06 PM (10 years ago)
- Location:
- trunk/src
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-activity/bp-activity-template.php
r9751 r9765 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 -
trunk/src/bp-blogs/bp-blogs-template.php
r9471 r9765 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 -
trunk/src/bp-forums/bp-forums-template.php
r9515 r9765 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. … … 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 … … 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. … … 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 -
trunk/src/bp-groups/bp-groups-admin.php
r9665 r9765 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 bp_core_number_format( $current_page_start ), 1048 bp_core_number_format( $current_page_end ), 1049 bp_core_number_format( $query->total_users ) 1050 ); 1051 } 1048 1052 1049 1053 $pagination .= '<span class="bp-group-admin-pagination-viewing">' . $viewing_text . '</span>'; -
trunk/src/bp-groups/bp-groups-template.php
r9706 r9765 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. … … 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 … … 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. … … 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 … … 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. … … 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 … … 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 -
trunk/src/bp-members/bp-members-admin.php
r9759 r9765 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 } -
trunk/src/bp-members/bp-members-template.php
r9723 r9765 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 /** -
trunk/src/bp-messages/bp-messages-template.php
r9415 r9765 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 -
trunk/src/bp-notifications/bp-notifications-template.php
r9574 r9765 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 ); 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 } 1188 1193 1189 1194 /** -
trunk/src/bp-templates/bp-legacy/buddypress/members/single/groups/invites.php
r9604 r9765 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">
Note: See TracChangeset
for help on using the changeset viewer.