Changeset 5308
- Timestamp:
- 04/25/2007 12:49:57 AM (18 years ago)
- Location:
- trunk
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/admin-functions.php
r5303 r5308 832 832 $class = ( ( defined( 'DOING_AJAX' ) && DOING_AJAX ) || " class='alternate'" == $class ) ? '' : " class='alternate'"; 833 833 834 $category->category_count = number_format ( $category->category_count );835 $category->link_count = number_format ( $category->link_count );834 $category->category_count = number_format_i18n( $category->category_count ); 835 $category->link_count = number_format_i18n( $category->link_count ); 836 836 $posts_count = ( $category->category_count > 0 ) ? "<a href='edit.php?cat=$category->cat_ID'>$category->category_count</a>" : $category->category_count; 837 837 return "<tr id='cat-$category->cat_ID'$class> -
trunk/wp-admin/index.php
r5191 r5308 44 44 45 45 <?php if ( $numcomments ) : ?> 46 <p><strong><a href="moderation.php"><?php echo sprintf(__('Comments in moderation (%s)'), number_format ($numcomments) ); ?> »</a></strong></p>46 <p><strong><a href="moderation.php"><?php echo sprintf(__('Comments in moderation (%s)'), number_format_i18n($numcomments) ); ?> »</a></strong></p> 47 47 <?php endif; ?> 48 48 … … 104 104 $numcats = (int) $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->categories"); 105 105 106 $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');107 $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');108 $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');106 $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'); 107 $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'); 108 $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'); 109 109 ?> 110 110 -
trunk/wp-includes/functions.php
r5304 r5308 82 82 $j = @date($dateformatstring, $i); 83 83 return $j; 84 } 85 86 function number_format_i18n($number, $decimals = null) { 87 global $wp_locale; 88 // let the user override the precision only 89 $decimals = is_null($decimals)? $wp_locale->number_format['decimals'] : intval($decimals); 90 91 return number_format($number, $decimals, $wp_locale->number_format['decimal_point'], $wp_locale->number_format['thousands_sep']); 84 92 } 85 93 -
trunk/wp-includes/locale.php
r5062 r5308 88 88 $this->meridiem['PM'] = __('PM'); 89 89 90 // Numbers formatting 91 // See http://php.net/number_format 92 93 $trans = __('number_format_decimals'); 94 $this->number_format['decimals'] = ('number_format_decimals' == $trans) ? 0 : $trans; 95 96 $trans = __('number_format_decimal_point'); 97 $this->number_format['decimal_point'] = ('number_format_decimal_point' == $trans) ? '.' : $trans; 98 99 $trans = __('number_format_thousands_sep'); 100 $this->number_format['thousands_sep'] = ('number_format_thousands_sep' == $trans) ? ',' : $trans; 101 90 102 // Import global locale vars set during inclusion of $locale.php. 91 103 foreach ( $this->locale_vars as $var ) { -
trunk/wp-settings.php
r5297 r5308 70 70 $timeend = $mtime; 71 71 $timetotal = $timeend-$timestart; 72 $r = number_format ($timetotal, $precision);72 $r = number_format_i18n($timetotal, $precision); 73 73 if ( $display ) 74 74 echo $r;
Note: See TracChangeset
for help on using the changeset viewer.