Making WordPress.org

Ticket #3077: 3077.diff

File 3077.diff, 2.3 KB (added by afzalmultani, 8 years ago)

Missing singular placeholder

  • wordpress.tv/public_html/wp-content/themes/wptv2/comments.php

     .../wp-content/themes/wptv2/comments.php           | 51 +++++++++++++++-------
     1 file changed, 36 insertions(+), 15 deletions(-)
    
    diff --git wordpress.tv/public_html/wp-content/themes/wptv2/comments.php wordpress.tv/public_html/wp-content/themes/wptv2/comments.php
    index e7ea96bf..aff7711e 100644
     
    55 */
    66
    77/*
    8  * If the current post is protected by a password and
    9  * the visitor has not yet entered the password we will
    10  * return early without loading the comments.
    11  */
     8* If the current post is protected by a password and
     9* the visitor has not yet entered the password we will
     10* return early without loading the comments.
     11*/
    1212if ( post_password_required() ) {
    1313        return;
    1414}
    if ( post_password_required() ) { 
    1616global $wptv;
    1717
    1818if ( have_comments() ) :
    19 ?>
    20         <h3 id="comments">
     19        ?>
     20
     21    <h3 id="comments">
    2122                <?php
    22                         printf( _nx( 'One response on &ldquo;%2$s&rdquo;', '%1$s responses on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', 'wptv' ),
    23                                 number_format_i18n( get_comments_number() ), '<span>' . get_the_title() . '</span>' );
     23
     24                $comments_number = get_comments_number();
     25                if ( 1 === $comments_number ) {
     26                        printf(
     27                        /* translators: %s: post title */
     28                                esc_html_x( 'One response on &ldquo;%s&rdquo;', 'comments title', 'wptv' ),
     29                                '<span>' . get_the_title() . '</span>'
     30                        );
     31                } else {
     32                        printf(
     33                        /* translators: 1: number of comments, 2: post title */
     34                                esc_html( _nx(
     35                                        '%1$s response on &ldquo;%2$s&rdquo;',
     36                                        '%1$s response on &ldquo;%2$s&rdquo;',
     37                                        $comments_number,
     38                                        'comments title',
     39                                        'wptv'
     40                                ) ),
     41                                number_format_i18n( $comments_number ),
     42                                '<span>' . get_the_title() . '</span>'
     43                        );
     44                }
    2445                ?>
    25         </h3>
     46    </h3>
    2647
    27         <ol class="commentlist">
     48    <ol class="commentlist">
    2849                <?php wp_list_comments( array( 'callback' => array( $wptv, 'list_comments' ) ) ); ?>
    29         </ol>
    30 <?php
     50    </ol>
     51        <?php
    3152endif;
    3253
    3354if ( ! comments_open() && get_comments_number() && post_type_supports( get_post_type(), 'comments' ) ) :
    34 ?>
    35         <p class="nocomments"><?php esc_html_e( 'Comments are closed.', 'wptv' ); ?></p>
    36 <?php
     55        ?>
     56    <p class="nocomments"><?php esc_html_e( 'Comments are closed.', 'wptv' ); ?></p>
     57        <?php
    3758
    3859endif;
    3960