Skip to:
Content

BuddyPress.org

Changeset 8781


Ignore:
Timestamp:
08/10/2014 05:27:52 PM (10 years ago)
Author:
djpaul
Message:

Improve pagination label strings for all components

“Viewing 1 site” reads better than “Viewing site 1 to 1 (of 1 site)”,
regardless of the language you’re using.

Fixes #5767

Location:
trunk/src
Files:
7 edited

Legend:

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

    r8735 r8781  
    769769        $total     = bp_core_number_format( $activities_template->total_activity_count );
    770770
    771         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 );
     771        return sprintf( _n( 'Viewing 1 item', 'Viewing %1$s - %2$s of %3$s items', $total, 'buddypress' ), $from_num, $to_num, $total );
    772772    }
    773773
  • trunk/src/bp-blogs/bp-blogs-template.php

    r8760 r8781  
    427427    $total     = bp_core_number_format( $blogs_template->total_blog_count );
    428428
    429     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 );
     429    echo sprintf( _n( 'Viewing 1 site', 'Viewing %1$s - %2$s of %3$s sites', $total, 'buddypress' ), $from_num, $to_num, $total );
    430430}
    431431
  • trunk/src/bp-forums/bp-forums-template.php

    r8142 r8781  
    15251525            $pag_filter = sprintf( __( ' matching tag "%s"', 'buddypress' ), $forum_template->search_terms );
    15261526
    1527         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 );
     1527        return apply_filters( 'bp_get_forum_pagination_count', sprintf( _n( 'Viewing 1 topic', 'Viewing %1$s - %2$s of %3$s topics', $total, 'buddypress' ), $from_num, $to_num, $total, $pag_filter ), $from_num, $to_num, $total );
    15281528    }
    15291529
     
    21642164    $total = bp_core_number_format( $topic_template->total_post_count );
    21652165
    2166     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 );
     2166    echo apply_filters( 'bp_the_topic_pagination_count', sprintf( _n( 'Viewing 1 post', 'Viewing %1$s - %2$s of %3$s posts', $total, 'buddypress' ), $from_num, $to_num, $total ), $from_num, $to_num, $total );
    21672167}
    21682168
  • trunk/src/bp-groups/bp-groups-template.php

    r8752 r8781  
    10891089        $total     = bp_core_number_format( $groups_template->total_group_count );
    10901090
    1091         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 );
     1091        return apply_filters( 'bp_get_groups_pagination_count', sprintf( _n( 'Viewing 1', 'Viewing %1$s - %2$s of %3$s groups', $total, 'buddypress' ), $from_num, $to_num, $total ), $from_num, $to_num, $total );
    10921092    }
    10931093
     
    25872587        $total = bp_core_number_format( $members_template->total_member_count );
    25882588
    2589         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 );
     2589        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 );
    25902590    }
    25912591
     
    34653465        $total     = bp_core_number_format( $requests_template->total_request_count );
    34663466
    3467         return apply_filters( 'bp_get_group_requests_pagination_count', sprintf( _n( 'Viewing requests %1$s to %2$s (of %3$s request)', 'Viewing request %1$s to %2$s (of %3$s requests)', $total, 'buddypress' ), $from_num, $to_num, $total ), $from_num, $to_num, $total );
     3467        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 );
    34683468    }
    34693469
     
    37603760        $total     = bp_core_number_format( $invites_template->total_invite_count );
    37613761
    3762         return apply_filters( 'bp_get_groups_pagination_count', sprintf( _n( 'Viewing invitation %1$s to %2$s (of %3$s invitation)', 'Viewing invitation %1$s to %2$s (of %3$s invitations)', $total, 'buddypress' ), $from_num, $to_num, $total ), $from_num, $to_num, $total );
     3762        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 );
    37633763    }
    37643764
  • trunk/src/bp-members/bp-members-template.php

    r8748 r8781  
    514514
    515515        if ( 'active' == $members_template->type )
    516             $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)', $members_template->total_member_count, 'buddypress' ), $from_num, $to_num, $total );
     516            $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 );
    517517        else if ( 'popular' == $members_template->type )
    518             $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)', $members_template->total_member_count, 'buddypress' ), $from_num, $to_num, $total );
     518            $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 );
    519519        else if ( 'online' == $members_template->type )
    520             $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)', $members_template->total_member_count, 'buddypress' ), $from_num, $to_num, $total );
     520            $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 );
    521521        else
    522             $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)', $members_template->total_member_count, 'buddypress' ), $from_num, $to_num, $total );
     522            $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 );
    523523
    524524        return apply_filters( 'bp_members_pagination_count', $pag );
  • trunk/src/bp-messages/bp-messages-template.php

    r8742 r8781  
    718718    $total = bp_core_number_format( $messages_template->total_thread_count );
    719719
    720     echo sprintf( _n( 'Viewing message %1$s to %2$s (of %3$s message)', 'Viewing message %1$s to %2$s (of %3$s messages)', $total, 'buddypress' ), $from_num, $to_num, number_format_i18n( $total ) );
     720    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 ) );
    721721}
    722722
  • trunk/src/bp-notifications/bp-notifications-template.php

    r8761 r8781  
    991991        $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 ) );
    992992        $total      = bp_core_number_format( $query_loop->total_notification_count );
    993         $pag        = sprintf( _n( 'Viewing %1$s to %2$s (of %3$s notification)', 'Viewing %1$s to %2$s (of %3$s notifications)', $total, 'buddypress' ), $from_num, $to_num, $total );
     993        $pag        = sprintf( _n( 'Viewing 1 notification', 'Viewing %1$s - %2$s of %3$s notifications', $total, 'buddypress' ), $from_num, $to_num, $total );
    994994
    995995        return apply_filters( 'bp_notifications_pagination_count', $pag );
Note: See TracChangeset for help on using the changeset viewer.