Ticket #9190: dashboard.diff
File dashboard.diff, 6.0 KB (added by , 15 years ago) |
---|
-
wp-admin/includes/dashboard.php
181 181 182 182 // Posts 183 183 $num = number_format_i18n( $num_posts->publish ); 184 $text = _ _ngettext( 'Post', 'Posts', intval($num_posts->publish) );184 $text = _n( 'Post', 'Posts', intval($num_posts->publish) ); 185 185 if ( current_user_can( 'edit_posts' ) ) { 186 186 $num = "<a href='edit.php'>$num</a>"; 187 187 $text = "<a href='edit.php'>$text</a>"; … … 190 190 echo '<td class="t posts">' . $text . '</td>'; 191 191 /* TODO: Show status breakdown on hover 192 192 if ( $can_edit_pages && !empty($num_pages->publish) ) { // how many pages is not exposed in feeds. Don't show if !current_user_can 193 $post_type_texts[] = '<a href="edit-pages.php">'.sprintf( _ _ngettext( '%s page', '%s pages', $num_pages->publish ), number_format_i18n( $num_pages->publish ) ).'</a>';193 $post_type_texts[] = '<a href="edit-pages.php">'.sprintf( _n( '%s page', '%s pages', $num_pages->publish ), number_format_i18n( $num_pages->publish ) ).'</a>'; 194 194 } 195 195 if ( $can_edit_posts && !empty($num_posts->draft) ) { 196 $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>';196 $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>'; 197 197 } 198 198 if ( $can_edit_posts && !empty($num_posts->future) ) { 199 $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>';199 $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>'; 200 200 } 201 201 if ( current_user_can('publish_posts') && !empty($num_posts->pending) ) { 202 $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 ) );202 $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 ) ); 203 203 } else { 204 204 $pending_text = ''; 205 205 } … … 207 207 208 208 // Total Comments 209 209 $num = number_format_i18n($num_comm->total_comments); 210 $text = _ _ngettext( 'Comment', 'Comments', $num_comm->total_comments );210 $text = _n( 'Comment', 'Comments', $num_comm->total_comments ); 211 211 if ( current_user_can( 'moderate_comments' ) ) { 212 212 $num = "<a href='edit-comments.php'>$num</a>"; 213 213 $text = "<a href='edit-comments.php'>$text</a>"; … … 219 219 220 220 // Pages 221 221 $num = number_format_i18n( $num_pages->publish ); 222 $text = _ _ngettext( 'Page', 'Pages', $num_pages->publish );222 $text = _n( 'Page', 'Pages', $num_pages->publish ); 223 223 if ( current_user_can( 'edit_pages' ) ) { 224 224 $num = "<a href='edit-pages.php'>$num</a>"; 225 225 $text = "<a href='edit-pages.php'>$text</a>"; … … 241 241 242 242 // Categories 243 243 $num = number_format_i18n( $num_cats ); 244 $text = _ _ngettext( 'Category', 'Categories', $num_cats );244 $text = _n( 'Category', 'Categories', $num_cats ); 245 245 if ( current_user_can( 'manage_categories' ) ) { 246 246 $num = "<a href='categories.php'>$num</a>"; 247 247 $text = "<a href='categories.php'>$text</a>"; … … 251 251 252 252 // Pending Comments 253 253 $num = number_format_i18n($num_comm->moderated); 254 $text = _ _ngettext( 'Pending', 'Pending', $num_comm->moderated );254 $text = _n( 'Pending', 'Pending', $num_comm->moderated ); 255 255 if ( current_user_can( 'moderate_comments' ) ) { 256 256 $num = "<a href='edit-comments.php?comment_status=moderated'><span class='pending-count'>$num</span></a>"; 257 257 $text = "<a class='waiting' href='edit-comments.php?comment_status=moderated'>$text</a>"; … … 263 263 264 264 // Tags 265 265 $num = number_format_i18n( $num_tags ); 266 $text = _ _ngettext( 'Tag', 'Tags', $num_tags );266 $text = _n( 'Tag', 'Tags', $num_tags ); 267 267 if ( current_user_can( 'manage_categories' ) ) { 268 268 $num = "<a href='edit-tags.php'>$num</a>"; 269 269 $text = "<a href='edit-tags.php'>$text</a>"; … … 273 273 274 274 // Spam Comments 275 275 $num = number_format_i18n($num_comm->spam); 276 $text = _ _ngettext( 'Spam', 'Spam', $num_comm->spam );276 $text = _n( 'Spam', 'Spam', $num_comm->spam ); 277 277 if ( current_user_can( 'moderate_comments' ) ) { 278 278 $num = "<a href='edit-comments.php?comment_status=spam'><span class='spam-count'>$num</span></a>"; 279 279 $text = "<a class='spam' href='edit-comments.php?comment_status=spam'>$text</a>"; … … 294 294 echo "\n\t<p>"; 295 295 if ( current_user_can( 'switch_themes' ) ) { 296 296 echo '<a href="themes.php" class="button rbutton">' . __('Change Theme') . '</a>'; 297 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);297 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); 298 298 } else { 299 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);299 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); 300 300 } 301 301 302 302 echo '</p>';