| 1 | Index: wp-admin/includes/dashboard.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-admin/includes/dashboard.php (revision 10603) |
|---|
| 4 | +++ wp-admin/includes/dashboard.php (working copy) |
|---|
| 5 | @@ -181,7 +181,7 @@ |
|---|
| 6 | |
|---|
| 7 | // Posts |
|---|
| 8 | $num = number_format_i18n( $num_posts->publish ); |
|---|
| 9 | - $text = __ngettext( 'Post', 'Posts', intval($num_posts->publish) ); |
|---|
| 10 | + $text = _n( 'Post', 'Posts', intval($num_posts->publish) ); |
|---|
| 11 | if ( current_user_can( 'edit_posts' ) ) { |
|---|
| 12 | $num = "<a href='edit.php'>$num</a>"; |
|---|
| 13 | $text = "<a href='edit.php'>$text</a>"; |
|---|
| 14 | @@ -190,16 +190,16 @@ |
|---|
| 15 | echo '<td class="t posts">' . $text . '</td>'; |
|---|
| 16 | /* TODO: Show status breakdown on hover |
|---|
| 17 | if ( $can_edit_pages && !empty($num_pages->publish) ) { // how many pages is not exposed in feeds. Don't show if !current_user_can |
|---|
| 18 | - $post_type_texts[] = '<a href="edit-pages.php">'.sprintf( __ngettext( '%s page', '%s pages', $num_pages->publish ), number_format_i18n( $num_pages->publish ) ).'</a>'; |
|---|
| 19 | + $post_type_texts[] = '<a href="edit-pages.php">'.sprintf( _n( '%s page', '%s pages', $num_pages->publish ), number_format_i18n( $num_pages->publish ) ).'</a>'; |
|---|
| 20 | } |
|---|
| 21 | if ( $can_edit_posts && !empty($num_posts->draft) ) { |
|---|
| 22 | - $post_type_texts[] = '<a href="edit.php?post_status=draft">'.sprintf( __ngettext( '%s draft', '%s drafts', $num_posts->draft ), number_format_i18n( $num_posts->draft ) ).'</a>'; |
|---|
| 23 | + $post_type_texts[] = '<a href="edit.php?post_status=draft">'.sprintf( _n( '%s draft', '%s drafts', $num_posts->draft ), number_format_i18n( $num_posts->draft ) ).'</a>'; |
|---|
| 24 | } |
|---|
| 25 | if ( $can_edit_posts && !empty($num_posts->future) ) { |
|---|
| 26 | - $post_type_texts[] = '<a href="edit.php?post_status=future">'.sprintf( __ngettext( '%s scheduled post', '%s scheduled posts', $num_posts->future ), number_format_i18n( $num_posts->future ) ).'</a>'; |
|---|
| 27 | + $post_type_texts[] = '<a href="edit.php?post_status=future">'.sprintf( _n( '%s scheduled post', '%s scheduled posts', $num_posts->future ), number_format_i18n( $num_posts->future ) ).'</a>'; |
|---|
| 28 | } |
|---|
| 29 | if ( current_user_can('publish_posts') && !empty($num_posts->pending) ) { |
|---|
| 30 | - $pending_text = sprintf( __ngettext( 'There is <a href="%1$s">%2$s post</a> pending your review.', 'There are <a href="%1$s">%2$s posts</a> pending your review.', $num_posts->pending ), 'edit.php?post_status=pending', number_format_i18n( $num_posts->pending ) ); |
|---|
| 31 | + $pending_text = sprintf( _n( 'There is <a href="%1$s">%2$s post</a> pending your review.', 'There are <a href="%1$s">%2$s posts</a> pending your review.', $num_posts->pending ), 'edit.php?post_status=pending', number_format_i18n( $num_posts->pending ) ); |
|---|
| 32 | } else { |
|---|
| 33 | $pending_text = ''; |
|---|
| 34 | } |
|---|
| 35 | @@ -207,7 +207,7 @@ |
|---|
| 36 | |
|---|
| 37 | // Total Comments |
|---|
| 38 | $num = number_format_i18n($num_comm->total_comments); |
|---|
| 39 | - $text = __ngettext( 'Comment', 'Comments', $num_comm->total_comments ); |
|---|
| 40 | + $text = _n( 'Comment', 'Comments', $num_comm->total_comments ); |
|---|
| 41 | if ( current_user_can( 'moderate_comments' ) ) { |
|---|
| 42 | $num = "<a href='edit-comments.php'>$num</a>"; |
|---|
| 43 | $text = "<a href='edit-comments.php'>$text</a>"; |
|---|
| 44 | @@ -219,7 +219,7 @@ |
|---|
| 45 | |
|---|
| 46 | // Pages |
|---|
| 47 | $num = number_format_i18n( $num_pages->publish ); |
|---|
| 48 | - $text = __ngettext( 'Page', 'Pages', $num_pages->publish ); |
|---|
| 49 | + $text = _n( 'Page', 'Pages', $num_pages->publish ); |
|---|
| 50 | if ( current_user_can( 'edit_pages' ) ) { |
|---|
| 51 | $num = "<a href='edit-pages.php'>$num</a>"; |
|---|
| 52 | $text = "<a href='edit-pages.php'>$text</a>"; |
|---|
| 53 | @@ -241,7 +241,7 @@ |
|---|
| 54 | |
|---|
| 55 | // Categories |
|---|
| 56 | $num = number_format_i18n( $num_cats ); |
|---|
| 57 | - $text = __ngettext( 'Category', 'Categories', $num_cats ); |
|---|
| 58 | + $text = _n( 'Category', 'Categories', $num_cats ); |
|---|
| 59 | if ( current_user_can( 'manage_categories' ) ) { |
|---|
| 60 | $num = "<a href='categories.php'>$num</a>"; |
|---|
| 61 | $text = "<a href='categories.php'>$text</a>"; |
|---|
| 62 | @@ -251,7 +251,7 @@ |
|---|
| 63 | |
|---|
| 64 | // Pending Comments |
|---|
| 65 | $num = number_format_i18n($num_comm->moderated); |
|---|
| 66 | - $text = __ngettext( 'Pending', 'Pending', $num_comm->moderated ); |
|---|
| 67 | + $text = _n( 'Pending', 'Pending', $num_comm->moderated ); |
|---|
| 68 | if ( current_user_can( 'moderate_comments' ) ) { |
|---|
| 69 | $num = "<a href='edit-comments.php?comment_status=moderated'><span class='pending-count'>$num</span></a>"; |
|---|
| 70 | $text = "<a class='waiting' href='edit-comments.php?comment_status=moderated'>$text</a>"; |
|---|
| 71 | @@ -263,7 +263,7 @@ |
|---|
| 72 | |
|---|
| 73 | // Tags |
|---|
| 74 | $num = number_format_i18n( $num_tags ); |
|---|
| 75 | - $text = __ngettext( 'Tag', 'Tags', $num_tags ); |
|---|
| 76 | + $text = _n( 'Tag', 'Tags', $num_tags ); |
|---|
| 77 | if ( current_user_can( 'manage_categories' ) ) { |
|---|
| 78 | $num = "<a href='edit-tags.php'>$num</a>"; |
|---|
| 79 | $text = "<a href='edit-tags.php'>$text</a>"; |
|---|
| 80 | @@ -273,7 +273,7 @@ |
|---|
| 81 | |
|---|
| 82 | // Spam Comments |
|---|
| 83 | $num = number_format_i18n($num_comm->spam); |
|---|
| 84 | - $text = __ngettext( 'Spam', 'Spam', $num_comm->spam ); |
|---|
| 85 | + $text = _n( 'Spam', 'Spam', $num_comm->spam ); |
|---|
| 86 | if ( current_user_can( 'moderate_comments' ) ) { |
|---|
| 87 | $num = "<a href='edit-comments.php?comment_status=spam'><span class='spam-count'>$num</span></a>"; |
|---|
| 88 | $text = "<a class='spam' href='edit-comments.php?comment_status=spam'>$text</a>"; |
|---|
| 89 | @@ -294,9 +294,9 @@ |
|---|
| 90 | echo "\n\t<p>"; |
|---|
| 91 | if ( current_user_can( 'switch_themes' ) ) { |
|---|
| 92 | echo '<a href="themes.php" class="button rbutton">' . __('Change Theme') . '</a>'; |
|---|
| 93 | - printf(__ngettext('Theme <span class="b"><a href="themes.php">%1$s</a></span> with <span class="b"><a href="widgets.php">%2$s Widget</a></span>', 'Theme <span class="b"><a href="themes.php">%1$s</a></span> with <span class="b"><a href="widgets.php">%2$s Widgets</a></span>', $num_widgets), $ct->title, $num); |
|---|
| 94 | + printf(_n('Theme <span class="b"><a href="themes.php">%1$s</a></span> with <span class="b"><a href="widgets.php">%2$s Widget</a></span>', 'Theme <span class="b"><a href="themes.php">%1$s</a></span> with <span class="b"><a href="widgets.php">%2$s Widgets</a></span>', $num_widgets), $ct->title, $num); |
|---|
| 95 | } else { |
|---|
| 96 | - printf(__ngettext('Theme <span class="b">%1$s</span> with <span class="b">%2$s Widget</span>', 'Theme <span class="b">%1$s</span> with <span class="b">%2$s Widgets</span>', $num_widgets), $ct->title, $num); |
|---|
| 97 | + printf(_n('Theme <span class="b">%1$s</span> with <span class="b">%2$s Widget</span>', 'Theme <span class="b">%1$s</span> with <span class="b">%2$s Widgets</span>', $num_widgets), $ct->title, $num); |
|---|
| 98 | } |
|---|
| 99 | |
|---|
| 100 | echo '</p>'; |
|---|