diff --git a/wp-admin/index.php b/wp-admin/index.php index b2f18bb1c3..5e27052cd7 100644 --- a/wp-admin/index.php +++ b/wp-admin/index.php @@ -31,8 +31,6 @@ $today = current_time('mysql', 1);

get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'post' AND post_status = 'publish'" ); $num_pages = $wpdb->get_var( "SELECT COUNT(*) FROM $wpdb->posts WHERE post_type = 'page' AND post_status = 'publish'" ); @@ -47,30 +45,39 @@ $num_cats = wp_count_terms('category'); $num_tags = wp_count_terms('post_tag'); -$sentence = 'You have '; -if ( $num_posts ) - $sentence .= '' . number_format( $num_posts ) . ' posts, '; +$post_type_texts = array(); -if ( $num_pages ) - $sentence .= '' . number_format( $num_pages ) . ' pages, '; +if ( $num_posts ) { + $post_type_texts[] = ''.sprintf( __ngettext( '%d post', '%d posts', $num_posts ), number_format_i18n( $num_posts ) ).''; +} +if ( $num_pages ) { + $post_type_texts[] = ''.sprintf( __ngettext( '%d page', '%d pages', $num_pages ), number_format_i18n( $num_pages ) ).''; +} +if ( $num_drafts ) { + $post_type_texts[] = ''.sprintf( __ngettext( '%d draft', '%d drafts', $num_drafts ), number_format_i18n( $num_drafts ) ).''; +} +if ( $num_future ) { + $post_type_texts[] = ''.sprintf( __ngettext( '%d scheduled post', '%d scheduled posts', $num_future ), number_format_i18n( $num_future ) ).''; +} -if ( $num_drafts ) - $sentence .= '' . number_format( $num_drafts ) . ' drafts, '; +$cats_text = ''.sprintf( __ngettext( '%d category', '%d categories', $num_cats ), number_format_i18n( $num_cats ) ).''; +$tags_text = sprintf( __ngettext( '%d tag', '%d tags', $num_tags ), number_format_i18n( $num_tags ) ); -if ( $num_future ) - $sentence .= '' . number_format( $num_future ) . ' scheduled posts, '; +$post_type_text = implode(', ', $post_type_texts); // There is always a category -$sentence .= 'contained within ' . number_format( $num_cats ) . ' categories and ' . number_format( $num_tags ) . ' tags.'; +$sentence = sprintf( __( 'You have %1$s, contained within %2$s and %3$s.' ), $post_type_text, $cats_text, $tags_text ); ?>

-

You use the title; ?> theme with widgets. Change Theme. You're using BetaPress TODO.

+

title, $widgets_text ); ?> . You're using BetaPress TODO.

+

@@ -78,7 +85,7 @@ $num_widgets = count( $sidebar_widgets );

- +
|

Recent Comments

-
| Edit
-

Incoming Links

+
|
+

@@ -121,7 +128,7 @@ $more_link = apply_filters( 'dashboard_incoming_links_link', 'http://blogsearch. get_results("SELECT ID, post_title FROM $wpdb->posts WHERE post_type = 'post' AND " . get_private_posts_cap_sql('post') . " AND post_date_gmt < '$today' ORDER BY post_date DESC LIMIT 5"); ?> -
| Edit
+
|

Recent Posts

-
| Edit | RSS
+
| |

@@ -146,7 +153,7 @@ foreach ($recentposts as $post) { -

Customize this page.

+

.