Make WordPress Core


Ignore:
Timestamp:
09/03/2019 12:39:13 AM (7 years ago)
Author:
SergeyBiryukov
Message:

I18N: Capitalize translator comments consistently, add trailing punctuation.

Includes minor code layout fixes.

See #44360.

File:
1 edited

Legend:

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

    r45926 r45932  
    897897        if ( $number > 1 ) {
    898898                if ( false === $more ) {
    899                         /* translators: %s: number of comments */
     899                        /* translators: %s: Number of comments. */
    900900                        $output = sprintf( _n( '%s Comment', '%s Comments', $number ), number_format_i18n( $number ) );
    901901                } else {
    902902                        // % Comments
    903                         /* translators: If comment number in your language requires declension,
     903                        /*
     904                         * translators: If comment number in your language requires declension,
    904905                         * translate this to 'on'. Do not translate into your own language.
    905906                         */
     
    911912                                // Replace '% Comments' with a proper plural form
    912913                                if ( $text && ! preg_match( '/[0-9]+/', $text ) && false !== strpos( $more, '%' ) ) {
    913                                         /* translators: %s: number of comments */
     914                                        /* translators: %s: Number of comments. */
    914915                                        $new_text = _n( '%s Comment', '%s Comments', $number );
    915916                                        $new_text = trim( sprintf( $new_text, '' ) );
     
    15301531
    15311532        if ( false === $zero ) {
    1532                 /* translators: %s: post title */
     1533                /* translators: %s: Post title. */
    15331534                $zero = sprintf( __( 'No Comments<span class="screen-reader-text"> on %s</span>' ), $title );
    15341535        }
    15351536
    15361537        if ( false === $one ) {
    1537                 /* translators: %s: post title */
     1538                /* translators: %s: Post title. */
    15381539                $one = sprintf( __( '1 Comment<span class="screen-reader-text"> on %s</span>' ), $title );
    15391540        }
    15401541
    15411542        if ( false === $more ) {
    1542                 /* translators: 1: number of comments, 2: post title */
     1543                /* translators: 1: Number of comments, 2: Post title. */
    15431544                $more = _n( '%1$s Comment<span class="screen-reader-text"> on %2$s</span>', '%1$s Comments<span class="screen-reader-text"> on %2$s</span>', $number );
    15441545                $more = sprintf( $more, number_format_i18n( $number ), $title );
     
    15461547
    15471548        if ( false === $none ) {
    1548                 /* translators: %s: post title */
     1549                /* translators: %s: Post title. */
    15491550                $none = sprintf( __( 'Comments Off<span class="screen-reader-text"> on %s</span>' ), $title );
    15501551        }
     
    16291630                'respond_id'    => 'respond',
    16301631                'reply_text'    => __( 'Reply' ),
    1631                 /* translators: Comment reply button text. %s: Comment author name */
     1632                /* translators: Comment reply button text. %s: Comment author name. */
    16321633                'reply_to_text' => __( 'Reply to %s' ),
    16331634                'login_text'    => __( 'Log in to Reply' ),
     
    19351936        }
    19361937        if ( false === $replytext ) {
    1937                 /* translators: %s: author of the comment being replied to */
     1938                /* translators: %s: Author of the comment being replied to. */
    19381939                $replytext = __( 'Leave a Reply to %s' );
    19391940        }
     
    22952296
    22962297        $required_text = sprintf(
    2297                 /* translators: %s: an asterisk symbol (*) */
     2298                /* translators: %s: Asterisk symbol (*). */
    22982299                ' ' . __( 'Required fields are marked %s' ),
    22992300                '<span class="required">*</span>'
     
    23132314                /** This filter is documented in wp-includes/link-template.php */
    23142315                'must_log_in'          => '<p class="must-log-in">' . sprintf(
    2315                         /* translators: %s: login URL */
     2316                        /* translators: %s: Login URL. */
    23162317                        __( 'You must be <a href="%s">logged in</a> to post a comment.' ),
    23172318                        wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ), $post_id ) )
     
    23192320                /** This filter is documented in wp-includes/link-template.php */
    23202321                'logged_in_as'         => '<p class="logged-in-as">' . sprintf(
    2321                         /* translators: 1: edit user link, 2: accessibility text, 3: user name, 4: logout URL */
     2322                        /* translators: 1: Edit user link, 2: Accessibility text, 3: User name, 4: Logout URL. */
    23222323                        __( '<a href="%1$s" aria-label="%2$s">Logged in as %3$s</a>. <a href="%4$s">Log out?</a>' ),
    23232324                        get_edit_user_link(),
    2324                         /* translators: %s: user name */
     2325                        /* translators: %s: User name. */
    23252326                        esc_attr( sprintf( __( 'Logged in as %s. Edit your profile.' ), $user_identity ) ),
    23262327                        $user_identity,
     
    23362337                'name_submit'          => 'submit',
    23372338                'title_reply'          => __( 'Leave a Reply' ),
    2338                 /* translators: %s: author of the comment being replied to */
     2339                /* translators: %s: Author of the comment being replied to. */
    23392340                'title_reply_to'       => __( 'Leave a Reply to %s' ),
    23402341                'title_reply_before'   => '<h3 id="reply-title" class="comment-reply-title">',
Note: See TracChangeset for help on using the changeset viewer.