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/pluggable.php

    r45926 r45932  
    15411541                switch ( $comment->comment_type ) {
    15421542                        case 'trackback':
    1543                                 /* translators: %s: post title */
     1543                                /* translators: %s: Post title. */
    15441544                                $notify_message = sprintf( __( 'New trackback on your post "%s"' ), $post->post_title ) . "\r\n";
    1545                                 /* translators: 1: trackback/pingback website name, 2: website IP address, 3: website hostname */
     1545                                /* translators: 1: Trackback/pingback website name, 2: Website IP address, 3: Website hostname. */
    15461546                                $notify_message .= sprintf( __( 'Website: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
    1547                                 /* translators: %s: trackback/pingback/comment author URL */
     1547                                /* translators: %s: Trackback/pingback/comment author URL. */
    15481548                                $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
    1549                                 /* translators: %s: comment text */
     1549                                /* translators: %s: Comment text. */
    15501550                                $notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n";
    15511551                                $notify_message .= __( 'You can see all trackbacks on this post here:' ) . "\r\n";
    1552                                 /* translators: Trackback notification email subject. 1: Site title, 2: Post title */
     1552                                /* translators: Trackback notification email subject. 1: Site title, 2: Post title. */
    15531553                                $subject = sprintf( __( '[%1$s] Trackback: "%2$s"' ), $blogname, $post->post_title );
    15541554                                break;
    15551555                        case 'pingback':
    1556                                 /* translators: %s: post title */
     1556                                /* translators: %s: Post title. */
    15571557                                $notify_message = sprintf( __( 'New pingback on your post "%s"' ), $post->post_title ) . "\r\n";
    1558                                 /* translators: 1: trackback/pingback website name, 2: website IP address, 3: website hostname */
     1558                                /* translators: 1: Trackback/pingback website name, 2: Website IP address, 3: Website hostname. */
    15591559                                $notify_message .= sprintf( __( 'Website: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
    1560                                 /* translators: %s: trackback/pingback/comment author URL */
     1560                                /* translators: %s: Trackback/pingback/comment author URL. */
    15611561                                $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
    1562                                 /* translators: %s: comment text */
     1562                                /* translators: %s: Comment text. */
    15631563                                $notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n";
    15641564                                $notify_message .= __( 'You can see all pingbacks on this post here:' ) . "\r\n";
    1565                                 /* translators: Pingback notification email subject. 1: Site title, 2: Post title */
     1565                                /* translators: Pingback notification email subject. 1: Site title, 2: Post title. */
    15661566                                $subject = sprintf( __( '[%1$s] Pingback: "%2$s"' ), $blogname, $post->post_title );
    15671567                                break;
    15681568                        default: // Comments
    1569                                 /* translators: %s: post title */
     1569                                /* translators: %s: Post title. */
    15701570                                $notify_message = sprintf( __( 'New comment on your post "%s"' ), $post->post_title ) . "\r\n";
    1571                                 /* translators: 1: comment author's name, 2: comment author's IP address, 3: comment author's hostname */
     1571                                /* translators: 1: Comment author's name, 2: Comment author's IP address, 3: Comment author's hostname. */
    15721572                                $notify_message .= sprintf( __( 'Author: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
    1573                                 /* translators: %s: comment author email */
     1573                                /* translators: %s: Comment author email. */
    15741574                                $notify_message .= sprintf( __( 'Email: %s' ), $comment->comment_author_email ) . "\r\n";
    1575                                 /* translators: %s: trackback/pingback/comment author URL */
     1575                                /* translators: %s: Trackback/pingback/comment author URL. */
    15761576                                $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
    1577                                 /* translators: %s: comment text */
     1577                                /* translators: %s: Comment text. */
    15781578                                $notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n";
    15791579                                $notify_message .= __( 'You can see all comments on this post here:' ) . "\r\n";
    1580                                 /* translators: Comment notification email subject. 1: Site title, 2: Post title */
     1580                                /* translators: Comment notification email subject. 1: Site title, 2: Post title. */
    15811581                                $subject = sprintf( __( '[%1$s] Comment: "%2$s"' ), $blogname, $post->post_title );
    15821582                                break;
    15831583                }
    15841584                $notify_message .= get_permalink( $comment->comment_post_ID ) . "#comments\r\n\r\n";
    1585                 /* translators: %s: comment URL */
     1585                /* translators: %s: Comment URL. */
    15861586                $notify_message .= sprintf( __( 'Permalink: %s' ), get_comment_link( $comment ) ) . "\r\n";
    15871587
    15881588                if ( user_can( $post->post_author, 'edit_comment', $comment->comment_ID ) ) {
    15891589                        if ( EMPTY_TRASH_DAYS ) {
    1590                                 /* translators: Comment moderation. %s: Comment action URL */
     1590                                /* translators: Comment moderation. %s: Comment action URL. */
    15911591                                $notify_message .= sprintf( __( 'Trash it: %s' ), admin_url( "comment.php?action=trash&c={$comment->comment_ID}#wpbody-content" ) ) . "\r\n";
    15921592                        } else {
    1593                                 /* translators: Comment moderation. %s: Comment action URL */
     1593                                /* translators: Comment moderation. %s: Comment action URL. */
    15941594                                $notify_message .= sprintf( __( 'Delete it: %s' ), admin_url( "comment.php?action=delete&c={$comment->comment_ID}#wpbody-content" ) ) . "\r\n";
    15951595                        }
    1596                         /* translators: Comment moderation. %s: Comment action URL */
     1596                        /* translators: Comment moderation. %s: Comment action URL. */
    15971597                        $notify_message .= sprintf( __( 'Spam it: %s' ), admin_url( "comment.php?action=spam&c={$comment->comment_ID}#wpbody-content" ) ) . "\r\n";
    15981598                }
    … …  
    17211721                switch ( $comment->comment_type ) {
    17221722                        case 'trackback':
    1723                                 /* translators: %s: post title */
     1723                                /* translators: %s: Post title. */
    17241724                                $notify_message  = sprintf( __( 'A new trackback on the post "%s" is waiting for your approval' ), $post->post_title ) . "\r\n";
    17251725                                $notify_message .= get_permalink( $comment->comment_post_ID ) . "\r\n\r\n";
    1726                                 /* translators: 1: trackback/pingback website name, 2: website IP address, 3: website hostname */
     1726                                /* translators: 1: Trackback/pingback website name, 2: Website IP address, 3: Website hostname. */
    17271727                                $notify_message .= sprintf( __( 'Website: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
    1728                                 /* translators: %s: trackback/pingback/comment author URL */
     1728                                /* translators: %s: Trackback/pingback/comment author URL. */
    17291729                                $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
    17301730                                $notify_message .= __( 'Trackback excerpt: ' ) . "\r\n" . $comment_content . "\r\n\r\n";
    17311731                                break;
    17321732                        case 'pingback':
    1733                                 /* translators: %s: post title */
     1733                                /* translators: %s: Post title. */
    17341734                                $notify_message  = sprintf( __( 'A new pingback on the post "%s" is waiting for your approval' ), $post->post_title ) . "\r\n";
    17351735                                $notify_message .= get_permalink( $comment->comment_post_ID ) . "\r\n\r\n";
    1736                                 /* translators: 1: trackback/pingback website name, 2: website IP address, 3: website hostname */
     1736                                /* translators: 1: Trackback/pingback website name, 2: Website IP address, 3: Website hostname. */
    17371737                                $notify_message .= sprintf( __( 'Website: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
    1738                                 /* translators: %s: trackback/pingback/comment author URL */
     1738                                /* translators: %s: Trackback/pingback/comment author URL. */
    17391739                                $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
    17401740                                $notify_message .= __( 'Pingback excerpt: ' ) . "\r\n" . $comment_content . "\r\n\r\n";
    17411741                                break;
    17421742                        default: // Comments
    1743                                 /* translators: %s: post title */
     1743                                /* translators: %s: Post title. */
    17441744                                $notify_message  = sprintf( __( 'A new comment on the post "%s" is waiting for your approval' ), $post->post_title ) . "\r\n";
    17451745                                $notify_message .= get_permalink( $comment->comment_post_ID ) . "\r\n\r\n";
    1746                                 /* translators: 1: comment author's name, 2: comment author's IP address, 3: comment author's hostname */
     1746                                /* translators: 1: Comment author's name, 2: Comment author's IP address, 3: Comment author's hostname. */
    17471747                                $notify_message .= sprintf( __( 'Author: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
    1748                                 /* translators: %s: comment author email */
     1748                                /* translators: %s: Comment author email. */
    17491749                                $notify_message .= sprintf( __( 'Email: %s' ), $comment->comment_author_email ) . "\r\n";
    1750                                 /* translators: %s: trackback/pingback/comment author URL */
     1750                                /* translators: %s: Trackback/pingback/comment author URL. */
    17511751                                $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
    1752                                 /* translators: %s: comment text */
     1752                                /* translators: %s: Comment text. */
    17531753                                $notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n";
    17541754                                break;
    17551755                }
    17561756
    1757                 /* translators: Comment moderation. %s: Comment action URL */
     1757                /* translators: Comment moderation. %s: Comment action URL. */
    17581758                $notify_message .= sprintf( __( 'Approve it: %s' ), admin_url( "comment.php?action=approve&c={$comment_id}#wpbody-content" ) ) . "\r\n";
    17591759
    17601760                if ( EMPTY_TRASH_DAYS ) {
    1761                         /* translators: Comment moderation. %s: Comment action URL */
     1761                        /* translators: Comment moderation. %s: Comment action URL. */
    17621762                        $notify_message .= sprintf( __( 'Trash it: %s' ), admin_url( "comment.php?action=trash&c={$comment_id}#wpbody-content" ) ) . "\r\n";
    17631763                } else {
    1764                         /* translators: Comment moderation. %s: Comment action URL */
     1764                        /* translators: Comment moderation. %s: Comment action URL. */
    17651765                        $notify_message .= sprintf( __( 'Delete it: %s' ), admin_url( "comment.php?action=delete&c={$comment_id}#wpbody-content" ) ) . "\r\n";
    17661766                }
    17671767
    1768                 /* translators: Comment moderation. %s: Comment action URL */
     1768                /* translators: Comment moderation. %s: Comment action URL. */
    17691769                $notify_message .= sprintf( __( 'Spam it: %s' ), admin_url( "comment.php?action=spam&c={$comment_id}#wpbody-content" ) ) . "\r\n";
    17701770
    17711771                $notify_message .= sprintf(
    1772                         /* translators: Comment moderation. %s: Number of comments awaiting approval */
     1772                        /* translators: Comment moderation. %s: Number of comments awaiting approval. */
    17731773                        _n(
    17741774                                'Currently %s comment is waiting for approval. Please visit the moderation panel:',
    … …  
    17801780                $notify_message .= admin_url( 'edit-comments.php?comment_status=moderated#wpbody-content' ) . "\r\n";
    17811781
    1782                 /* translators: Comment moderation notification email subject. 1: Site name, 2: Post title */
     1782                /* translators: Comment moderation notification email subject. 1: Site title, 2: Post title. */
    17831783                $subject         = sprintf( __( '[%1$s] Please moderate: "%2$s"' ), $blogname, $post->post_title );
    17841784                $message_headers = '';
    … …  
    18481848                // but check to see if it's the admin whose password we're changing, and skip this
    18491849                if ( 0 !== strcasecmp( $user->user_email, get_option( 'admin_email' ) ) ) {
    1850                         /* translators: %s: user name */
     1850                        /* translators: %s: User name. */
    18511851                        $message = sprintf( __( 'Password changed for user: %s' ), $user->user_login ) . "\r\n";
    18521852                        // The blogname option is escaped with esc_html on the way into the database in sanitize_option
    … …  
    18561856                        $wp_password_change_notification_email = array(
    18571857                                'to'      => get_option( 'admin_email' ),
    1858                                 /* translators: Password change notification email subject. %s: Site title */
     1858                                /* translators: Password change notification email subject. %s: Site title. */
    18591859                                'subject' => __( '[%s] Password Changed' ),
    18601860                                'message' => $message,
    … …  
    19251925                        $switched_locale = switch_to_locale( get_locale() );
    19261926
    1927                         /* translators: %s: site title */
     1927                        /* translators: %s: Site title. */
    19281928                        $message = sprintf( __( 'New user registration on your site %s:' ), $blogname ) . "\r\n\r\n";
    1929                         /* translators: %s: user login */
     1929                        /* translators: %s: User login. */
    19301930                        $message .= sprintf( __( 'Username: %s' ), $user->user_login ) . "\r\n\r\n";
    1931                         /* translators: %s: user email address */
     1931                        /* translators: %s: User email address. */
    19321932                        $message .= sprintf( __( 'Email: %s' ), $user->user_email ) . "\r\n";
    19331933
    19341934                        $wp_new_user_notification_email_admin = array(
    19351935                                'to'      => get_option( 'admin_email' ),
    1936                                 /* translators: New user registration notification email subject. %s: Site title */
     1936                                /* translators: New user registration notification email subject. %s: Site title. */
    19371937                                'subject' => __( '[%s] New User Registration' ),
    19381938                                'message' => $message,
    … …  
    19821982                $switched_locale = switch_to_locale( get_user_locale( $user ) );
    19831983
    1984                 /* translators: %s: user login */
     1984                /* translators: %s: User login. */
    19851985                $message  = sprintf( __( 'Username: %s' ), $user->user_login ) . "\r\n\r\n";
    19861986                $message .= __( 'To set your password, visit the following address:' ) . "\r\n\r\n";
    … …  
    19911991                $wp_new_user_notification_email = array(
    19921992                        'to'      => $user->user_email,
    1993                         /* translators: Login details notification email subject. %s: Site title */
     1993                        /* translators: Login details notification email subject. %s: Site title. */
    19941994                        'subject' => __( '[%s] Login Details' ),
    19951995                        'message' => $message,
Note: See TracChangeset for help on using the changeset viewer.