Changeset 12589
- Timestamp:
- 03/28/2020 01:37:18 PM (4 years ago)
- Location:
- trunk/src/bp-friends
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-friends/bp-friends-activity.php
r12393 r12589 142 142 $friend_link = bp_core_get_userlink( $activity->secondary_item_id ); 143 143 144 /* translators: 1: the initiator user link. 2: the friend user link. */ 144 145 $action = sprintf( esc_html__( '%1$s and %2$s are now friends', 'buddypress' ), $initiator_link, $friend_link ); 145 146 … … 176 177 $friend_link = bp_core_get_userlink( $activity->secondary_item_id ); 177 178 179 /* translators: 1: the initiator user link. 2: the friend user link. */ 178 180 $action = sprintf( esc_html__( '%1$s and %2$s are now friends', 'buddypress' ), $initiator_link, $friend_link ); 179 181 -
trunk/src/bp-friends/bp-friends-notifications.php
r12087 r12589 39 39 // Set up the string and the filter. 40 40 if ( (int) $total_items > 1 ) { 41 /* translators: %d: the number of friends */ 41 42 $text = sprintf( __( '%d friends accepted your friendship requests', 'buddypress' ), (int) $total_items ); 42 43 $amount = 'multiple'; 43 44 } else { 45 /* translators: %s: friend name */ 44 46 $text = sprintf( __( '%s accepted your friendship request', 'buddypress' ), bp_core_get_user_displayname( $item_id ) ); 45 47 $amount = 'single'; … … 55 57 // Set up the string and the filter. 56 58 if ( (int) $total_items > 1 ) { 59 /* translators: %d: the number of pending requests */ 57 60 $text = sprintf( __( 'You have %d pending friendship requests', 'buddypress' ), (int) $total_items ); 58 61 $amount = 'multiple'; 59 62 } else { 63 /* translators: %s: friend name */ 60 64 $text = sprintf( __( 'You have a friendship request from %s', 'buddypress' ), bp_core_get_user_displayname( $item_id ) ); 61 65 $amount = 'single'; -
trunk/src/bp-friends/bp-friends-template.php
r11598 r12589 82 82 83 83 <div class="info-group"> 84 <h4><?php bp_word_or_name( __( "My Friends", 'buddypress' ), __( "%s's Friends", 'buddypress' ) ) ?> (<?php echo BP_Friends_Friendship::total_friend_count( bp_displayed_user_id() ) ?>) <span><a href="<?php echo trailingslashit( bp_displayed_user_domain() . bp_get_friends_slug() ) ?>"><?php _e('See All', 'buddypress') ?></a></span></h4> 84 <h4> 85 <?php 86 /* translators: %s: member name */ 87 bp_word_or_name( __( "My Friends", 'buddypress' ), __( "%s's Friends", 'buddypress' ) ); 88 ?> 89 90 (<?php echo BP_Friends_Friendship::total_friend_count( bp_displayed_user_id() ); ?>) 91 92 <span> 93 <a href="<?php echo trailingslashit( bp_displayed_user_domain() . bp_get_friends_slug() ) ?>"> 94 <?php esc_html_e( 'See All', 'buddypress' ) ?> 95 </a> 96 </span> 97 </h4> 85 98 86 99 <?php if ( $friend_ids ) { ?> … … 102 115 103 116 <div id="message" class="info"> 104 <p><?php bp_word_or_name( __( "You haven't added any friend connections yet.", 'buddypress' ), __( "%s hasn't created any friend connections yet.", 'buddypress' ) ) ?></p> 117 <p> 118 <?php 119 /* translators: %s: member name */ 120 bp_word_or_name( __( "You haven't added any friend connections yet.", 'buddypress' ), __( "%s hasn't created any friend connections yet.", 'buddypress' ) ); 121 ?> 122 </p> 105 123 </div> 106 124 … … 235 253 global $members_template; 236 254 237 if ( 1 == (int) $members_template->member->total_friend_count ) { 238 239 /** 240 * Filters text used to denote total friend count. 241 * 242 * @since 1.2.0 243 * 244 * @param string $value String of the form "x friends". 245 * @param int $value Total friend count for current member in the loop. 246 */ 247 return apply_filters( 'bp_get_member_total_friend_count', sprintf( __( '%d friend', 'buddypress' ), (int) $members_template->member->total_friend_count ) ); 248 } else { 249 250 /** This filter is documented in bp-friends/bp-friends-template.php */ 251 return apply_filters( 'bp_get_member_total_friend_count', sprintf( __( '%d friends', 'buddypress' ), (int) $members_template->member->total_friend_count ) ); 252 } 255 $total_friend_count = (int) $members_template->member->total_friend_count; 256 257 /** 258 * Filters text used to denote total friend count. 259 * 260 * @since 1.2.0 261 * 262 * @param string $value String of the form "x friends". 263 * @param int $value Total friend count for current member in the loop. 264 */ 265 return apply_filters( 266 'bp_get_member_total_friend_count', 267 /* translators: %d: total friend count */ 268 sprintf( _n( '%d friend', '%d friends', $total_friend_count, 'buddypress' ), number_format_i18n( $total_friend_count ) ) 269 ); 253 270 } 254 271 … … 717 734 718 735 // If friends exist, show some formatted output. 719 $r['output'] = $r['before'] . sprintf( _n( '%s friend', '%s friends', $r['friends'], 'buddypress' ), '<strong>' . $r['friends'] . '</strong>' ) . $r['after']; 736 $r['output'] = $r['before']; 737 738 /* translators: %d: total friend count */ 739 $r['output'] .= sprintf( _n( '%d friend', '%d friends', $r['friends'], 'buddypress' ), '<strong>' . number_format_i18n( $r['friends'] ) . '</strong>' ); 740 $r['output'] .= $r['after']; 720 741 } 721 742 } -
trunk/src/bp-friends/classes/class-bp-friends-component.php
r12087 r12589 297 297 'item_id' => bp_displayed_user_id(), 298 298 'type' => 'thumb', 299 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_displayed_user_fullname() ) 299 'alt' => sprintf( 300 /* translators: %s: member name */ 301 __( 'Profile picture of %s', 'buddypress' ), 302 bp_get_displayed_user_fullname() 303 ), 300 304 ) ); 301 305 $bp->bp_options_title = bp_get_displayed_user_fullname();
Note: See TracChangeset
for help on using the changeset viewer.