Skip to:
Content

BuddyPress.org

Changeset 10675


Ignore:
Timestamp:
03/23/2016 02:44:16 PM (9 years ago)
Author:
boonebgorges
Message:

Remove markup from translatable strings when building Notifications nav items.

Props ramiy.
Fixes #6901.

File:
1 edited

Legend:

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

    r10652 r10675  
    126126            $count    = bp_notifications_get_unread_notification_count( bp_displayed_user_id() );
    127127            $class    = ( 0 === $count ) ? 'no-count' : 'count';
    128             $nav_name = sprintf( _x( 'Notifications <span class="%s">%s</span>', 'Profile screen nav', 'buddypress' ), esc_attr( $class ), bp_core_number_format( $count ) );
     128            $nav_name = sprintf(
     129                /* translators: %s: Unread notification count for the current user */
     130                _x( 'Notifications %s', 'Profile screen nav', 'buddypress' ),
     131                sprintf(
     132                    '<span class="%s">%s</span>',
     133                    esc_attr( $class ),
     134                    bp_core_number_format( $count )
     135                )
     136            );
    129137        } else {
    130138            $nav_name = _x( 'Notifications', 'Profile screen nav', 'buddypress' );
     
    189197            $count = bp_notifications_get_unread_notification_count( bp_loggedin_user_id() );
    190198            if ( ! empty( $count ) ) {
    191                 $title  = sprintf( _x( 'Notifications <span class="count">%s</span>', 'My Account Notification pending', 'buddypress' ), bp_core_number_format( $count ) );
    192                 $unread = sprintf( _x( 'Unread <span class="count">%s</span>',        'My Account Notification pending', 'buddypress' ), bp_core_number_format( $count ) );
     199                $title = sprintf(
     200                    /* translators: %s: Unread notification count for the current user */
     201                    _x( 'Notifications %s', 'My Account Notification pending', 'buddypress' ),
     202                    '<span class="count">' . bp_core_number_format( $count ) . '</span>'
     203                );
     204                $unread = sprintf(
     205                    /* translators: %s: Unread notification count for the current user */
     206                    _x( 'Unread %s', 'My Account Notification pending', 'buddypress' ),
     207                    '<span class="count">' . bp_core_number_format( $count ) . '</span>'
     208                );
    193209            } else {
    194210                $title  = _x( 'Notifications', 'My Account Notification',         'buddypress' );
Note: See TracChangeset for help on using the changeset viewer.