Make WordPress Core


Ignore:
Timestamp:
09/01/2019 05:12:43 PM (7 years ago)
Author:
SergeyBiryukov
Message:

I18N: Improve translator comments.

  • Add missing translator comments.
  • Fix placement of some translator comments. Translator comments should be on the line directly above the line containing the translation function call for optimal compatibility with various .pot file generation tools. The CS auto-fixing, which changed some inconsistent function calls to multi-line function calls, is part of the reason why this was no longer the case for a select group of translator comments.

Includes minor code layout fixes.

Polyglots, rejoice! All WordPress core files now have translator comments for all strings with placeholders!

Props jrf, subrataemfluence, GaryJ, webdados, Dency, swissspidy, alvarogois, marcomartins, mihaiiceyro, vladwtz, niq1982, flipkeijzer, michielatyoast, chandrapatel, thrijith, joshuanoyce, FesoVik, tessak22, bhaktirajdev, cleancoded, dhavalkasvala, garrett-eclipse, bibliofille, socalchristina, priyankkpatel, 5hel2l2y, adamsilverstein, JeffPaul, pierlo, SergeyBiryukov.
Fixes #44360.

File:
1 edited

Legend:

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

    r45787 r45926  
    11521152                        __FUNCTION__,
    11531153                        '2.5.0',
    1154                         /* translators: %s: get_trackback_url() */
    11551154                        sprintf(
     1155                                /* translators: %s: get_trackback_url() */
    11561156                                __( 'Use %s instead if you do not want the value echoed.' ),
    11571157                                '<code>get_trackback_url()</code>'
     
    19351935        }
    19361936        if ( false === $replytext ) {
     1937                /* translators: %s: author of the comment being replied to */
    19371938                $replytext = __( 'Leave a Reply to %s' );
    19381939        }
     
    22932294        }
    22942295
    2295         $required_text = sprintf( ' ' . __( 'Required fields are marked %s' ), '<span class="required">*</span>' );
     2296        $required_text = sprintf(
     2297                /* translators: %s: an asterisk symbol (*) */
     2298                ' ' . __( 'Required fields are marked %s' ),
     2299                '<span class="required">*</span>'
     2300        );
    22962301
    22972302        /**
     
    23092314                'must_log_in'          => '<p class="must-log-in">' . sprintf(
    23102315                        /* translators: %s: login URL */
    2311                                                                         __( 'You must be <a href="%s">logged in</a> to post a comment.' ),
     2316                        __( 'You must be <a href="%s">logged in</a> to post a comment.' ),
    23122317                        wp_login_url( apply_filters( 'the_permalink', get_permalink( $post_id ), $post_id ) )
    23132318                ) . '</p>',
     
    23152320                'logged_in_as'         => '<p class="logged-in-as">' . sprintf(
    23162321                        /* translators: 1: edit user link, 2: accessibility text, 3: user name, 4: logout URL */
    2317                                                                         __( '<a href="%1$s" aria-label="%2$s">Logged in as %3$s</a>. <a href="%4$s">Log out?</a>' ),
     2322                        __( '<a href="%1$s" aria-label="%2$s">Logged in as %3$s</a>. <a href="%4$s">Log out?</a>' ),
    23182323                        get_edit_user_link(),
    23192324                        /* translators: %s: user name */
    2320                                                                         esc_attr( sprintf( __( 'Logged in as %s. Edit your profile.' ), $user_identity ) ),
     2325                        esc_attr( sprintf( __( 'Logged in as %s. Edit your profile.' ), $user_identity ) ),
    23212326                        $user_identity,
    23222327                        wp_logout_url( apply_filters( 'the_permalink', get_permalink( $post_id ), $post_id ) )
     
    23312336                'name_submit'          => 'submit',
    23322337                'title_reply'          => __( 'Leave a Reply' ),
     2338                /* translators: %s: author of the comment being replied to */
    23332339                'title_reply_to'       => __( 'Leave a Reply to %s' ),
    23342340                'title_reply_before'   => '<h3 id="reply-title" class="comment-reply-title">',
Note: See TracChangeset for help on using the changeset viewer.