Making WordPress.org


Ignore:
Timestamp:
10/12/2016 07:48:22 PM (8 years ago)
Author:
coffee2code
Message:

Support Forums: Another i18n improvement in Ratings_Compat.

  • Move HTML out from translatable string
  • Add missing text domain and translator comment
  • Add use of number_format_i18n()

Props SergeyBiryukov.
See #2035.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/support-forums/inc/class-ratings-compat.php

    r4086 r4228  
    135135    <div class="col-3">
    136136        <div class="reviews-about" style="display:none;" itemprop="itemReviewed"><?php echo esc_html( $this->object->post_title ); ?></div>
    137         <div class="reviews-total-count"><?php printf( _n( '<span itemprop="reviewCount">%d</span> review', '<span itemprop="reviewCount">%d</span> reviews', $this->reviews_count ), $this->reviews_count ); ?></div>
     137        <div class="reviews-total-count"><?php
     138            printf(
     139                /* translators: %s: number of reviews */
     140                _n( '%d review', '%d reviews', $this->reviews_count, 'wporg-forums' ),
     141                '<span itemprop="reviewCount">' . number_format_i18n( $this->reviews_count ) . '</span>'
     142            );
     143        ?></div>
    138144        <?php
    139145            foreach ( array( 5, 4, 3, 2, 1 ) as $rating ) {
Note: See TracChangeset for help on using the changeset viewer.