Make WordPress Core

Changeset 34343


Ignore:
Timestamp:
09/20/2015 02:52:49 AM (10 years ago)
Author:
wonderboymusic
Message:

WP Mail: Avoid using HTML tags in translation strings, add translator strings.

Props ramiy.
Fixes #31871.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-mail.php

    r29205 r34343  
    245245    do_action( 'publish_phone', $post_ID );
    246246
    247     echo "\n<p>" . sprintf(__('<strong>Author:</strong> %s'), esc_html($post_author)) . '</p>';
    248     echo "\n<p>" . sprintf(__('<strong>Posted title:</strong> %s'), esc_html($post_title)) . '</p>';
     247    echo "\n<p><strong>" . __( 'Author:' ) . '</strong> ' . esc_html( $post_author ) . '</p>';
     248    echo "\n<p><strong>" . __( 'Posted title:' ) . '</strong> ' . esc_html( $post_title ) . '</p>';
    249249
    250250    if(!$pop3->delete($i)) {
    251         echo '<p>' . sprintf(__('Oops: %s'), esc_html($pop3->ERROR)) . '</p>';
     251        echo '<p>' . sprintf(
     252            /* translators: %s: POP3 error */
     253            __( 'Oops: %s' ),
     254            esc_html( $pop3->ERROR )
     255        ) . '</p>';
    252256        $pop3->reset();
    253257        exit;
    254258    } else {
    255         echo '<p>' . sprintf(__('Mission complete. Message <strong>%s</strong> deleted.'), $i) . '</p>';
     259        echo '<p>' . sprintf(
     260            /* translators: %s: the message ID */
     261            __( 'Mission complete. Message %s deleted.' ),
     262            '<strong>' . $i . '</strong>'
     263        ) . '</p>';
    256264    }
    257265
Note: See TracChangeset for help on using the changeset viewer.