WordPress.org

Make WordPress Core

Ticket #33073: 33073.diff

File 33073.diff, 18.4 KB (added by xibe, 5 years ago)

Patch for upgrade.php, feed-atom-comments.php, feed-rss2-comments.php, pluggable.php

  • wp-admin/includes/upgrade.php

     
    361361        $email = $user->user_email;
    362362        $name = $user->user_login;
    363363        $login_url = wp_login_url();
     364        /* translators: Do not use HTML entities ( , etc.): this string is used in e-mails. */
    364365        $message = sprintf( __( "Your new WordPress site has been successfully set up at:
    365366
    366367%1\$s
     
    377378https://wordpress.org/
    378379"), $blog_url, $name, $password, $login_url );
    379380
     381        /* translators: Do not use HTML entities ( , etc.): this string is used in e-mails. */
    380382        @wp_mail($email, __('New WordPress Site'), $message);
    381383}
    382384endif;
  • wp-includes/feed-atom-comments.php

     
    2929>
    3030        <title type="text"><?php
    3131                if ( is_singular() )
     32                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in XML feeds. */
    3233                        printf( ent2ncr( __( 'Comments on %s' ) ), get_the_title_rss() );
    3334                elseif ( is_search() )
     35                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in XML feeds. */
    3436                        printf( ent2ncr( __( 'Comments for %1$s searching on %2$s' ) ), get_bloginfo_rss( 'name' ), get_search_query() );
    3537                else
     38                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in XML feeds. */
    3639                        printf( ent2ncr( __( 'Comments for %s' ) ), get_bloginfo_rss( 'name' ) . get_wp_title_rss() );
    3740        ?></title>
    3841        <subtitle type="text"><?php bloginfo_rss('description'); ?></subtitle>
     
    7073                                $title = get_the_title($comment_post->ID);
    7174                                /** This filter is documented in wp-includes/feed.php */
    7275                                $title = apply_filters( 'the_title_rss', $title );
     76                                /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in XML feeds. */
    7377                                printf(ent2ncr(__('Comment on %1$s by %2$s')), $title, get_comment_author_rss());
    7478                        } else {
     79                                /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in XML feeds. */
    7580                                printf(ent2ncr(__('By: %s')), get_comment_author_rss());
    7681                        }
    7782                ?></title>
  • wp-includes/feed-rss2-comments.php

     
    3434<channel>
    3535        <title><?php
    3636                if ( is_singular() )
     37                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in XML feeds. */
    3738                        printf( ent2ncr( __( 'Comments on: %s' ) ), get_the_title_rss() );
    3839                elseif ( is_search() )
     40                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in XML feeds. */
    3941                        printf( ent2ncr( __( 'Comments for %1$s searching on %2$s' ) ), get_bloginfo_rss( 'name' ), get_search_query() );
    4042                else
     43                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in XML feeds. */
    4144                        printf( ent2ncr( __( 'Comments for %s' ) ), get_bloginfo_rss( 'name' ) . get_wp_title_rss() );
    4245        ?></title>
    4346        <atom:link href="<?php self_link(); ?>" rel="self" type="application/rss+xml" />
     
    6972                                $title = get_the_title($comment_post->ID);
    7073                                /** This filter is documented in wp-includes/feed.php */
    7174                                $title = apply_filters( 'the_title_rss', $title );
     75                                /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in XML feeds. */
    7276                                printf(ent2ncr(__('Comment on %1$s by %2$s')), $title, get_comment_author_rss());
    7377                        } else {
     78                                /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in XML feeds. */
    7479                                printf(ent2ncr(__('By: %s')), get_comment_author_rss());
    7580                        }
    7681                ?></title>
     
    7984                <pubDate><?php echo mysql2date('D, d M Y H:i:s +0000', get_comment_time('Y-m-d H:i:s', true, false), false); ?></pubDate>
    8085                <guid isPermaLink="false"><?php comment_guid() ?></guid>
    8186<?php if ( post_password_required($comment_post) ) : ?>
    82                 <description><?php echo ent2ncr(__('Protected Comments: Please enter your password to view comments.')); ?></description>
     87                <description><?php
     88                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in XML feeds. */
     89                        echo ent2ncr(__('Protected Comments: Please enter your password to view comments.')); ?>
     90                </description>
    8391                <content:encoded><![CDATA[<?php echo get_the_password_form() ?>]]></content:encoded>
    8492<?php else : // post pass ?>
    8593                <description><![CDATA[<?php comment_text_rss() ?>]]></description>
  • wp-includes/pluggable.php

     
    14391439
    14401440        switch ( $comment->comment_type ) {
    14411441                case 'trackback':
     1442                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    14421443                        $notify_message  = sprintf( __( 'New trackback on your post "%s"' ), $post->post_title ) . "\r\n";
    1443                         /* translators: 1: website name, 2: website IP, 3: website hostname */
     1444                        /* translators: 1: website name, 2: website IP, 3: website hostname. Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    14441445                        $notify_message .= sprintf( __('Website: %1$s (IP: %2$s, %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
     1446                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    14451447                        $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
     1448                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    14461449                        $notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment->comment_content ) . "\r\n\r\n";
     1450                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    14471451                        $notify_message .= __( 'You can see all trackbacks on this post here:' ) . "\r\n";
    1448                         /* translators: 1: blog name, 2: post title */
     1452                        /* translators: 1: blog name, 2: post title. Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    14491453                        $subject = sprintf( __('[%1$s] Trackback: "%2$s"'), $blogname, $post->post_title );
    14501454                        break;
    14511455                case 'pingback':
     1456                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    14521457                        $notify_message  = sprintf( __( 'New pingback on your post "%s"' ), $post->post_title ) . "\r\n";
    1453                         /* translators: 1: website name, 2: website IP, 3: website hostname */
     1458                        /* translators: 1: website name, 2: website IP, 3: website hostname. Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    14541459                        $notify_message .= sprintf( __('Website: %1$s (IP: %2$s, %3$s)'), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
     1460                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    14551461                        $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
     1462                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    14561463                        $notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment->comment_content ) . "\r\n\r\n";
     1464                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    14571465                        $notify_message .= __( 'You can see all pingbacks on this post here:' ) . "\r\n";
    1458                         /* translators: 1: blog name, 2: post title */
     1466                        /* translators: 1: blog name, 2: post title. Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    14591467                        $subject = sprintf( __('[%1$s] Pingback: "%2$s"'), $blogname, $post->post_title );
    14601468                        break;
    14611469                default: // Comments
     1470                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    14621471                        $notify_message  = sprintf( __( 'New comment on your post "%s"' ), $post->post_title ) . "\r\n";
    1463                         /* translators: 1: comment author, 2: author IP, 3: author domain */
     1472                        /* translators: 1: comment author, 2: author IP, 3: author domain. Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    14641473                        $notify_message .= sprintf( __( 'Author: %1$s (IP: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
     1474                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    14651475                        $notify_message .= sprintf( __( 'E-mail: %s' ), $comment->comment_author_email ) . "\r\n";
     1476                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    14661477                        $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
     1478                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    14671479                        $notify_message .= sprintf( __('Comment: %s' ), "\r\n" . $comment->comment_content ) . "\r\n\r\n";
     1480                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    14681481                        $notify_message .= __( 'You can see all comments on this post here:' ) . "\r\n";
    1469                         /* translators: 1: blog name, 2: post title */
     1482                        /* translators: 1: blog name, 2: post title. Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    14701483                        $subject = sprintf( __('[%1$s] Comment: "%2$s"'), $blogname, $post->post_title );
    14711484                        break;
    14721485        }
    14731486        $notify_message .= get_permalink($comment->comment_post_ID) . "#comments\r\n\r\n";
     1487        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    14741488        $notify_message .= sprintf( __('Permalink: %s'), get_comment_link( $comment_id ) ) . "\r\n";
    14751489
    14761490        if ( user_can( $post->post_author, 'edit_comment', $comment_id ) ) {
    1477                 if ( EMPTY_TRASH_DAYS )
     1491                if ( EMPTY_TRASH_DAYS ) {
     1492                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    14781493                        $notify_message .= sprintf( __('Trash it: %s'), admin_url("comment.php?action=trash&c=$comment_id") ) . "\r\n";
    1479                 else
     1494                }
     1495                else {
     1496                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    14801497                        $notify_message .= sprintf( __('Delete it: %s'), admin_url("comment.php?action=delete&c=$comment_id") ) . "\r\n";
     1498                }
     1499                /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    14811500                $notify_message .= sprintf( __('Spam it: %s'), admin_url("comment.php?action=spam&c=$comment_id") ) . "\r\n";
    14821501        }
    14831502
     
    14851504
    14861505        if ( '' == $comment->comment_author ) {
    14871506                $from = "From: \"$blogname\" <$wp_email>";
    1488                 if ( '' != $comment->comment_author_email )
     1507                if ( '' != $comment->comment_author_email ) {
    14891508                        $reply_to = "Reply-To: $comment->comment_author_email";
     1509                }
    14901510        } else {
    14911511                $from = "From: \"$comment->comment_author\" <$wp_email>";
    1492                 if ( '' != $comment->comment_author_email )
     1512                if ( '' != $comment->comment_author_email ) {
    14931513                        $reply_to = "Reply-To: \"$comment->comment_author_email\" <$comment->comment_author_email>";
     1514                }
    14941515        }
    14951516
    14961517        $message_headers = "$from\n"
     
    15731594
    15741595        switch ( $comment->comment_type ) {
    15751596                case 'trackback':
     1597                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    15761598                        $notify_message  = sprintf( __('A new trackback on the post "%s" is waiting for your approval'), $post->post_title ) . "\r\n";
    15771599                        $notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n";
    1578                         /* translators: 1: website name, 2: website IP, 3: website hostname */
     1600                        /* translators: 1: website name, 2: website IP, 3: website hostname. Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    15791601                        $notify_message .= sprintf( __( 'Website: %1$s (IP: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
     1602                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    15801603                        $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
     1604                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    15811605                        $notify_message .= __('Trackback excerpt: ') . "\r\n" . $comment->comment_content . "\r\n\r\n";
    15821606                        break;
    15831607                case 'pingback':
     1608                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    15841609                        $notify_message  = sprintf( __('A new pingback on the post "%s" is waiting for your approval'), $post->post_title ) . "\r\n";
    15851610                        $notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n";
    1586                         /* translators: 1: website name, 2: website IP, 3: website hostname */
     1611                        /* translators: 1: website name, 2: website IP, 3: website hostname. Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    15871612                        $notify_message .= sprintf( __( 'Website: %1$s (IP: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
     1613                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    15881614                        $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
     1615                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    15891616                        $notify_message .= __('Pingback excerpt: ') . "\r\n" . $comment->comment_content . "\r\n\r\n";
    15901617                        break;
    15911618                default: // Comments
     1619                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    15921620                        $notify_message  = sprintf( __('A new comment on the post "%s" is waiting for your approval'), $post->post_title ) . "\r\n";
    15931621                        $notify_message .= get_permalink($comment->comment_post_ID) . "\r\n\r\n";
     1622                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    15941623                        $notify_message .= sprintf( __( 'Author: %1$s (IP: %2$s, %3$s)' ), $comment->comment_author, $comment->comment_author_IP, $comment_author_domain ) . "\r\n";
     1624                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    15951625                        $notify_message .= sprintf( __( 'E-mail: %s' ), $comment->comment_author_email ) . "\r\n";
     1626                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    15961627                        $notify_message .= sprintf( __( 'URL: %s' ), $comment->comment_author_url ) . "\r\n";
     1628                        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    15971629                        $notify_message .= sprintf( __( 'Comment: %s' ), "\r\n" . $comment->comment_content ) . "\r\n\r\n";
    15981630                        break;
    15991631        }
    16001632
     1633        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    16011634        $notify_message .= sprintf( __('Approve it: %s'),  admin_url("comment.php?action=approve&c=$comment_id") ) . "\r\n";
    1602         if ( EMPTY_TRASH_DAYS )
     1635        if ( EMPTY_TRASH_DAYS ) {
     1636                /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    16031637                $notify_message .= sprintf( __('Trash it: %s'), admin_url("comment.php?action=trash&c=$comment_id") ) . "\r\n";
    1604         else
     1638        }
     1639        else {
     1640                /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    16051641                $notify_message .= sprintf( __('Delete it: %s'), admin_url("comment.php?action=delete&c=$comment_id") ) . "\r\n";
     1642        }
     1643        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    16061644        $notify_message .= sprintf( __('Spam it: %s'), admin_url("comment.php?action=spam&c=$comment_id") ) . "\r\n";
    16071645
     1646        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    16081647        $notify_message .= sprintf( _n('Currently %s comment is waiting for approval. Please visit the moderation panel:',
    16091648                'Currently %s comments are waiting for approval. Please visit the moderation panel:', $comments_waiting), number_format_i18n($comments_waiting) ) . "\r\n";
    16101649        $notify_message .= admin_url("edit-comments.php?comment_status=moderated") . "\r\n";
    16111650
     1651        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    16121652        $subject = sprintf( __('[%1$s] Please moderate: "%2$s"'), $blogname, $post->post_title );
    16131653        $message_headers = '';
    16141654
     
    16721712        // send a copy of password change notification to the admin
    16731713        // but check to see if it's the admin whose password we're changing, and skip this
    16741714        if ( 0 !== strcasecmp( $user->user_email, get_option( 'admin_email' ) ) ) {
     1715                /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    16751716                $message = sprintf(__('Password Lost and Changed for user: %s'), $user->user_login) . "\r\n";
    16761717                // The blogname option is escaped with esc_html on the way into the database in sanitize_option
    16771718                // we want to reverse this for the plain text arena of emails.
    16781719                $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
     1720                /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    16791721                wp_mail(get_option('admin_email'), sprintf(__('[%s] Password Lost/Changed'), $blogname), $message);
    16801722        }
    16811723}
     
    16991741        // we want to reverse this for the plain text arena of emails.
    17001742        $blogname = wp_specialchars_decode(get_option('blogname'), ENT_QUOTES);
    17011743
     1744        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    17021745        $message  = sprintf(__('New user registration on your site %s:'), $blogname) . "\r\n\r\n";
     1746        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    17031747        $message .= sprintf(__('Username: %s'), $user->user_login) . "\r\n\r\n";
     1748        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    17041749        $message .= sprintf(__('E-mail: %s'), $user->user_email) . "\r\n";
    17051750
    17061751        @wp_mail(get_option('admin_email'), sprintf(__('[%s] New User Registration'), $blogname), $message);
     
    17181763        $hashed = time() . ':' . $wp_hasher->HashPassword( $key );
    17191764        $wpdb->update( $wpdb->users, array( 'user_activation_key' => $hashed ), array( 'user_login' => $user->user_login ) );
    17201765
     1766        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    17211767        $message = sprintf(__('Username: %s'), $user->user_login) . "\r\n\r\n";
     1768        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    17221769        $message .= __('To set your password, visit the following address:') . "\r\n\r\n";
    17231770        $message .= '<' . network_site_url("wp-login.php?action=rp&key=$key&login=" . rawurlencode($user->user_login), 'login') . ">\r\n\r\n";
    17241771
    17251772        $message .= wp_login_url() . "\r\n";
    17261773
     1774        /* translators: Do not use HTML entities (&nbsp;, etc.): this string is used in e-mails. */
    17271775        wp_mail($user->user_email, sprintf(__('[%s] Your username and password info'), $blogname), $message);
    17281776
    17291777}