WordPress.org

Make WordPress Core

Ticket #26553: 26553.5.diff

File 26553.5.diff, 2.1 KB (added by ocean90, 6 years ago)
  • src/wp-includes/comment-template.php

     
    12801280        global $wpcommentspopupfile, $wpcommentsjavascript;
    12811281
    12821282        $id = get_the_ID();
    1283         $span = '<span class="screen-reader-text">';
    12841283        $title = get_the_title();
    1285         $span_close = '</span>';
    1286 
    12871284        $number = get_comments_number( $id );
    12881285
    12891286        if ( false === $zero ) {
    1290                 /* translators: 1: Opening span tag with a class, 2: post title, 3: closing span tag */
    1291                 $zero = sprintf( __( 'No Comments%1$s on %2$s%3$s' ), $span, $title, $span_close );
     1287                /* translators: %s: post title */
     1288                $zero = sprintf( __( 'No Comments<span class="screen-reader-text"> on %s</span>' ), $title );
    12921289        }
     1290
    12931291        if ( false === $one ) {
    1294                 /* translators: 1: Opening span tag with a class, 2: post title, 3: closing span tag */
    1295                 $one = sprintf( __( '1 Comment%1$s on %2$s%3$s' ), $span, $title, $span_close );
     1292                /* translators: %s: post title */
     1293                $one = sprintf( __( '1 Comment<span class="screen-reader-text"> on %s</span>' ), $title );
    12961294        }
     1295
    12971296        if ( false === $more ) {
    1298                 /* translators: 1: Opening span tag with a class, 2: post title, 3: closing span tag, 4: number of comments */
    1299                 $more = sprintf( _n( '%4$s Comment%1$s on %2$s%3$s', '%4$s Comments%1$s on %2$s%3$s', $number ),
    1300                         $span, $title, $span_close, number_format_i18n( $number )
    1301                 );
     1297                /* translators: 1: Number of comments 2: post title */
     1298                $more = _n( '%1$s Comment<span class="screen-reader-text"> on %2$s</span>', '%1$s Comments<span class="screen-reader-text"> on %2$s</span>', $number );
     1299                $more = sprintf( $more, number_format_i18n( $number ), $title );
    13021300        }
     1301
    13031302        if ( false === $none ) {
    1304                 /* translators: 1: Opening span tag with a class, 2: post title, 3: closing span tag */
    1305                 $none = sprintf( __( 'Comments Off%1$s on %2$s%3$s' ), $span, $title, $span_close );
     1303                /* translators: %s: post title */
     1304                $none = sprintf( __( 'Comments Off<span class="screen-reader-text"> on %s</span>' ), $title );
    13061305        }
    13071306
    13081307        if ( 0 == $number && !comments_open() && !pings_open() ) {