Skip to:
Content

BuddyPress.org


Ignore:
Timestamp:
03/28/2020 01:33:21 PM (5 years ago)
Author:
imath
Message:

BP Blogs: add missing /* translators */ comments

See #8260

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bp-blogs/bp-blogs-activity.php

    r12544 r12587  
    128128    $blog_name = bp_blogs_get_blogmeta( $activity->item_id, 'name' );
    129129
    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    );
    131136
    132137    // Legacy filter - requires the BP_Blogs_Blog object.
     
    231236
    232237    // Build the 'post link' part of the activity action string.
    233     $post_link  = '<a href="' . esc_url( $post_url ) . '">' . esc_html( $post_title ) . '</a>';
     238    $post_link = '<a href="' . esc_url( $post_url ) . '">' . esc_html( $post_title ) . '</a>';
    234239
    235240    $user_link = bp_core_get_userlink( $activity->user_id );
     
    237242    // Build the complete activity action string.
    238243    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        );
    240251    } 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        );
    242258    }
    243259
     
    363379
    364380    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        );
    366388    } 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        );
    368395    }
    369396
Note: See TracChangeset for help on using the changeset viewer.