Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
10/17/2013 04:24:33 PM (12 years ago)
Author:
boonebgorges
Message:

Improved plural i18n for pagination links

Cases where there is only one page of results will now read, eg, "...of 1
member" instead of "...of 1 members".

Where the pagination links are put through apply_filters(), this changeset
also adds the passing of the $from_num, $to_num, and $total values to the
filter.

Fixes #5107

Props imath

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/bp-groups/bp-groups-template.php

    r7350 r7439  
    930930        $total     = bp_core_number_format( $groups_template->total_group_count );
    931931
    932         return apply_filters( 'bp_get_groups_pagination_count', sprintf( __( 'Viewing group %1$s to %2$s (of %3$s groups)', 'buddypress' ), $from_num, $to_num, $total ) );
     932        return apply_filters( 'bp_get_groups_pagination_count', sprintf( _n( 'Viewing group %1$s to %2$s (of %3$s group)', 'Viewing group %1$s to %2$s (of %3$s groups)', $total, 'buddypress' ), $from_num, $to_num, number_format_i18n( $total ) ), $from_num, $to_num, $total );
    933933    }
    934934
     
    21512151        $total = bp_core_number_format( $members_template->total_member_count );
    21522152
    2153         return apply_filters( 'bp_get_group_member_pagination_count', sprintf( __( 'Viewing members %1$s to %2$s (of %3$s members)', 'buddypress' ), $from_num, $to_num, $total ) );
     2153        return apply_filters( 'bp_get_group_member_pagination_count', sprintf( _n( 'Viewing member %1$s to %2$s (of %3$s member)', 'Viewing members %1$s to %2$s (of %3$s members)', $total, 'buddypress' ), $from_num, $to_num, number_format_i18n( $total ) ), $from_num, $to_num, $total );
    21542154    }
    21552155
Note: See TracChangeset for help on using the changeset viewer.