Make WordPress Core

Changeset 38341


Ignore:
Timestamp:
08/23/2016 11:17:32 PM (9 years ago)
Author:
SergeyBiryukov
Message:

I18N: Add translator comments for strings in wp-includes/author-template.php.

Props ramiy.
Fixes #37795.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/author-template.php

    r37985 r38341  
    189189function get_the_author_link() {
    190190    if ( get_the_author_meta('url') ) {
    191         return '<a href="' . esc_url( get_the_author_meta('url') ) . '" title="' . esc_attr( sprintf(__("Visit %s&#8217;s website"), get_the_author()) ) . '" rel="author external">' . get_the_author() . '</a>';
     191        return sprintf( '<a href="%1$s" title="%2$s" rel="author external">%3$s</a>',
     192            esc_url( get_the_author_meta('url') ),
     193            /* translators: %s: author's display name */
     194            esc_attr( sprintf( __( 'Visit %s&#8217;s website' ), get_the_author() ) ),
     195            get_the_author()
     196        );
    192197    } else {
    193198        return get_the_author();
     
    251256    }
    252257
    253     $link = sprintf(
    254         '<a href="%1$s" title="%2$s" rel="author">%3$s</a>',
     258    $link = sprintf( '<a href="%1$s" title="%2$s" rel="author">%3$s</a>',
    255259        esc_url( get_author_posts_url( $authordata->ID, $authordata->user_nicename ) ),
     260        /* translators: %s: author's display name */
    256261        esc_attr( sprintf( __( 'Posts by %s' ), get_the_author() ) ),
    257262        get_the_author()
     
    413418        }
    414419
    415         $link = '<a href="' . get_author_posts_url( $author->ID, $author->user_nicename ) . '" title="' . esc_attr( sprintf(__("Posts by %s"), $author->display_name) ) . '">' . $name . '</a>';
     420        $link = sprintf( '<a href="%1$s" title="%2$s">%3$s</a>',
     421            get_author_posts_url( $author->ID, $author->user_nicename ),
     422            /* translators: %s: author's display name */
     423            esc_attr( sprintf( __( 'Posts by %s' ), $author->display_name ) ),
     424            $name
     425        );
    416426
    417427        if ( ! empty( $args['feed_image'] ) || ! empty( $args['feed'] ) ) {
Note: See TracChangeset for help on using the changeset viewer.