Changeset 12587
- Timestamp:
- 03/28/2020 01:33:21 PM (4 years ago)
- Location:
- trunk/src/bp-blogs
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bp-blogs/bp-blogs-activity.php
r12544 r12587 128 128 $blog_name = bp_blogs_get_blogmeta( $activity->item_id, 'name' ); 129 129 130 $action = sprintf( esc_html__( '%s created the site %s', 'buddypress' ), bp_core_get_userlink( $activity->user_id ), '<a href="' . esc_url( $blog_url ) . '">' . esc_html( $blog_name ) . '</a>' ); 130 $action = sprintf( 131 /* translators: 1: the activity user link. 2: the blog link. */ 132 esc_html__( '%1$s created the site %2$s', 'buddypress' ), 133 bp_core_get_userlink( $activity->user_id ), 134 '<a href="' . esc_url( $blog_url ) . '">' . esc_html( $blog_name ) . '</a>' 135 ); 131 136 132 137 // Legacy filter - requires the BP_Blogs_Blog object. … … 231 236 232 237 // Build the 'post link' part of the activity action string. 233 $post_link 238 $post_link = '<a href="' . esc_url( $post_url ) . '">' . esc_html( $post_title ) . '</a>'; 234 239 235 240 $user_link = bp_core_get_userlink( $activity->user_id ); … … 237 242 // Build the complete activity action string. 238 243 if ( is_multisite() ) { 239 $action = sprintf( esc_html__( '%1$s wrote a new post, %2$s, on the site %3$s', 'buddypress' ), $user_link, $post_link, '<a href="' . esc_url( $blog_url ) . '">' . esc_html( $blog_name ) . '</a>' ); 244 $action = sprintf( 245 /* translators: 1: the activity user link. 2: the post link. 3: the blog link. */ 246 esc_html_x( '%1$s wrote a new post, %2$s, on the site %3$s', '`new_blog_post` activity action', 'buddypress' ), 247 $user_link, 248 $post_link, 249 '<a href="' . esc_url( $blog_url ) . '">' . esc_html( $blog_name ) . '</a>' 250 ); 240 251 } else { 241 $action = sprintf( esc_html__( '%1$s wrote a new post, %2$s', 'buddypress' ), $user_link, $post_link ); 252 $action = sprintf( 253 /* translators: 1: the activity user link. 2: the post link. */ 254 esc_html_x( '%1$s wrote a new post, %2$s', '`new_blog_post` activity action', 'buddypress' ), 255 $user_link, 256 $post_link 257 ); 242 258 } 243 259 … … 363 379 364 380 if ( is_multisite() ) { 365 $action = sprintf( esc_html__( '%1$s commented on the post, %2$s, on the site %3$s', 'buddypress' ), $user_link, $post_link, '<a href="' . esc_url( $blog_url ) . '">' . esc_html( $blog_name ) . '</a>' ); 381 $action = sprintf( 382 /* translators: 1: the activity user link. 2: the post link. 3: the blog link. */ 383 esc_html_x( '%1$s commented on the post, %2$s, on the site %3$s', '`new_blog_comment` activity action', 'buddypress' ), 384 $user_link, 385 $post_link, 386 '<a href="' . esc_url( $blog_url ) . '">' . esc_html( $blog_name ) . '</a>' 387 ); 366 388 } else { 367 $action = sprintf( esc_html__( '%1$s commented on the post, %2$s', 'buddypress' ), $user_link, $post_link ); 389 $action = sprintf( 390 /* translators: 1: the activity user link. 2: the post link. */ 391 esc_html_x( '%1$s commented on the post, %2$s', '`new_blog_comment` activity action', 'buddypress' ), 392 $user_link, 393 $post_link 394 ); 368 395 } 369 396 -
trunk/src/bp-blogs/bp-blogs-template.php
r12496 r12587 243 243 $message = __( 'Viewing 1 site', 'buddypress' ); 244 244 } else { 245 /* translators: 1: the site from number. 2: the site to number. 3: the total number of sites. */ 245 246 $message = sprintf( _n( 'Viewing %1$s - %2$s of %3$s site', 'Viewing %1$s - %2$s of %3$s sites', $blogs_template->total_blog_count, 'buddypress' ), $from_num, $to_num, $total ); 246 247 } … … 358 359 'class' => 'avatar', 359 360 'id' => false, 360 'alt' => sprintf( __( 'Profile picture of site author %s', 'buddypress' ), esc_attr( $author_displayname ) ), 361 'alt' => sprintf( 362 /* translators: %s: the author display name */ 363 __( 'Profile picture of site author %s', 'buddypress' ), 364 esc_attr( $author_displayname ) 365 ), 361 366 'no_grav' => false, 362 367 ) ); … … 649 654 // Backwards compatibility for anyone forcing a 'true' active_format. 650 655 if ( true === $r['active_format'] ) { 651 $r['active_format'] = __( 'active %s', 'buddypress' ); 656 /* translators: %s: human time diff of the last time the site was active. */ 657 $r['active_format'] = _x( 'active %s', 'last time the site was active', 'buddypress' ); 652 658 } 653 659 … … 714 720 * @param string $retval Title of the latest post. 715 721 */ 716 $retval = sprintf( __( 'Latest Post: %s', 'buddypress' ), '<a href="' . $blogs_template->blog->latest_post->guid . '">' . apply_filters( 'the_title', $retval ) . '</a>' ); 722 $retval = sprintf( 723 /* translators: %s: the title of the latest post */ 724 __( 'Latest Post: %s', 'buddypress' ), 725 '<a href="' . $blogs_template->blog->latest_post->guid . '">' . apply_filters( 'the_title', $retval ) . '</a>' 726 ); 717 727 } else { 718 728 … … 1252 1262 '%s %s', 1253 1263 sprintf( 1264 /* translators: %s: the link of the new site */ 1254 1265 __( '%s is your new site.', 'buddypress' ), 1255 1266 sprintf( '<a href="%s">%s</a>', esc_url( $blog_url ), esc_url( $blog_url ) ) … … 1310 1321 1311 1322 <ul class="content-header-nav"> 1312 <li<?php if ( bp_is_current_action( 'my-blogs' ) || !bp_current_action() ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_displayed_user_domain() . bp_get_blogs_slug() . '/my-blogs' ); ?>"><?php printf( __( "%s's Sites", 'buddypress' ), bp_get_displayed_user_fullname() ); ?></a></li> 1313 <li<?php if ( bp_is_current_action( 'recent-posts' ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_displayed_user_domain() . bp_get_blogs_slug() . '/recent-posts' ); ?>"><?php printf( __( "%s's Recent Posts", 'buddypress' ), bp_get_displayed_user_fullname() ); ?></a></li> 1314 <li<?php if ( bp_is_current_action( 'recent-comments' ) ) : ?> class="current"<?php endif; ?>><a href="<?php echo trailingslashit( bp_displayed_user_domain() . bp_get_blogs_slug() . '/recent-comments' ); ?>"><?php printf( __( "%s's Recent Comments", 'buddypress' ), bp_get_displayed_user_fullname() ); ?></a></li> 1323 <li<?php if ( bp_is_current_action( 'my-blogs' ) || !bp_current_action() ) : ?> class="current"<?php endif; ?>> 1324 <a href="<?php echo trailingslashit( bp_displayed_user_domain() . bp_get_blogs_slug() . '/my-blogs' ); ?>"> 1325 <?php 1326 /* translators: %s: the User Display Name */ 1327 printf( __( "%s's Sites", 'buddypress' ), bp_get_displayed_user_fullname() ); 1328 ?> 1329 </a> 1330 </li> 1331 <li<?php if ( bp_is_current_action( 'recent-posts' ) ) : ?> class="current"<?php endif; ?>> 1332 <a href="<?php echo trailingslashit( bp_displayed_user_domain() . bp_get_blogs_slug() . '/recent-posts' ); ?>"> 1333 <?php 1334 /* translators: %s: the User Display Name */ 1335 printf( __( "%s's Recent Posts", 'buddypress' ), bp_get_displayed_user_fullname() ); 1336 ?> 1337 </a> 1338 </li> 1339 <li<?php if ( bp_is_current_action( 'recent-comments' ) ) : ?> class="current"<?php endif; ?>> 1340 <a href="<?php echo trailingslashit( bp_displayed_user_domain() . bp_get_blogs_slug() . '/recent-comments' ); ?>"> 1341 <?php 1342 /* translators: %s: the User Display Name */ 1343 printf( __( "%s's Recent Comments", 'buddypress' ), bp_get_displayed_user_fullname() ); 1344 ?> 1345 </a> 1346 </li> 1315 1347 </ul> 1316 1348 … … 1556 1588 1557 1589 // If blogs exist, show some formatted output. 1558 $r['output'] = $r['before'] . sprintf( _n( '%s site', '%s sites', $r['blogs'], 'buddypress' ), '<strong>' . $r['blogs'] . '</strong>' ) . $r['after']; 1590 $r['output'] = $r['before']; 1591 1592 /* translators: %s: the number of blogs */ 1593 $r['output'] .= sprintf( _n( '%s site', '%s sites', $r['blogs'], 'buddypress' ), '<strong>' . $r['blogs'] . '</strong>' ); 1594 $r['output'] .= $r['after']; 1559 1595 } 1560 1596 } -
trunk/src/bp-blogs/classes/class-bp-blogs-component.php
r12173 r12587 330 330 'item_id' => bp_displayed_user_id(), 331 331 'type' => 'thumb', 332 'alt' => sprintf( __( 'Profile picture of %s', 'buddypress' ), bp_get_displayed_user_fullname() ) 332 'alt' => sprintf( 333 /* translators: %s: member name */ 334 _( 'Profile picture of %s', 'buddypress' ), 335 bp_get_displayed_user_fullname() 336 ), 333 337 ) ); 334 338 $bp->bp_options_title = bp_get_displayed_user_fullname();
Note: See TracChangeset
for help on using the changeset viewer.