Skip to:
Content

BuddyPress.org

Changeset 10679


Ignore:
Timestamp:
03/23/2016 03:04:39 PM (8 years ago)
Author:
boonebgorges
Message:

Remove markup from translatable strings when building Group nav items.

Props ramiy.
Fixes #6906.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-groups/classes/class-bp-groups-component.php

    r10652 r10679  
    436436        // Only grab count if we're on a user page.
    437437        if ( bp_is_user() ) {
    438             $class    = ( 0 === groups_total_groups_for_user( bp_displayed_user_id() ) ) ? 'no-count' : 'count';
    439             $nav_name = sprintf( _x( 'Groups <span class="%s">%s</span>', 'Group screen nav with counter', 'buddypress' ), esc_attr( $class ), bp_get_total_group_count_for_user() );
     438            $class = ( 0 === groups_total_groups_for_user( bp_displayed_user_id() ) ) ? 'no-count' : 'count';
     439
     440            $nav_name = sprintf(
     441                /* translators: %s: Group count for the current user */
     442                _x( 'Groups %s', 'Group screen nav with counter', 'buddypress' ),
     443                sprintf(
     444                    '<span class="%s">%s</span>',
     445                    esc_attr( $class ),
     446                    bp_get_total_group_count_for_user()
     447                )
     448            );
    440449        } else {
    441450            $nav_name = _x( 'Groups', 'Group screen nav without counter', 'buddypress' );
     
    711720
    712721            if ( ! empty( $count['total'] ) ) {
    713                 $title   = sprintf( _x( 'Groups <span class="count">%s</span>',          'My Account Groups nav',     'buddypress' ), bp_core_number_format( $count ) );
    714                 $pending = sprintf( _x( 'Pending Invites <span class="count">%s</span>', 'My Account Groups sub nav', 'buddypress' ), bp_core_number_format( $count ) );
     722                $title = sprintf(
     723                    /* translators: %s: Group invitation count for the current user */
     724                    _x( 'Groups %s', 'My Account Groups nav', 'buddypress' ),
     725                    '<span class="count">' . bp_core_number_format( $count ) . '</span>'
     726                );
     727
     728                $pending = sprintf(
     729                    /* translators: %s: Group invitation count for the current user */
     730                    _x( 'Pending Invites %s', 'My Account Groups sub nav', 'buddypress' ),
     731                    '<span class="count">' . bp_core_number_format( $count ) . '</span>'
     732                );
    715733            }
    716734
Note: See TracChangeset for help on using the changeset viewer.