Skip to:
Content

BuddyPress.org

Changeset 7513


Ignore:
Timestamp:
11/05/2013 02:04:59 PM (11 years ago)
Author:
boonebgorges
Message:

Don't double number-format directory pagination counts

By running total item counts through number_format_i18n() twice, certain
number formats were getting messed up.

Fixes #5228

Props sgr33n

Location:
trunk
Files:
5 edited

Legend:

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

    r7487 r7513  
    692692        $total     = bp_core_number_format( $activities_template->total_activity_count );
    693693
    694         return sprintf( _n( 'Viewing item %1$s to %2$s (of %3$s item)', 'Viewing item %1$s to %2$s (of %3$s items)', $total, 'buddypress' ), $from_num, $to_num, number_format_i18n( $total ) );
     694        return sprintf( _n( 'Viewing item %1$s to %2$s (of %3$s item)', 'Viewing item %1$s to %2$s (of %3$s items)', $total, 'buddypress' ), $from_num, $to_num, $total );
    695695    }
    696696
  • trunk/bp-blogs/bp-blogs-template.php

    r7439 r7513  
    421421    $total     = bp_core_number_format( $blogs_template->total_blog_count );
    422422
    423     echo sprintf( _n( 'Viewing site %1$s to %2$s (of %3$s site)', 'Viewing site %1$s to %2$s (of %3$s sites)', $total, 'buddypress' ), $from_num, $to_num, number_format_i18n( $total ) );
     423    echo sprintf( _n( 'Viewing site %1$s to %2$s (of %3$s site)', 'Viewing site %1$s to %2$s (of %3$s sites)', $total, 'buddypress' ), $from_num, $to_num, $total );
    424424}
    425425
  • trunk/bp-forums/bp-forums-template.php

    r7439 r7513  
    966966            $pag_filter = sprintf( __( ' matching tag "%s"', 'buddypress' ), $forum_template->search_terms );
    967967
    968         return apply_filters( 'bp_get_forum_pagination_count', sprintf( _n( 'Viewing topic %s to %s (of %d topic%s)', 'Viewing topic %s to %s (of %d total topics%s)', $total, 'buddypress' ), $from_num, $to_num, number_format_i18n( $total ), $pag_filter ), $from_num, $to_num, $total );
     968        return apply_filters( 'bp_get_forum_pagination_count', sprintf( _n( 'Viewing topic %s to %s (of %d topic%s)', 'Viewing topic %s to %s (of %d total topics%s)', $total, 'buddypress' ), $from_num, $to_num, $total, $pag_filter ), $from_num, $to_num, $total );
    969969    }
    970970
     
    13061306    $total = bp_core_number_format( $topic_template->total_post_count );
    13071307
    1308     echo apply_filters( 'bp_the_topic_pagination_count', sprintf( _n( 'Viewing post %1$s to %2$s (%3$s post)', 'Viewing post %1$s to %2$s (%3$s total posts)', $total, 'buddypress' ), $from_num, $to_num, number_format_i18n( $total ) ), $from_num, $to_num, $total );
     1308    echo apply_filters( 'bp_the_topic_pagination_count', sprintf( _n( 'Viewing post %1$s to %2$s (%3$s post)', 'Viewing post %1$s to %2$s (%3$s total posts)', $total, 'buddypress' ), $from_num, $to_num, $total ), $from_num, $to_num, $total );
    13091309}
    13101310
  • trunk/bp-groups/bp-groups-template.php

    r7442 r7513  
    930930        $total     = bp_core_number_format( $groups_template->total_group_count );
    931931
    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 );
     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, $total ), $from_num, $to_num, $total );
    933933    }
    934934
     
    21692169        $total = bp_core_number_format( $members_template->total_member_count );
    21702170
    2171         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 );
     2171        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, $total ), $from_num, $to_num, $total );
    21722172    }
    21732173
  • trunk/bp-members/bp-members-template.php

    r7439 r7513  
    345345
    346346        if ( 'active' == $members_template->type )
    347             $pag = sprintf( _n( 'Viewing member %1$s to %2$s (of %3$s active member)', 'Viewing member %1$s to %2$s (of %3$s active members)', $total, 'buddypress' ), $from_num, $to_num, number_format_i18n( $total ) );
     347            $pag = sprintf( _n( 'Viewing member %1$s to %2$s (of %3$s active member)', 'Viewing member %1$s to %2$s (of %3$s active members)', $total, 'buddypress' ), $from_num, $to_num, $total );
    348348        else if ( 'popular' == $members_template->type )
    349             $pag = sprintf( _n( 'Viewing member %1$s to %2$s (of %3$s member with friends)', 'Viewing member %1$s to %2$s (of %3$s members with friends)', $total, 'buddypress' ), $from_num, $to_num, number_format_i18n( $total ) );
     349            $pag = sprintf( _n( 'Viewing member %1$s to %2$s (of %3$s member with friends)', 'Viewing member %1$s to %2$s (of %3$s members with friends)', $total, 'buddypress' ), $from_num, $to_num, $total );
    350350        else if ( 'online' == $members_template->type )
    351             $pag = sprintf( _n( 'Viewing member %1$s to %2$s (of %3$s member online)', 'Viewing member %1$s to %2$s (of %3$s members online)', $total, 'buddypress' ), $from_num, $to_num, number_format_i18n( $total ) );
     351            $pag = sprintf( _n( 'Viewing member %1$s to %2$s (of %3$s member online)', 'Viewing member %1$s to %2$s (of %3$s members online)', $total, 'buddypress' ), $from_num, $to_num, $total );
    352352        else
    353             $pag = sprintf( _n( 'Viewing member %1$s to %2$s (of %3$s member)', 'Viewing member %1$s to %2$s (of %3$s members)', $total, 'buddypress' ), $from_num, $to_num, number_format_i18n( $total ) );
     353            $pag = sprintf( _n( 'Viewing member %1$s to %2$s (of %3$s member)', 'Viewing member %1$s to %2$s (of %3$s members)', $total, 'buddypress' ), $from_num, $to_num, $total );
    354354
    355355        return apply_filters( 'bp_members_pagination_count', $pag );
Note: See TracChangeset for help on using the changeset viewer.