Skip to:
Content

BuddyPress.org

Changeset 12587


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

BP Blogs: add missing /* translators */ comments

See #8260

Location:
trunk/src/bp-blogs
Files:
3 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
  • trunk/src/bp-blogs/bp-blogs-template.php

    r12496 r12587  
    243243        $message = __( 'Viewing 1 site', 'buddypress' );
    244244    } else {
     245        /* translators: 1: the site from number. 2: the site to number. 3: the total number of sites. */
    245246        $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 );
    246247    }
     
    358359            'class'   => 'avatar',
    359360            '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            ),
    361366            'no_grav' => false,
    362367        ) );
     
    649654        // Backwards compatibility for anyone forcing a 'true' active_format.
    650655        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' );
    652658        }
    653659
     
    714720                 * @param string $retval Title of the latest post.
    715721                 */
    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                );
    717727            } else {
    718728
     
    12521262            '%s %s',
    12531263            sprintf(
     1264                /* translators: %s: the link of the new site */
    12541265                __( '%s is your new site.', 'buddypress' ),
    12551266                sprintf( '<a href="%s">%s</a>', esc_url( $blog_url ), esc_url( $blog_url ) )
     
    13101321
    13111322    <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>
    13151347    </ul>
    13161348
     
    15561588
    15571589            // 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'];
    15591595        }
    15601596    }
  • trunk/src/bp-blogs/classes/class-bp-blogs-component.php

    r12173 r12587  
    330330                    'item_id' => bp_displayed_user_id(),
    331331                    '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                    ),
    333337                ) );
    334338                $bp->bp_options_title = bp_get_displayed_user_fullname();
Note: See TracChangeset for help on using the changeset viewer.