Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
02/07/2014 06:15:53 PM (11 years ago)
Author:
boonebgorges
Message:

Make the _get_profile_stats() output markup more consistent and translator-friendly

  • Apply <strong> tag in both plural and singular forms
  • Don't include <strong> tag in gettext string

Fixes #5383

Props danbp

File:
1 edited

Legend:

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

    r7764 r7828  
    580580        if ( ! empty( $r['user_id'] ) ) {
    581581
    582             // Get the user groups
     582            // Get the user's friends
    583583            if ( empty( $r['friends'] ) ) {
    584584                $r['friends'] = absint( friends_get_total_friend_count( $r['user_id'] ) );
    585585            }
    586586
    587             // If groups exist, show some formatted output
    588             $r['output'] = $r['before'] . sprintf( _n( '1 friend', '<strong>%s</strong> friends', $r['friends'], 'buddypress' ), $r['friends'] ) . $r['after'];
     587            // If friends exist, show some formatted output
     588            $r['output'] = $r['before'] . sprintf( _n( '%s friend', '%s friends', $r['friends'], 'buddypress' ), '<strong>' . $r['friends'] . '</strong>' ) . $r['after'];
    589589        }
    590590    }
Note: See TracChangeset for help on using the changeset viewer.