Ticket #3677: number-format-i18n-uses.diff

File number-format-i18n-uses.diff, 3.4 kB (added by nbachiyski, 1 year ago)

let's use this number_format_i18n

  • wp-settings.php

    old new  
    6969        $mtime = $mtime[1] + $mtime[0]; 
    7070        $timeend = $mtime; 
    7171        $timetotal = $timeend-$timestart; 
    72         $r = number_format($timetotal, $precision); 
     72        $r = number_format_i18n($timetotal, $precision); 
    7373        if ( $display ) 
    7474                echo $r; 
    7575        return $r; 
  • wp-admin/admin-functions.php

    old new  
    793793 
    794794        $class = ( ( defined( 'DOING_AJAX' ) && DOING_AJAX ) || " class='alternate'" == $class ) ? '' : " class='alternate'"; 
    795795 
    796         $category->category_count = number_format( $category->category_count ); 
    797         $category->link_count = number_format( $category->link_count ); 
     796        $category->category_count = number_format_i18n( $category->category_count ); 
     797        $category->link_count = number_format_i18n( $category->link_count ); 
    798798        $posts_count = ( $category->category_count > 0 ) ? "<a href='edit.php?cat=$category->cat_ID'>$category->category_count</a>" : $category->category_count; 
    799799        return "<tr id='cat-$category->cat_ID'$class> 
    800800                <th scope='row' style='text-align: center'>$category->cat_ID</th> 
  • wp-admin/index.php

    old new  
    4242<h3><?php _e('Comments'); ?> <a href="edit-comments.php" title="<?php _e('More comments...'); ?>">&raquo;</a></h3> 
    4343 
    4444<?php if ( $numcomments ) : ?> 
    45 <p><strong><a href="moderation.php"><?php echo sprintf(__('Comments in moderation (%s)'), number_format($numcomments) ); ?> &raquo;</a></strong></p> 
     45<p><strong><a href="moderation.php"><?php echo sprintf(__('Comments in moderation (%s)'), number_format_i18n($numcomments) ); ?> &raquo;</a></strong></p> 
    4646<?php endif; ?> 
    4747 
    4848<ul> 
     
    102102$numcomms = (int) $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->comments WHERE comment_approved = '1'"); 
    103103$numcats  = (int) $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->categories"); 
    104104 
    105 $post_str = sprintf(__ngettext('%1$s <a href="%2$s" title="Posts">post</a>', '%1$s <a href="%2$s" title="Posts">posts</a>', $numposts), number_format($numposts), 'edit.php'); 
    106 $comm_str = sprintf(__ngettext('%1$s <a href="%2$s" title="Comments">comment</a>', '%1$s <a href="%2$s" title="Comments">comments</a>', $numcomms), number_format($numcomms), 'edit-comments.php'); 
    107 $cat_str  = sprintf(__ngettext('%1$s <a href="%2$s" title="Categories">category</a>', '%1$s <a href="%2$s" title="Categories">categories</a>', $numcats), number_format($numcats), 'categories.php'); 
     105$post_str = sprintf(__ngettext('%1$s <a href="%2$s" title="Posts">post</a>', '%1$s <a href="%2$s" title="Posts">posts</a>', $numposts), number_format_i18n($numposts), 'edit.php'); 
     106$comm_str = sprintf(__ngettext('%1$s <a href="%2$s" title="Comments">comment</a>', '%1$s <a href="%2$s" title="Comments">comments</a>', $numcomms), number_format_i18n($numcomms), 'edit-comments.php'); 
     107$cat_str  = sprintf(__ngettext('%1$s <a href="%2$s" title="Categories">category</a>', '%1$s <a href="%2$s" title="Categories">categories</a>', $numcats), number_format_i18n($numcats), 'categories.php'); 
    108108?> 
    109109 
    110110<p><?php printf(__('There are currently %1$s and %2$s, contained within %3$s.'), $post_str, $comm_str, $cat_str); ?></p>