WordPress.org

Make WordPress Core

Ticket #7807: num-ratings-plural.diff

File num-ratings-plural.diff, 2.3 KB (added by nbachiyski, 7 years ago)
  • wp-admin/includes/plugin-install.php

     
    332332                                <td class="name"><?php echo $title; ?></td> 
    333333                                <td class="vers"><?php echo $version; ?></td> 
    334334                                <td class="vers"> 
    335                                         <div class="star-holder" title="<?php printf(__ngettext(__('based on %d rating'), __('based on %d ratings'), $plugin['num_ratings']), $plugin['num_ratings']) ?>"> 
     335                                        <div class="star-holder" title="<?php printf(__ngettext('(based on %d rating)', '(based on %d ratings)', $plugin['num_ratings']), number_format_i18n($plugin['num_ratings'])) ?>"> 
    336336                                                <div class="star star-rating" style="width: <?php echo attribute_escape($plugin['rating']) ?>px"></div> 
    337337                                                <div class="star star5"><img src="<?php echo admin_url('images/star.gif'); ?>" alt="<?php _e('5 stars') ?>" /></div> 
    338338                                                <div class="star star4"><img src="<?php echo admin_url('images/star.gif'); ?>" alt="<?php _e('4 stars') ?>" /></div> 
     
    465465<?php endif; ?> 
    466466                </ul> 
    467467                <h2><?php _e('Average Rating') ?></h2> 
    468                 <div class="star-holder" title="<?php printf(__('(based on %d ratings)'), $api->num_ratings) ?>"> 
     468                <div class="star-holder" title="<?php printf(__ngettext('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings)); ?>"> 
    469469                        <div class="star star-rating" style="width: <?php echo attribute_escape($api->rating) ?>px"></div> 
    470470                        <div class="star star5"><img src="<?php echo admin_url('images/star.gif'); ?>" alt="<?php _e('5 stars') ?>" /></div> 
    471471                        <div class="star star4"><img src="<?php echo admin_url('images/star.gif'); ?>" alt="<?php _e('4 stars') ?>" /></div> 
     
    473473                        <div class="star star2"><img src="<?php echo admin_url('images/star.gif'); ?>" alt="<?php _e('2 stars') ?>" /></div> 
    474474                        <div class="star star1"><img src="<?php echo admin_url('images/star.gif'); ?>" alt="<?php _e('1 star') ?>" /></div> 
    475475                </div> 
    476                 <small><?php printf(__('(based on %d ratings)'), $api->num_ratings) ?></small> 
     476                <small><?php printf(__ngettext('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings)); ?></small> 
    477477        </div> 
    478478        <div id="section-holder" class="wrap"> 
    479479        <?php