WordPress.org

Make WordPress Core

Changeset 35536


Ignore:
Timestamp:
11/05/2015 03:35:06 PM (5 years ago)
Author:
SergeyBiryukov
Message:

Comments: Use _n() in get_comments_number_text() when setting the default string for multiple comments.

Fixes #34593.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/comment-template.php

    r35331 r35536  
    870870
    871871    if ( $number > 1 ) {
    872         $output = str_replace( '%', number_format_i18n( $number ), ( false === $more ) ? __( '% Comments' ) : $more );
     872        if ( false === $more ) {
     873            /* translators: %s: number of comments */
     874            $output = sprintf( _n( '%s Comment', '%s Comments', $number ), number_format_i18n( $number ) );
     875        } else {
     876            // % Comments
     877            $output = str_replace( '%', number_format_i18n( $number ), $more );
     878        }
    873879    } elseif ( $number == 0 ) {
    874880        $output = ( false === $zero ) ? __( 'No Comments' ) : $zero;
Note: See TracChangeset for help on using the changeset viewer.