Make WordPress Core


Ignore:
Timestamp:
03/11/2018 04:43:59 PM (7 years ago)
Author:
SergeyBiryukov
Message:

I18N: Use the actual placeholder instead of a number in translator comments if the corresponding string does not use numbered placeholders.

Add missing translator comments in WP_Theme_Install_List_Table and wp_notify_postauthor().
Add missing commas in some translator comments.

Fixes #43523.

File:
1 edited

Legend:

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

    r42710 r42827  
    15241524        switch ( $comment->comment_type ) {
    15251525            case 'trackback':
    1526                 /* translators: 1: Post title */
     1526                /* translators: %s: post title */
    15271527                $notify_message = sprintf( __( 'New trackback on your post "%s"' ), $post->post_title ) . "\r\n";
    1528                 /* translators: 1: Trackback/pingback website name, 2: website IP address, 3: website hostname */
     1528                /* translators: 1: trackback/pingback website name, 2: website IP address, 3: website hostname */
    15291529                $notify_message .= sprintf( __( 'Website: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
     1530                /* translators: %s: trackback/pingback/comment author URL */
    15301531                $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
     1532                /* translators: %s: comment text */
    15311533                $notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n";
    15321534                $notify_message .= __( 'You can see all trackbacks on this post here:' ) . "\r\n";
     
    15351537                break;
    15361538            case 'pingback':
    1537                 /* translators: 1: Post title */
     1539                /* translators: %s: post title */
    15381540                $notify_message = sprintf( __( 'New pingback on your post "%s"' ), $post->post_title ) . "\r\n";
    1539                 /* translators: 1: Trackback/pingback website name, 2: website IP address, 3: website hostname */
     1541                /* translators: 1: trackback/pingback website name, 2: website IP address, 3: website hostname */
    15401542                $notify_message .= sprintf( __( 'Website: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
     1543                /* translators: %s: trackback/pingback/comment author URL */
    15411544                $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
     1545                /* translators: %s: comment text */
    15421546                $notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n";
    15431547                $notify_message .= __( 'You can see all pingbacks on this post here:' ) . "\r\n";
     
    15461550                break;
    15471551            default: // Comments
     1552                /* translators: %s: post title */
    15481553                $notify_message = sprintf( __( 'New comment on your post "%s"' ), $post->post_title ) . "\r\n";
    15491554                /* translators: 1: comment author, 2: comment author's IP address, 3: comment author's hostname */
    15501555                $notify_message .= sprintf( __( 'Author: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
     1556                /* translators: %s: comment author email */
    15511557                $notify_message .= sprintf( __( 'Email: %s' ), $comment->comment_author_email ) . "\r\n";
     1558                /* translators: %s: trackback/pingback/comment author URL */
    15521559                $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
     1560                /* translators: %s: comment text */
    15531561                $notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n";
    15541562                $notify_message .= __( 'You can see all comments on this post here:' ) . "\r\n";
     
    15621570        if ( user_can( $post->post_author, 'edit_comment', $comment->comment_ID ) ) {
    15631571            if ( EMPTY_TRASH_DAYS ) {
     1572                /* translators: Comment moderation. %s: Comment action URL */
    15641573                $notify_message .= sprintf( __( 'Trash it: %s' ), admin_url( "comment.php?action=trash&c={$comment->comment_ID}#wpbody-content" ) ) . "\r\n";
    15651574            } else {
     1575                /* translators: Comment moderation. %s: Comment action URL */
    15661576                $notify_message .= sprintf( __( 'Delete it: %s' ), admin_url( "comment.php?action=delete&c={$comment->comment_ID}#wpbody-content" ) ) . "\r\n";
    15671577            }
     1578            /* translators: Comment moderation. %s: Comment action URL */
    15681579            $notify_message .= sprintf( __( 'Spam it: %s' ), admin_url( "comment.php?action=spam&c={$comment->comment_ID}#wpbody-content" ) ) . "\r\n";
    15691580        }
     
    16881699        switch ( $comment->comment_type ) {
    16891700            case 'trackback':
    1690                 /* translators: 1: Post title */
     1701                /* translators: %s: post title */
    16911702                $notify_message  = sprintf( __( 'A new trackback on the post "%s" is waiting for your approval' ), $post->post_title ) . "\r\n";
    16921703                $notify_message .= get_permalink( $comment->comment_post_ID ) . "\r\n\r\n";
    1693                 /* translators: 1: Trackback/pingback website name, 2: website IP address, 3: website hostname */
     1704                /* translators: 1: trackback/pingback website name, 2: website IP address, 3: website hostname */
    16941705                $notify_message .= sprintf( __( 'Website: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
    1695                 /* translators: 1: Trackback/pingback/comment author URL */
     1706                /* translators: %s: trackback/pingback/comment author URL */
    16961707                $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
    16971708                $notify_message .= __( 'Trackback excerpt: ' ) . "\r\n" . $comment_content . "\r\n\r\n";
    16981709                break;
    16991710            case 'pingback':
    1700                 /* translators: 1: Post title */
     1711                /* translators: %s: post title */
    17011712                $notify_message  = sprintf( __( 'A new pingback on the post "%s" is waiting for your approval' ), $post->post_title ) . "\r\n";
    17021713                $notify_message .= get_permalink( $comment->comment_post_ID ) . "\r\n\r\n";
    1703                 /* translators: 1: Trackback/pingback website name, 2: website IP address, 3: website hostname */
     1714                /* translators: 1: trackback/pingback website name, 2: website IP address, 3: website hostname */
    17041715                $notify_message .= sprintf( __( 'Website: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
    1705                 /* translators: 1: Trackback/pingback/comment author URL */
     1716                /* translators: %s: trackback/pingback/comment author URL */
    17061717                $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
    17071718                $notify_message .= __( 'Pingback excerpt: ' ) . "\r\n" . $comment_content . "\r\n\r\n";
    17081719                break;
    17091720            default: // Comments
    1710                 /* translators: 1: Post title */
     1721                /* translators: %s: post title */
    17111722                $notify_message  = sprintf( __( 'A new comment on the post "%s" is waiting for your approval' ), $post->post_title ) . "\r\n";
    17121723                $notify_message .= get_permalink( $comment->comment_post_ID ) . "\r\n\r\n";
    1713                 /* translators: 1: Comment author name, 2: comment author's IP address, 3: comment author's hostname */
     1724                /* translators: 1: comment author name, 2: comment author's IP address, 3: comment author's hostname */
    17141725                $notify_message .= sprintf( __( 'Author: %1$s (IP address: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
    1715                 /* translators: 1: Comment author URL */
     1726                /* translators: %s: comment author email */
    17161727                $notify_message .= sprintf( __( 'Email: %s' ), $comment->comment_author_email ) . "\r\n";
    1717                 /* translators: 1: Trackback/pingback/comment author URL */
     1728                /* translators: %s: trackback/pingback/comment author URL */
    17181729                $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
    1719                 /* translators: 1: Comment text */
     1730                /* translators: %s: comment text */
    17201731                $notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment_content ) . "\r\n\r\n";
    17211732                break;
    17221733        }
    17231734
    1724         /* translators: Comment moderation. 1: Comment action URL */
     1735        /* translators: Comment moderation. %s: Comment action URL */
    17251736        $notify_message .= sprintf( __( 'Approve it: %s' ), admin_url( "comment.php?action=approve&c={$comment_id}#wpbody-content" ) ) . "\r\n";
    17261737
    17271738        if ( EMPTY_TRASH_DAYS ) {
    1728             /* translators: Comment moderation. 1: Comment action URL */
     1739            /* translators: Comment moderation. %s: Comment action URL */
    17291740            $notify_message .= sprintf( __( 'Trash it: %s' ), admin_url( "comment.php?action=trash&c={$comment_id}#wpbody-content" ) ) . "\r\n";
    17301741        } else {
    1731             /* translators: Comment moderation. 1: Comment action URL */
     1742            /* translators: Comment moderation. %s: Comment action URL */
    17321743            $notify_message .= sprintf( __( 'Delete it: %s' ), admin_url( "comment.php?action=delete&c={$comment_id}#wpbody-content" ) ) . "\r\n";
    17331744        }
    17341745
    1735         /* translators: Comment moderation. 1: Comment action URL */
     1746        /* translators: Comment moderation. %s: Comment action URL */
    17361747        $notify_message .= sprintf( __( 'Spam it: %s' ), admin_url( "comment.php?action=spam&c={$comment_id}#wpbody-content" ) ) . "\r\n";
    17371748
    1738         /* translators: Comment moderation. 1: Number of comments awaiting approval */
     1749        /* translators: Comment moderation. %s: Number of comments awaiting approval */
    17391750        $notify_message .= sprintf(
    17401751            _n(
Note: See TracChangeset for help on using the changeset viewer.