Skip to content

Commit

Permalink
Add missing singular placeholder in comments.php
Browse files Browse the repository at this point in the history
Fixes #1021.
  • Loading branch information
SergeyBiryukov committed Sep 19, 2016
1 parent ff4b374 commit a626d60
Showing 1 changed file with 21 additions and 5 deletions.
26 changes: 21 additions & 5 deletions comments.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,27 @@
if ( have_comments() ) : ?>
<h2 class="comments-title">
<?php
printf( // WPCS: XSS OK.
esc_html( _nx( 'One thought on &ldquo;%2$s&rdquo;', '%1$s thoughts on &ldquo;%2$s&rdquo;', get_comments_number(), 'comments title', '_s' ) ),
number_format_i18n( get_comments_number() ),
'<span>' . get_the_title() . '</span>'
);
$comments_number = get_comments_number();
if ( 1 === $comments_number ) {
printf(
/* translators: %s: post title */
esc_html_x( 'One thought on &ldquo;%s&rdquo;', 'comments title', '_s' ),
'<span>' . get_the_title() . '</span>'
);
} else {
printf( // WPCS: XSS OK.
/* translators: 1: number of comments, 2: post title */
esc_html( _nx(
'%1$s thought on &ldquo;%2$s&rdquo;',
'%1$s thoughts on &ldquo;%2$s&rdquo;',
$comments_number,
'comments title',
'_s'
) ),
number_format_i18n( $comments_number ),
'<span>' . get_the_title() . '</span>'
);
}
?>
</h2>

Expand Down

0 comments on commit a626d60

Please sign in to comment.