From a626d603c1ce4e5d82f625575fcb288e129874c5 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 20 Sep 2016 02:12:04 +0300 Subject: [PATCH] Add missing singular placeholder in comments.php Fixes #1021. --- comments.php | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/comments.php b/comments.php index 6710fce561..b0d5130258 100644 --- a/comments.php +++ b/comments.php @@ -27,11 +27,27 @@ if ( have_comments() ) : ?>

' . get_the_title() . '' - ); + $comments_number = get_comments_number(); + if ( 1 === $comments_number ) { + printf( + /* translators: %s: post title */ + esc_html_x( 'One thought on “%s”', 'comments title', '_s' ), + '' . get_the_title() . '' + ); + } else { + printf( // WPCS: XSS OK. + /* translators: 1: number of comments, 2: post title */ + esc_html( _nx( + '%1$s thought on “%2$s”', + '%1$s thoughts on “%2$s”', + $comments_number, + 'comments title', + '_s' + ) ), + number_format_i18n( $comments_number ), + '' . get_the_title() . '' + ); + } ?>