Comments: Use `_n()` in `get_comments_number_text()` when setting the default string for multiple comments.
Fixes #34593. git-svn-id: https://develop.svn.wordpress.org/trunk@35536 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
9711093ff8
commit
6971487d5c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue