Making WordPress.org


Ignore:
Timestamp:
04/22/2024 03:38:03 AM (12 months ago)
Author:
dd32
Message:

Support Forums: Apply number_format_i18n() to the individual review counts.

Makes plugins with >1,000 reviews at a given star rating to show 5 stars: 1,234 instead of 5 stars: 1234.

File:
1 edited

Legend:

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

    r13540 r13580  
    222222                $stars_title = sprintf(
    223223                    /* translators: %s: number of stars */
    224                     _n( 'Click to see reviews that provided a rating of %d star',
    225                         'Click to see reviews that provided a rating of %d stars',
    226                         $rating,
    227                         'wporg-forums' ),
     224                    _n(
     225                        'Click to see reviews that provided a rating of %d star',
     226                        'Click to see reviews that provided a rating of %d stars',
     227                        $rating,
     228                        'wporg-forums'
     229                    ),
    228230                    $rating
    229231                );
     
    247249                    </span>
    248250                </a>
    249                 <span class="counter-count" style="margin-left:5px;"><?php echo esc_html( $ratings_count ); ?></span>
     251                <span class="counter-count" style="margin-left:5px;"><?php echo esc_html( number_format_i18n( $ratings_count ) ); ?></span>
    250252                </div>
    251253                <?php
     
    299301            printf(
    300302                /* translators: %d: number of stars */
    301                 _n( 'You are currently viewing the reviews that provided a rating of <strong>%d star</strong>.',
    302                     'You are currently viewing the reviews that provided a rating of <strong>%d stars</strong>.',
    303                     $filter,
    304                         'wporg-forums' ) . ' ',
     303                _n(
     304                    'You are currently viewing the reviews that provided a rating of <strong>%d star</strong>.',
     305                    'You are currently viewing the reviews that provided a rating of <strong>%d stars</strong>.',
     306                    $filter,
     307                    'wporg-forums'
     308                ) . ' ',
    305309                $filter
    306310            );
Note: See TracChangeset for help on using the changeset viewer.