Skip to:
Content

BuddyPress.org

Changeset 7828


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

Location:
trunk
Files:
3 edited

Legend:

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

    r7764 r7828  
    12281228        if ( ! empty( $r['user_id'] ) ) {
    12291229
    1230             // Get the user groups
     1230            // Get the user's blogs
    12311231            if ( empty( $r['blogs'] ) ) {
    12321232                $r['blogs'] = absint( bp_blogs_total_blogs_for_user( $r['user_id'] ) );
    12331233            }
    12341234
    1235             // If groups exist, show some formatted output
    1236             $r['output'] = $r['before'] . sprintf( _n( '1 site', '<strong>%s</strong> sites', $r['blogs'], 'buddypress' ), $r['blogs'] ) . $r['after'];
     1235            // If blogs exist, show some formatted output
     1236            $r['output'] = $r['before'] . sprintf( _n( '%s site', '%s sites', $r['blogs'], 'buddypress' ), '<strong>' . $r['blogs'] . '</strong>' ) . $r['after'];
    12371237        }
    12381238    }
  • 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    }
  • trunk/bp-groups/bp-groups-template.php

    r7764 r7828  
    32023202
    32033203            // If groups exist, show some formatted output
    3204             $r['output'] = $r['before'] . sprintf( _n( '1 group', '<strong>%s</strong> groups', $r['groups'], 'buddypress' ), $r['groups'] ) . $r['after'];
     3204            $r['output'] = $r['before'] . sprintf( _n( '%s group', '%s groups', $r['groups'], 'buddypress' ), '<strong>' . $r['groups'] . '</strong>' ) . $r['after'];
    32053205        }
    32063206    }
Note: See TracChangeset for help on using the changeset viewer.