From 3caaa702bf3a307952a9562400104ba429b95c2b Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Thu, 5 Nov 2015 15:36:28 +0000 Subject: [PATCH] Comments: Use `_n()` in `get_comments_number_text()` when setting the default string for multiple comments. Fixes #34593. Built from https://develop.svn.wordpress.org/trunk@35536 git-svn-id: http://core.svn.wordpress.org/trunk@35500 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/comment-template.php | 8 +++++++- wp-includes/version.php | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/wp-includes/comment-template.php b/wp-includes/comment-template.php index 18d3e7a553..4254abfd01 100644 --- a/wp-includes/comment-template.php +++ b/wp-includes/comment-template.php @@ -869,7 +869,13 @@ function get_comments_number_text( $zero = false, $one = false, $more = false ) $number = get_comments_number(); if ( $number > 1 ) { - $output = str_replace( '%', number_format_i18n( $number ), ( false === $more ) ? __( '% Comments' ) : $more ); + if ( false === $more ) { + /* translators: %s: number of comments */ + $output = sprintf( _n( '%s Comment', '%s Comments', $number ), number_format_i18n( $number ) ); + } else { + // % Comments + $output = str_replace( '%', number_format_i18n( $number ), $more ); + } } elseif ( $number == 0 ) { $output = ( false === $zero ) ? __( 'No Comments' ) : $zero; } else { // must be one diff --git a/wp-includes/version.php b/wp-includes/version.php index 856ca8560f..4fd3e4527e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-beta3-35535'; +$wp_version = '4.4-beta3-35536'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.