Skip to:
Content

BuddyPress.org


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

Remove markup from translatable strings when building Messages nav items.

Props ramiy.
Fixes #6904.

File:
1 edited

Legend:

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

    r10652 r10678  
    150150            $count    = bp_get_total_unread_messages_count();
    151151            $class    = ( 0 === $count ) ? 'no-count' : 'count';
    152             $nav_name = sprintf( __( 'Messages <span class="%s">%s</span>', 'buddypress' ), esc_attr( $class ), bp_core_number_format( $count ) );
     152            $nav_name = sprintf(
     153                /* translators: %s: Unread message count for the current user */
     154                __( 'Messages %s', 'buddypress' ),
     155                sprintf(
     156                    '<span class="%s">%s</span>',
     157                    esc_attr( $class ),
     158                    bp_core_number_format( $count )
     159                )
     160            );
    153161        } else {
    154162            $nav_name = __( 'Messages', 'buddypress' );
     
    240248            $count = messages_get_unread_count();
    241249            if ( !empty( $count ) ) {
    242                 $title = sprintf( __( 'Messages <span class="count">%s</span>', 'buddypress' ), bp_core_number_format( $count ) );
    243                 $inbox = sprintf( __( 'Inbox <span class="count">%s</span>',    'buddypress' ), bp_core_number_format( $count ) );
     250                $title = sprintf(
     251                    /* translators: %s: Unread message count for the current user */
     252                    __( 'Messages %s', 'buddypress' ),
     253                    '<span class="count">' . bp_core_number_format( $count ) . '</span>'
     254                );
     255                $inbox = sprintf(
     256                    /* translators: %s: Unread message count for the current user */
     257                    __( 'Inbox %s', 'buddypress' ),
     258                    '<span class="count">' . bp_core_number_format( $count ) . '</span>'
     259                );
    244260            } else {
    245261                $title = __( 'Messages', 'buddypress' );
Note: See TracChangeset for help on using the changeset viewer.