Ticket #9111: shorter-ngettext-calls.diff
File shorter-ngettext-calls.diff, 43.5 KB (added by , 16 years ago) |
---|
-
wp-includes/formatting.php
1473 1473 if ($mins <= 1) { 1474 1474 $mins = 1; 1475 1475 } 1476 $since = sprintf(_ _ngettext('%s min', '%s mins', $mins), $mins);1476 $since = sprintf(_n('%s min', '%s mins', $mins), $mins); 1477 1477 } else if (($diff <= 86400) && ($diff > 3600)) { 1478 1478 $hours = round($diff / 3600); 1479 1479 if ($hours <= 1) { 1480 1480 $hours = 1; 1481 1481 } 1482 $since = sprintf(_ _ngettext('%s hour', '%s hours', $hours), $hours);1482 $since = sprintf(_n('%s hour', '%s hours', $hours), $hours); 1483 1483 } elseif ($diff >= 86400) { 1484 1484 $days = round($diff / 86400); 1485 1485 if ($days <= 1) { 1486 1486 $days = 1; 1487 1487 } 1488 $since = sprintf(_ _ngettext('%s day', '%s days', $days), $days);1488 $since = sprintf(_n('%s day', '%s days', $days), $days); 1489 1489 } 1490 1490 return $since; 1491 1491 } -
wp-includes/pluggable.php
1038 1038 $notify_message .= sprintf( __('Delete it: %s'), admin_url("comment.php?action=cdc&c=$comment_id") ) . "\r\n"; 1039 1039 $notify_message .= sprintf( __('Spam it: %s'), admin_url("comment.php?action=cdc&dt=spam&c=$comment_id") ) . "\r\n"; 1040 1040 1041 $notify_message .= sprintf( _ _ngettext('Currently %s comment is waiting for approval. Please visit the moderation panel:',1041 $notify_message .= sprintf( _n('Currently %s comment is waiting for approval. Please visit the moderation panel:', 1042 1042 'Currently %s comments are waiting for approval. Please visit the moderation panel:', $comments_waiting), number_format_i18n($comments_waiting) ) . "\r\n"; 1043 1043 $notify_message .= admin_url("edit-comments.php?comment_status=moderated") . "\r\n"; 1044 1044 -
wp-includes/category-template.php
598 598 * @return string text for the tooltip of a tag link. 599 599 */ 600 600 function default_topic_count_text( $count ) { 601 return sprintf( _ _ngettext('%s topic', '%s topics', $count), number_format_i18n( $count ) );601 return sprintf( _n('%s topic', '%s topics', $count), number_format_i18n( $count ) ); 602 602 } 603 603 604 604 /** … … 638 638 639 639 if ( !isset( $args['topic_count_text_callback'] ) && isset( $args['single_text'] ) && isset( $args['multiple_text'] ) ) { 640 640 $body = 'return sprintf ( 641 _ _ngettext('.var_export($args['single_text'], true).', '.var_export($args['multiple_text'], true).', $count),641 _n('.var_export($args['single_text'], true).', '.var_export($args['multiple_text'], true).', $count), 642 642 number_format_i18n( $count ));'; 643 643 $args['topic_count_text_callback'] = create_function('$count', $body); 644 644 } -
wp-admin/users.php
202 202 case 'del': 203 203 case 'del_many': 204 204 $delete_count = isset($_GET['delete_count']) ? (int) $_GET['delete_count'] : 0; 205 $messages[] = '<div id="message" class="updated fade"><p>' . sprintf(_ _ngettext('%s user deleted', '%s users deleted', $delete_count), $delete_count) . '</p></div>';205 $messages[] = '<div id="message" class="updated fade"><p>' . sprintf(_n('%s user deleted', '%s users deleted', $delete_count), $delete_count) . '</p></div>'; 206 206 break; 207 207 case 'add': 208 208 $messages[] = '<div id="message" class="updated fade"><p>' . __('New user created.') . '</p></div>'; … … 264 264 265 265 $current_role = false; 266 266 $class = empty($role) ? ' class="current"' : ''; 267 $role_links[] = "<li><a href='users.php'$class>" . sprintf( _ _ngettext( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_users ), number_format_i18n( $total_users ) ) . '</a>';267 $role_links[] = "<li><a href='users.php'$class>" . sprintf( _n( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_users ), number_format_i18n( $total_users ) ) . '</a>'; 268 268 foreach ( $wp_roles->get_names() as $this_role => $name ) { 269 269 if ( !isset($avail_roles[$this_role]) ) 270 270 continue; -
wp-admin/edit-comments.php
109 109 echo '<div id="moderated" class="updated fade"><p>'; 110 110 111 111 if ( $approved > 0 ) { 112 printf( _ _ngettext( '%s comment approved', '%s comments approved', $approved ), $approved );112 printf( _n( '%s comment approved', '%s comments approved', $approved ), $approved ); 113 113 echo '<br />'; 114 114 } 115 115 116 116 if ( $deleted > 0 ) { 117 printf( _ _ngettext( '%s comment deleted', '%s comments deleted', $deleted ), $deleted );117 printf( _n( '%s comment deleted', '%s comments deleted', $deleted ), $deleted ); 118 118 echo '<br />'; 119 119 } 120 120 121 121 if ( $spam > 0 ) { 122 printf( _ _ngettext( '%s comment marked as spam', '%s comments marked as spam', $spam ), $spam );122 printf( _n( '%s comment marked as spam', '%s comments marked as spam', $spam ), $spam ); 123 123 echo '<br />'; 124 124 } 125 125 … … 136 136 //, number_format_i18n($num_comments->moderated) ), "<span class='comment-count'>" . number_format_i18n($num_comments->moderated) . "</span>"), 137 137 //, number_format_i18n($num_comments->spam) ), "<span class='spam-comment-count'>" . number_format_i18n($num_comments->spam) . "</span>") 138 138 $stati = array( 139 'all' => _ _ngettext_noop('All', 'All'), // singular not used140 'moderated' => _ _ngettext_noop('Pending (<span class="pending-count">%s</span>)', 'Pending (<span class="pending-count">%s</span>)'),141 'approved' => _ _ngettext_noop('Approved', 'Approved'), // singular not used142 'spam' => _ _ngettext_noop('Spam (<span class="spam-count">%s</span>)', 'Spam (<span class="spam-count">%s</span>)')139 'all' => _n_noop('All', 'All'), // singular not used 140 'moderated' => _n_noop('Pending (<span class="pending-count">%s</span>)', 'Pending (<span class="pending-count">%s</span>)'), 141 'approved' => _n_noop('Approved', 'Approved'), // singular not used 142 'spam' => _n_noop('Spam (<span class="spam-count">%s</span>)', 'Spam (<span class="spam-count">%s</span>)') 143 143 ); 144 144 $class = ( '' === $comment_status ) ? ' class="current"' : ''; 145 145 // $status_links[] = "<li><a href='edit-comments.php'$class>" . __( 'All' ) . '</a>'; … … 163 163 $link = add_query_arg( 's', attribute_escape( stripslashes( $_GET['s'] ) ), $link ); 164 164 */ 165 165 $status_links[] = "<li class='$status'><a href='$link'$class>" . sprintf( 166 _ _ngettext( $label[0], $label[1], $num_comments->$status ),166 _n( $label[0], $label[1], $num_comments->$status ), 167 167 number_format_i18n( $num_comments->$status ) 168 168 ) . '</a>'; 169 169 } -
wp-admin/includes/plugin-install.php
338 338 <td class="name"><?php echo $title; ?></td> 339 339 <td class="vers"><?php echo $version; ?></td> 340 340 <td class="vers"> 341 <div class="star-holder" title="<?php printf(_ _ngettext('(based on %s rating)', '(based on %s ratings)', $plugin['num_ratings']), number_format_i18n($plugin['num_ratings'])) ?>">341 <div class="star-holder" title="<?php printf(_n('(based on %s rating)', '(based on %s ratings)', $plugin['num_ratings']), number_format_i18n($plugin['num_ratings'])) ?>"> 342 342 <div class="star star-rating" style="width: <?php echo attribute_escape($plugin['rating']) ?>px"></div> 343 343 <div class="star star5"><img src="<?php echo admin_url('images/star.gif'); ?>" alt="<?php _e('5 stars') ?>" /></div> 344 344 <div class="star star4"><img src="<?php echo admin_url('images/star.gif'); ?>" alt="<?php _e('4 stars') ?>" /></div> … … 485 485 <?php endif; if ( ! empty($api->tested) ) : ?> 486 486 <li><strong><?php _e('Compatible up to:') ?></strong> <?php echo $api->tested ?></li> 487 487 <?php endif; if ( ! empty($api->downloaded) ) : ?> 488 <li><strong><?php _e('Downloaded:') ?></strong> <?php printf(_ _ngettext('%s time', '%s times', $api->downloaded), number_format_i18n($api->downloaded)) ?></li>488 <li><strong><?php _e('Downloaded:') ?></strong> <?php printf(_n('%s time', '%s times', $api->downloaded), number_format_i18n($api->downloaded)) ?></li> 489 489 <?php endif; if ( ! empty($api->slug) ) : ?> 490 490 <li><a target="_blank" href="http://wordpress.org/extend/plugins/<?php echo $api->slug ?>/"><?php _e('WordPress.org Plugin Page »') ?></a></li> 491 491 <?php endif; if ( ! empty($api->homepage) ) : ?> … … 493 493 <?php endif; ?> 494 494 </ul> 495 495 <h2><?php _e('Average Rating') ?></h2> 496 <div class="star-holder" title="<?php printf(_ _ngettext('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings)); ?>">496 <div class="star-holder" title="<?php printf(_n('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings)); ?>"> 497 497 <div class="star star-rating" style="width: <?php echo attribute_escape($api->rating) ?>px"></div> 498 498 <div class="star star5"><img src="<?php echo admin_url('images/star.gif'); ?>" alt="<?php _e('5 stars') ?>" /></div> 499 499 <div class="star star4"><img src="<?php echo admin_url('images/star.gif'); ?>" alt="<?php _e('4 stars') ?>" /></div> … … 501 501 <div class="star star2"><img src="<?php echo admin_url('images/star.gif'); ?>" alt="<?php _e('2 stars') ?>" /></div> 502 502 <div class="star star1"><img src="<?php echo admin_url('images/star.gif'); ?>" alt="<?php _e('1 star') ?>" /></div> 503 503 </div> 504 <small><?php printf(_ _ngettext('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings)); ?></small>504 <small><?php printf(_n('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings)); ?></small> 505 505 </div> 506 506 <div id="section-holder" class="wrap"> 507 507 <?php -
wp-admin/includes/post.php
774 774 $q['m'] = isset($q['m']) ? (int) $q['m'] : 0; 775 775 $q['cat'] = isset($q['cat']) ? (int) $q['cat'] : 0; 776 776 $post_stati = array( // array( adj, noun ) 777 'publish' => array(__('Published'), __('Published posts'), _ _ngettext_noop('Published <span class="count">(%s)</span>', 'Published <span class="count">(%s)</span>')),778 'future' => array(__('Scheduled'), __('Scheduled posts'), _ _ngettext_noop('Scheduled <span class="count">(%s)</span>', 'Scheduled <span class="count">(%s)</span>')),779 'pending' => array(__('Pending Review'), __('Pending posts'), _ _ngettext_noop('Pending Review <span class="count">(%s)</span>', 'Pending Review <span class="count">(%s)</span>')),780 'draft' => array(__('Draft'), _c('Drafts|manage posts header'), _ _ngettext_noop('Draft <span class="count">(%s)</span>', 'Drafts <span class="count">(%s)</span>')),781 'private' => array(__('Private'), __('Private posts'), _ _ngettext_noop('Private <span class="count">(%s)</span>', 'Private <span class="count">(%s)</span>')),777 'publish' => array(__('Published'), __('Published posts'), _n_noop('Published <span class="count">(%s)</span>', 'Published <span class="count">(%s)</span>')), 778 'future' => array(__('Scheduled'), __('Scheduled posts'), _n_noop('Scheduled <span class="count">(%s)</span>', 'Scheduled <span class="count">(%s)</span>')), 779 'pending' => array(__('Pending Review'), __('Pending posts'), _n_noop('Pending Review <span class="count">(%s)</span>', 'Pending Review <span class="count">(%s)</span>')), 780 'draft' => array(__('Draft'), _c('Drafts|manage posts header'), _n_noop('Draft <span class="count">(%s)</span>', 'Drafts <span class="count">(%s)</span>')), 781 'private' => array(__('Private'), __('Private posts'), _n_noop('Private <span class="count">(%s)</span>', 'Private <span class="count">(%s)</span>')), 782 782 ); 783 783 784 784 $post_stati = apply_filters('post_stati', $post_stati); … … 840 840 $q['post_status'] = 'any'; 841 841 $q['posts_per_page'] = 15; 842 842 $post_mime_types = array( // array( adj, noun ) 843 'image' => array(__('Images'), __('Manage Images'), _ _ngettext_noop('Image <span class="count">(%s)</span>', 'Images <span class="count">(%s)</span>')),844 'audio' => array(__('Audio'), __('Manage Audio'), _ _ngettext_noop('Audio <span class="count">(%s)</span>', 'Audio <span class="count">(%s)</span>')),845 'video' => array(__('Video'), __('Manage Video'), _ _ngettext_noop('Video <span class="count">(%s)</span>', 'Video <span class="count">(%s)</span>')),843 'image' => array(__('Images'), __('Manage Images'), _n_noop('Image <span class="count">(%s)</span>', 'Images <span class="count">(%s)</span>')), 844 'audio' => array(__('Audio'), __('Manage Audio'), _n_noop('Audio <span class="count">(%s)</span>', 'Audio <span class="count">(%s)</span>')), 845 'video' => array(__('Video'), __('Manage Video'), _n_noop('Video <span class="count">(%s)</span>', 'Video <span class="count">(%s)</span>')), 846 846 ); 847 847 $post_mime_types = apply_filters('post_mime_types', $post_mime_types); 848 848 -
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>'; -
wp-admin/includes/theme-install.php
469 469 <?php endif; if ( ! empty($api->tested) ) : ?> 470 470 <li><strong><?php _e('Compatible up to:') ?></strong> <?php echo $api->tested ?></li> 471 471 <?php endif; if ( ! empty($api->downloaded) ) : ?> 472 <li><strong><?php _e('Downloaded:') ?></strong> <?php printf(_ _ngettext('%s time', '%s times', $api->downloaded), number_format_i18n($api->downloaded)) ?></li>472 <li><strong><?php _e('Downloaded:') ?></strong> <?php printf(_n('%s time', '%s times', $api->downloaded), number_format_i18n($api->downloaded)) ?></li> 473 473 <?php endif; if ( ! empty($api->slug) ) : ?> 474 474 <li><a target="_blank" href="http://wordpress.org/extend/themes/<?php echo $api->slug ?>/"><?php _e('WordPress.org Theme Page »') ?></a></li> 475 475 <?php endif; if ( ! empty($api->homepage) ) : ?> … … 477 477 <?php endif; ?> 478 478 </ul> 479 479 <h2><?php _e('Average Rating') ?></h2> 480 <div class="star-holder" title="<?php printf(_ _ngettext('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings)); ?>">480 <div class="star-holder" title="<?php printf(_n('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings)); ?>"> 481 481 <div class="star star-rating" style="width: <?php echo attribute_escape($api->rating) ?>px"></div> 482 482 <div class="star star5"><img src="<?php echo admin_url('images/star.gif'); ?>" alt="<?php _e('5 stars') ?>" /></div> 483 483 <div class="star star4"><img src="<?php echo admin_url('images/star.gif'); ?>" alt="<?php _e('4 stars') ?>" /></div> … … 485 485 <div class="star star2"><img src="<?php echo admin_url('images/star.gif'); ?>" alt="<?php _e('2 stars') ?>" /></div> 486 486 <div class="star star1"><img src="<?php echo admin_url('images/star.gif'); ?>" alt="<?php _e('1 star') ?>" /></div> 487 487 </div> 488 <small><?php printf(_ _ngettext('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings)); ?></small>488 <small><?php printf(_n('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings)); ?></small> 489 489 </div> 490 490 <div id="section-holder" class="wrap"> 491 491 <?php -
wp-admin/includes/media.php
1690 1690 if ( wp_match_mime_types($mime_type, $_GET['post_mime_type']) ) 1691 1691 $class = ' class="current"'; 1692 1692 1693 $type_links[] = "<li><a href='" . clean_url(add_query_arg(array('post_mime_type'=>$mime_type, 'paged'=>false))) . "'$class>" . sprintf(_ _ngettext($label[2][0], $label[2][1], $num_posts[$mime_type]), "<span id='$mime_type-counter'>" . number_format_i18n( $num_posts[$mime_type] ) . '</span>') . '</a>';1693 $type_links[] = "<li><a href='" . clean_url(add_query_arg(array('post_mime_type'=>$mime_type, 'paged'=>false))) . "'$class>" . sprintf(_n($label[2][0], $label[2][1], $num_posts[$mime_type]), "<span id='$mime_type-counter'>" . number_format_i18n( $num_posts[$mime_type] ) . '</span>') . '</a>'; 1694 1694 } 1695 1695 echo implode(' | </li>', $type_links) . '</li>'; 1696 1696 unset($type_links); -
wp-admin/import/btt.php
83 83 return false; 84 84 } else { 85 85 $count = count($metakeys); 86 echo '<p>' . sprintf( _ _ngettext('Done! <strong>%s</strong> post with tags were read.', 'Done! <strong>%s</strong> posts with tags were read.', $count), $count ) . '<br /></p>';86 echo '<p>' . sprintf( _n('Done! <strong>%s</strong> post with tags were read.', 'Done! <strong>%s</strong> posts with tags were read.', $count), $count ) . '<br /></p>'; 87 87 echo '<ul>'; 88 88 foreach ( $metakeys as $post_meta ) { 89 89 if ( $post_meta->meta_value != '' ) { -
wp-admin/import/jkw.php
98 98 return false; 99 99 } else { 100 100 $count = count($metakeys); 101 echo '<p>' . sprintf( _ _ngettext('Done! <strong>%s</strong> post with tags were read.', 'Done! <strong>%s</strong> posts with tags were read.', $count), $count ) . '<br /></p>';101 echo '<p>' . sprintf( _n('Done! <strong>%s</strong> post with tags were read.', 'Done! <strong>%s</strong> posts with tags were read.', $count), $count ) . '<br /></p>'; 102 102 echo '<ul>'; 103 103 foreach ( $metakeys as $post_meta ) { 104 104 if ( $post_meta->meta_value != '' ) { … … 139 139 return false; 140 140 } else { 141 141 $count = count($metakeys); 142 echo '<p>' . sprintf( _ _ngettext('Done! <strong>%s</strong> tag were read.', 'Done! <strong>%s</strong> tags were read.', $count), $count ) . '<br /></p>';142 echo '<p>' . sprintf( _n('Done! <strong>%s</strong> tag were read.', 'Done! <strong>%s</strong> tags were read.', $count), $count ) . '<br /></p>'; 143 143 echo '<ul>'; 144 144 foreach ( $metakeys as $post_meta ) { 145 145 $keyword = addslashes(trim($post_meta->tag_name)); -
wp-admin/import/dotclear.php
312 312 313 313 // Store category translation for future use 314 314 add_option('dccat2wpcat',$dccat2wpcat); 315 echo '<p>'.sprintf(_ _ngettext('Done! <strong>%1$s</strong> category imported.', 'Done! <strong>%1$s</strong> categories imported.', $count), $count).'<br /><br /></p>';315 echo '<p>'.sprintf(_n('Done! <strong>%1$s</strong> category imported.', 'Done! <strong>%1$s</strong> categories imported.', $count), $count).'<br /><br /></p>'; 316 316 return true; 317 317 } 318 318 echo __('No Categories to Import!'); … … 613 613 } 614 614 add_option('dclinks2wplinks',$dclinks2wplinks); 615 615 echo '<p>'; 616 printf(_ _ngettext('Done! <strong>%s</strong> link or link category imported.', 'Done! <strong>%s</strong> links or link categories imported.', $count), $count);616 printf(_n('Done! <strong>%s</strong> link or link category imported.', 'Done! <strong>%s</strong> links or link categories imported.', $count), $count); 617 617 echo '<br /><br /></p>'; 618 618 return true; 619 619 } -
wp-admin/import/blogware.php
155 155 } 156 156 if ( $num_comments ) { 157 157 echo ' '; 158 printf( _ _ngettext('%s comment', '%s comments', $num_comments), $num_comments );158 printf( _n('%s comment', '%s comments', $num_comments), $num_comments ); 159 159 } 160 160 echo '</li>'; 161 161 flush(); -
wp-admin/import/stp.php
88 88 89 89 add_option('stpimp_posts', $posts); 90 90 $count = count($posts); 91 echo '<p>' . sprintf( _ _ngettext('Done! <strong>%s</strong> tag to post relationships were read.', 'Done! <strong>%s</strong> tags to post relationships were read.', $count), $count ) . '<br /></p>';91 echo '<p>' . sprintf( _n('Done! <strong>%s</strong> tag to post relationships were read.', 'Done! <strong>%s</strong> tags to post relationships were read.', $count), $count ) . '<br /></p>'; 92 92 } 93 93 94 94 echo '<form action="admin.php?import=stp&step=2" method="post">'; … … 106 106 // run that funky magic! 107 107 $tags_added = $this->tag2post(); 108 108 109 echo '<p>' . sprintf( _ _ngettext('Done! <strong>%s</strong> tag was added!', 'Done! <strong>%s</strong> tags were added!', $tags_added), $tags_added ) . '<br /></p>';109 echo '<p>' . sprintf( _n('Done! <strong>%s</strong> tag was added!', 'Done! <strong>%s</strong> tags were added!', $tags_added), $tags_added ) . '<br /></p>'; 110 110 echo '<form action="admin.php?import=stp&step=3" method="post">'; 111 111 wp_nonce_field('import-stp'); 112 112 echo '<p class="submit"><input type="submit" name="submit" class="button" value="'.__('Step 3').'" /></p>'; -
wp-admin/import/wp-cat2tag.php
65 65 66 66 if ( $cat_num > 0 ) { 67 67 screen_icon(); 68 echo '<h2>' . sprintf( _ _ngettext( 'Convert Category to Tag.', 'Convert Categories (%d) to Tags.', $cat_num ), $cat_num ) . '</h2>';68 echo '<h2>' . sprintf( _n( 'Convert Category to Tag.', 'Convert Categories (%d) to Tags.', $cat_num ), $cat_num ) . '</h2>'; 69 69 echo '<div class="narrow">'; 70 70 echo '<p>' . __('Hey there. Here you can selectively convert existing categories to tags. To get started, check the categories you wish to be converted, then click the Convert button.') . '</p>'; 71 71 echo '<p>' . __('Keep in mind that if you convert a category with child categories, the children become top-level orphans.') . '</p></div>'; … … 141 141 142 142 if ( $tags_num > 0 ) { 143 143 screen_icon(); 144 echo '<h2>' . sprintf( _ _ngettext( 'Convert Tag to Category.', 'Convert Tags (%d) to Categories.', $tags_num ), $tags_num ) . '</h2>';144 echo '<h2>' . sprintf( _n( 'Convert Tag to Category.', 'Convert Tags (%d) to Categories.', $tags_num ), $tags_num ) . '</h2>'; 145 145 echo '<div class="narrow">'; 146 146 echo '<p>' . __('Here you can selectively converts existing tags to categories. To get started, check the tags you wish to be converted, then click the Convert button.') . '</p>'; 147 147 echo '<p>' . __('The newly created categories will still be associated with the same posts.') . '</p></div>'; -
wp-admin/import/utw.php
98 98 99 99 $count = count($tags); 100 100 101 echo '<p>' . sprintf( _ _ngettext('Done! <strong>%s</strong> tag were read.', 'Done! <strong>%s</strong> tags were read.', $count), $count ) . '<br /></p>';101 echo '<p>' . sprintf( _n('Done! <strong>%s</strong> tag were read.', 'Done! <strong>%s</strong> tags were read.', $count), $count ) . '<br /></p>'; 102 102 echo '<p>' . __('The following tags were found:') . '</p>'; 103 103 104 104 echo '<ul>'; … … 150 150 151 151 $count = count($posts); 152 152 153 echo '<p>' . sprintf( _ _ngettext('Done! <strong>%s</strong> tag to post relationships were read.', 'Done! <strong>%s</strong> tags to post relationships were read.', $count), $count ) . '<br /></p>';153 echo '<p>' . sprintf( _n('Done! <strong>%s</strong> tag to post relationships were read.', 'Done! <strong>%s</strong> tags to post relationships were read.', $count), $count ) . '<br /></p>'; 154 154 155 155 } 156 156 … … 171 171 // run that funky magic! 172 172 $tags_added = $this->tag2post(); 173 173 174 echo '<p>' . sprintf( _ _ngettext( 'Done! <strong>%s</strong> tag were added!', 'Done! <strong>%s</strong> tags were added!', $tags_added ), $tags_added ) . '<br /></p>';174 echo '<p>' . sprintf( _n( 'Done! <strong>%s</strong> tag were added!', 'Done! <strong>%s</strong> tags were added!', $tags_added ), $tags_added ) . '<br /></p>'; 175 175 176 176 echo '<form action="admin.php?import=utw&step=4" method="post">'; 177 177 wp_nonce_field('import-utw'); -
wp-admin/import/mt.php
288 288 } 289 289 290 290 if ( $num_comments ) 291 printf(' '._ _ngettext('(%s comment)', '(%s comments)', $num_comments), $num_comments);291 printf(' '._n('(%s comment)', '(%s comments)', $num_comments), $num_comments); 292 292 293 293 $num_pings = 0; 294 294 foreach ( $pings as $ping ) { … … 305 305 } 306 306 307 307 if ( $num_pings ) 308 printf(' '._ _ngettext('(%s ping)', '(%s pings)', $num_pings), $num_pings);308 printf(' '._n('(%s ping)', '(%s pings)', $num_pings), $num_pings); 309 309 310 310 echo "</li>"; 311 311 //ob_flush();flush(); -
wp-admin/import/textpattern.php
201 201 202 202 // Store category translation for future use 203 203 add_option('txpcat2wpcat',$txpcat2wpcat); 204 echo '<p>'.sprintf(_ _ngettext('Done! <strong>%1$s</strong> category imported.', 'Done! <strong>%1$s</strong> categories imported.', $count), $count).'<br /><br /></p>';204 echo '<p>'.sprintf(_n('Done! <strong>%1$s</strong> category imported.', 'Done! <strong>%1$s</strong> categories imported.', $count), $count).'<br /><br /></p>'; 205 205 return true; 206 206 } 207 207 echo __('No Categories to Import!'); … … 486 486 } 487 487 add_option('txplinks2wplinks',$txplinks2wplinks); 488 488 echo '<p>'; 489 printf(_ _ngettext('Done! <strong>%s</strong> link imported', 'Done! <strong>%s</strong> links imported', $count), $count);489 printf(_n('Done! <strong>%s</strong> link imported', 'Done! <strong>%s</strong> links imported', $count), $count); 490 490 echo '<br /><br /></p>'; 491 491 return true; 492 492 } -
wp-admin/import/greymatter.php
283 283 } 284 284 if ($numAddedComments > 0) { 285 285 echo ': '; 286 printf( _ _ngettext('imported %s comment', 'imported %s comments', $numAddedComments) , $numAddedComments);286 printf( _n('imported %s comment', 'imported %s comments', $numAddedComments) , $numAddedComments); 287 287 } 288 288 $preExisting = $numComments - numAddedComments; 289 289 if ($preExisting > 0) { 290 290 echo ' '; 291 printf( _ _ngettext( 'ignored %s pre-existing comment', 'ignored %s pre-existing comments', $preExisting ) , $preExisting);291 printf( _n( 'ignored %s pre-existing comment', 'ignored %s pre-existing comments', $preExisting ) , $preExisting); 292 292 } 293 293 } 294 294 echo '... <strong>'.__('Done').'</strong></li>'; -
wp-admin/import/wordpress.php
528 528 } } 529 529 530 530 if ( $num_comments ) 531 printf(' '._ _ngettext('(%s comment)', '(%s comments)', $num_comments), $num_comments);531 printf(' '._n('(%s comment)', '(%s comments)', $num_comments), $num_comments); 532 532 533 533 // Now for post meta 534 534 preg_match_all('|<wp:postmeta>(.*?)</wp:postmeta>|is', $post, $postmeta); -
wp-admin/upload.php
121 121 } 122 122 123 123 $post_mime_types = array( 124 'image' => array(__('Images'), __('Manage Images'), _ _ngettext_noop('Image (%s)', 'Images (%s)')),125 'audio' => array(__('Audio'), __('Manage Audio'), _ _ngettext_noop('Audio (%s)', 'Audio (%s)')),126 'video' => array(__('Video'), __('Manage Video'), _ _ngettext_noop('Video (%s)', 'Video (%s)')),124 'image' => array(__('Images'), __('Manage Images'), _n_noop('Image (%s)', 'Images (%s)')), 125 'audio' => array(__('Audio'), __('Manage Audio'), _n_noop('Audio (%s)', 'Audio (%s)')), 126 'video' => array(__('Video'), __('Manage Video'), _n_noop('Video (%s)', 'Video (%s)')), 127 127 ); 128 128 $post_mime_types = apply_filters('post_mime_types', $post_mime_types); 129 129 … … 147 147 148 148 if ( isset($_GET['attached']) && (int) $_GET['attached'] ) { 149 149 $attached = (int) $_GET['attached']; 150 $message = sprintf( _ _ngettext('Reattached %d attachment', 'Reattached %d attachments', $attached), $attached );150 $message = sprintf( _n('Reattached %d attachment', 'Reattached %d attachments', $attached), $attached ); 151 151 $_SERVER['REQUEST_URI'] = remove_query_arg(array('attached'), $_SERVER['REQUEST_URI']); 152 152 } 153 153 … … 188 188 $num_posts[$type] = ( isset( $num_posts[$type] ) ) ? $num_posts[$type] + $_num_posts[$real] : $_num_posts[$real]; 189 189 190 190 $class = empty($_GET['post_mime_type']) && ! isset($_GET['detached']) ? ' class="current"' : ''; 191 $type_links[] = "<li><a href='upload.php'$class>" . sprintf( _ _ngettext( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $_total_posts ), number_format_i18n( $_total_posts ) ) . '</a>';191 $type_links[] = "<li><a href='upload.php'$class>" . sprintf( _n( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $_total_posts ), number_format_i18n( $_total_posts ) ) . '</a>'; 192 192 foreach ( $post_mime_types as $mime_type => $label ) { 193 193 $class = ''; 194 194 … … 198 198 if ( !empty($_GET['post_mime_type']) && wp_match_mime_types($mime_type, $_GET['post_mime_type']) ) 199 199 $class = ' class="current"'; 200 200 201 $type_links[] = "<li><a href='upload.php?post_mime_type=$mime_type'$class>" . sprintf( _ _ngettext( $label[2][0], $label[2][1], $num_posts[$mime_type] ), number_format_i18n( $num_posts[$mime_type] )) . '</a>';201 $type_links[] = "<li><a href='upload.php?post_mime_type=$mime_type'$class>" . sprintf( _n( $label[2][0], $label[2][1], $num_posts[$mime_type] ), number_format_i18n( $num_posts[$mime_type] )) . '</a>'; 202 202 } 203 203 $class = isset($_GET['detached']) ? ' class="current"' : ''; 204 204 $type_links[] = '<li><a href="upload.php?detached=1"' . $class . '>' . __('Unattached') . '</a>'; -
wp-admin/edit.php
110 110 <?php if ( isset($_GET['locked']) || isset($_GET['skipped']) || isset($_GET['updated']) || isset($_GET['deleted']) ) { ?> 111 111 <div id="message" class="updated fade"><p> 112 112 <?php if ( isset($_GET['updated']) && (int) $_GET['updated'] ) { 113 printf( _ _ngettext( '%s post updated.', '%s posts updated.', $_GET['updated'] ), number_format_i18n( $_GET['updated'] ) );113 printf( _n( '%s post updated.', '%s posts updated.', $_GET['updated'] ), number_format_i18n( $_GET['updated'] ) ); 114 114 unset($_GET['updated']); 115 115 } 116 116 … … 118 118 unset($_GET['skipped']); 119 119 120 120 if ( isset($_GET['locked']) && (int) $_GET['locked'] ) { 121 printf( _ _ngettext( '%s post not updated, somebody is editing it.', '%s posts not updated, somebody is editing them.', $_GET['locked'] ), number_format_i18n( $_GET['locked'] ) );121 printf( _n( '%s post not updated, somebody is editing it.', '%s posts not updated, somebody is editing them.', $_GET['locked'] ), number_format_i18n( $_GET['locked'] ) ); 122 122 unset($_GET['locked']); 123 123 } 124 124 125 125 if ( isset($_GET['deleted']) && (int) $_GET['deleted'] ) { 126 printf( _ _ngettext( 'Post deleted.', '%s posts deleted.', $_GET['deleted'] ), number_format_i18n( $_GET['deleted'] ) );126 printf( _n( 'Post deleted.', '%s posts deleted.', $_GET['deleted'] ), number_format_i18n( $_GET['deleted'] ) ); 127 127 unset($_GET['deleted']); 128 128 } 129 129 … … 141 141 $num_posts = wp_count_posts( 'post', 'readable' ); 142 142 $total_posts = array_sum( (array) $num_posts ); 143 143 $class = empty( $_GET['post_status'] ) ? ' class="current"' : ''; 144 $status_links[] = "<li><a href='edit.php' $class>" . sprintf( _ _ngettext( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_posts ), number_format_i18n( $total_posts ) ) . '</a>';144 $status_links[] = "<li><a href='edit.php' $class>" . sprintf( _n( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_posts ), number_format_i18n( $total_posts ) ) . '</a>'; 145 145 146 146 147 147 foreach ( $post_stati as $status => $label ) { … … 155 155 if ( isset($_GET['post_status']) && $status == $_GET['post_status'] ) 156 156 $class = ' class="current"'; 157 157 158 $status_links[] = "<li><a href='edit.php?post_status=$status' $class>" . sprintf( _ _ngettext( $label[2][0], $label[2][1], $num_posts->$status ), number_format_i18n( $num_posts->$status ) ) . '</a>';158 $status_links[] = "<li><a href='edit.php?post_status=$status' $class>" . sprintf( _n( $label[2][0], $label[2][1], $num_posts->$status ), number_format_i18n( $num_posts->$status ) ) . '</a>'; 159 159 } 160 160 echo implode( " |</li>\n", $status_links ) . '</li>'; 161 161 unset( $status_links ); -
wp-admin/link-manager.php
80 80 if ( isset($_GET['deleted']) ) { 81 81 echo '<div id="message" class="updated fade"><p>'; 82 82 $deleted = (int) $_GET['deleted']; 83 printf(_ _ngettext('%s link deleted.', '%s links deleted', $deleted), $deleted);83 printf(_n('%s link deleted.', '%s links deleted', $deleted), $deleted); 84 84 echo '</p></div>'; 85 85 $_SERVER['REQUEST_URI'] = remove_query_arg(array('deleted'), $_SERVER['REQUEST_URI']); 86 86 } -
wp-admin/widgets.php
192 192 193 193 // This is sort of lame since "widget" won't be converted to "widgets" in the JS 194 194 if ( 1 < $sidebars_count = count($wp_registered_sidebars) ) 195 $sidebar_info_text = _ _ngettext( 'You are using %1$s widget in the "%2$s" sidebar.', 'You are using %1$s widgets in the "%2$s" sidebar.', $sidebar_widget_count );195 $sidebar_info_text = _n( 'You are using %1$s widget in the "%2$s" sidebar.', 'You are using %1$s widgets in the "%2$s" sidebar.', $sidebar_widget_count ); 196 196 else 197 $sidebar_info_text = _ _ngettext( 'You are using %1$s widget in the sidebar.', 'You are using %1$s widgets in the sidebar.', $sidebar_widget_count );197 $sidebar_info_text = _n( 'You are using %1$s widget in the sidebar.', 'You are using %1$s widgets in the sidebar.', $sidebar_widget_count ); 198 198 199 199 200 200 $sidebar_info_text = sprintf( wp_specialchars( $sidebar_info_text ), "<span id='widget-count'>$sidebar_widget_count</span>", $wp_registered_sidebars[$sidebar]['name'] ); -
wp-admin/edit-pages.php
112 112 <?php if ( isset($_GET['locked']) || isset($_GET['skipped']) || isset($_GET['updated']) || isset($_GET['deleted']) ) { ?> 113 113 <div id="message" class="updated fade"><p> 114 114 <?php if ( isset($_GET['updated']) && (int) $_GET['updated'] ) { 115 printf( _ _ngettext( '%s page updated.', '%s pages updated.', $_GET['updated'] ), number_format_i18n( $_GET['updated'] ) );115 printf( _n( '%s page updated.', '%s pages updated.', $_GET['updated'] ), number_format_i18n( $_GET['updated'] ) ); 116 116 unset($_GET['updated']); 117 117 } 118 118 119 119 if ( isset($_GET['skipped']) && (int) $_GET['skipped'] ) { 120 printf( _ _ngettext( '%s page not updated, invalid parent page specified.', '%s pages not updated, invalid parent page specified.', $_GET['skipped'] ), number_format_i18n( $_GET['skipped'] ) );120 printf( _n( '%s page not updated, invalid parent page specified.', '%s pages not updated, invalid parent page specified.', $_GET['skipped'] ), number_format_i18n( $_GET['skipped'] ) ); 121 121 unset($_GET['skipped']); 122 122 } 123 123 124 124 if ( isset($_GET['locked']) && (int) $_GET['locked'] ) { 125 printf( _ _ngettext( '%s page not updated, somebody is editing it.', '%s pages not updated, somebody is editing them.', $_GET['locked'] ), number_format_i18n( $_GET['skipped'] ) );125 printf( _n( '%s page not updated, somebody is editing it.', '%s pages not updated, somebody is editing them.', $_GET['locked'] ), number_format_i18n( $_GET['skipped'] ) ); 126 126 unset($_GET['locked']); 127 127 } 128 128 129 129 if ( isset($_GET['deleted']) && (int) $_GET['deleted'] ) { 130 printf( _ _ngettext( 'Page deleted.', '%s pages deleted.', $_GET['deleted'] ), number_format_i18n( $_GET['deleted'] ) );130 printf( _n( 'Page deleted.', '%s pages deleted.', $_GET['deleted'] ), number_format_i18n( $_GET['deleted'] ) ); 131 131 unset($_GET['deleted']); 132 132 } 133 133 $_SERVER['REQUEST_URI'] = remove_query_arg( array('locked', 'skipped', 'updated', 'deleted'), $_SERVER['REQUEST_URI'] ); … … 150 150 $num_posts = wp_count_posts('page', 'readable'); 151 151 $total_posts = array_sum( (array) $num_posts ); 152 152 $class = empty($_GET['post_status']) ? ' class="current"' : ''; 153 $status_links[] = "<li><a href='edit-pages.php'$class>" . sprintf( _ _ngettext( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_posts ), number_format_i18n( $total_posts ) ) . '</a>';153 $status_links[] = "<li><a href='edit-pages.php'$class>" . sprintf( _n( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_posts ), number_format_i18n( $total_posts ) ) . '</a>'; 154 154 foreach ( $post_stati as $status => $label ) { 155 155 $class = ''; 156 156