Changeset 7397
- Timestamp:
- 03/19/2008 04:00:09 PM (17 years ago)
- Location:
- trunk
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit-comments.php
r7344 r7397 98 98 $status_links = array(); 99 99 $num_comments = wp_count_comments(); 100 $stati = array('moderated' => sprintf(__ ('Awaiting Moderation (%s)'), "<span class='comment-count'>$num_comments->moderated</span>"), 'approved' => __('Approved'));100 $stati = array('moderated' => sprintf(__ngettext('Awaiting Moderation (%s)', 'Awaiting Moderation (%s)', $num_comments->moderated), "<span class='comment-count'>$num_comments->moderated</span>"), 'approved' => _c('Approved|plural')); 101 101 $class = ( '' === $comment_status ) ? ' class="current"' : ''; 102 102 $status_links[] = "<li><a href=\"edit-comments.php\"$class>".__('Show All Comments')."</a>"; -
trunk/wp-admin/edit-pages.php
r7307 r7397 37 37 38 38 $post_stati = array( // array( adj, noun ) 39 'publish' => array(__('Published'), __('Published pages'), __ ('Published (%s)')),40 'future' => array(__('Scheduled'), __('Scheduled pages'), __ ('Scheduled (%s)')),41 'pending' => array(__('Pending Review'), __('Pending pages'), __ ('Pending Review (%s)')),42 'draft' => array(__('Draft'), _c('Drafts|manage posts header'), _ c('Draft (%s)|manage posts header')),43 'private' => array(__('Private'), __('Private pages'), __ ('Private (%s)'))39 'publish' => array(__('Published'), __('Published pages'), __ngettext_noop('Published (%s)', 'Published (%s)')), 40 'future' => array(__('Scheduled'), __('Scheduled pages'), __ngettext_noop('Scheduled (%s)', 'Scheduled (%s)')), 41 'pending' => array(__('Pending Review'), __('Pending pages'), __ngettext_noop('Pending Review (%s)', 'Pending Review (%s)')), 42 'draft' => array(__('Draft'), _c('Drafts|manage posts header'), __ngettext_noop('Draft (%s)', 'Drafts (%s)')), 43 'private' => array(__('Private'), __('Private pages'), __ngettext_noop('Private (%s)', 'Private (%s)')) 44 44 ); 45 45 … … 94 94 95 95 $status_links[] = "<li><a href=\"edit-pages.php?post_status=$status\"$class>" . 96 sprintf( $label[2], $num_posts->$status) . '</a>';96 sprintf(__ngettext($label[2][0], $label[2][1], $num_posts->$status), $num_posts->$status) . '</a>'; 97 97 } 98 98 echo implode(' |</li>', $status_links) . '</li>'; -
trunk/wp-admin/edit.php
r7359 r7397 98 98 99 99 $status_links[] = "<li><a href=\"edit.php?post_status=$status\"$class>" . 100 sprintf( $label[2], $num_posts->$status) . '</a>';100 sprintf(__ngettext($label[2][0], $label[2][1], $num_posts->$status), $num_posts->$status) . '</a>'; 101 101 } 102 102 echo implode(' |</li>', $status_links) . '</li>'; -
trunk/wp-admin/import/dotclear.php
r7072 r7397 226 226 // Store category translation for future use 227 227 add_option('dccat2wpcat',$dccat2wpcat); 228 echo '<p>'.sprintf(__ ('Done! <strong>%1$s</strong> categories imported.'), $count).'<br /><br /></p>';228 echo '<p>'.sprintf(__ngettext('Done! <strong>%1$s</strong> category imported.', 'Done! <strong>%1$s</strong> categories imported.', $count), $count).'<br /><br /></p>'; 229 229 return true; 230 230 } -
trunk/wp-admin/import/greymatter.php
r7072 r7397 270 270 if ($numAddedComments > 0) { 271 271 echo ': '; 272 printf( __('imported %s'), sprintf( __ngettext('%s comment', '%s comments', $numAddedComments) , $numAddedComments));272 printf( __ngettext('imported %s comment', 'imported %s comments', $numAddedComments) , $numAddedComments); 273 273 } 274 274 $preExisting = $numComments - numAddedComments; 275 275 if ($preExisting > 0) { 276 276 echo ' '; 277 printf( __('ignored %s'), sprintf( __ngettext( '%s pre-existing comment', '%s pre-existing comments', $preExisting ) , $preExisting));277 printf( __ngettext( 'ignored %s pre-existing comment', 'ignored %s pre-existing comments', $preExisting ) , $preExisting); 278 278 } 279 279 } -
trunk/wp-admin/import/textpattern.php
r7072 r7397 178 178 // Store category translation for future use 179 179 add_option('txpcat2wpcat',$txpcat2wpcat); 180 echo '<p>'.sprintf(__ ('Done! <strong>%1$s</strong> categories imported.'), $count).'<br /><br /></p>';180 echo '<p>'.sprintf(__ngettext('Done! <strong>%1$s</strong> category imported.', 'Done! <strong>%1$s</strong> categories imported.', $count), $count).'<br /><br /></p>'; 181 181 return true; 182 182 } -
trunk/wp-admin/includes/media.php
r7396 r7397 993 993 $class = ' class="current"'; 994 994 995 $type_links[] = "<li><a href='" . add_query_arg(array('post_mime_type'=>$mime_type, 'paged'=>false)) . "'$class>" . sprintf( $label[2], "<span id='$mime_type-counter'>{$num_posts[$mime_type]}</span>") . '</a>';995 $type_links[] = "<li><a href='" . 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'>{$num_posts[$mime_type]}</span>") . '</a>'; 996 996 } 997 997 echo implode(' | </li>', $type_links) . '</li>'; -
trunk/wp-admin/includes/post.php
r7352 r7397 520 520 $q['cat'] = (int) $q['cat']; 521 521 $post_stati = array( // array( adj, noun ) 522 'publish' => array(__('Published'), __('Published posts'), __ ('Published (%s)')),523 'future' => array(__('Scheduled'), __('Scheduled posts'), __ ('Scheduled (%s)')),524 'pending' => array(__('Pending Review'), __('Pending posts'), __ ('Pending Review (%s)')),525 'draft' => array(__('Draft'), _c('Drafts|manage posts header'), _ c('Draft (%s)|manage posts header')),526 'private' => array(__('Private'), __('Private posts'), __ ('Private (%s)'))522 'publish' => array(__('Published'), __('Published posts'), __ngettext_noop('Published (%s)', 'Published (%s)')), 523 'future' => array(__('Scheduled'), __('Scheduled posts'), __ngettext_noop('Scheduled (%s)', 'Scheduled (%s)')), 524 'pending' => array(__('Pending Review'), __('Pending posts'), __ngettext_noop('Pending Review (%s)', 'Pending Review (%s)')), 525 'draft' => array(__('Draft'), _c('Drafts|manage posts header'), __ngettext_noop('Draft (%s)', 'Drafts (%s)')), 526 'private' => array(__('Private'), __('Private posts'), __ngettext_noop('Private (%s)', 'Private (%s)')), 527 527 ); 528 528 … … 569 569 $q['post_status'] = 'any'; 570 570 $post_mime_types = array( // array( adj, noun ) 571 'image' => array(__('Images'), __('Manage Images'), __ ('Images (%s)')),572 'audio' => array(__('Audio'), __('Manage Audio'), __ ('Audio (%s)')),573 'video' => array(__('Video'), __('Manage Video'), __ ('Video (%s)')),571 'image' => array(__('Images'), __('Manage Images'), __ngettext_noop('Image (%s)', 'Images (%s)')), 572 'audio' => array(__('Audio'), __('Manage Audio'), __ngettext_noop('Audio (%s)', 'Audio (%s)')), 573 'video' => array(__('Video'), __('Manage Video'), __ngettext_noop('Video (%s)', 'Video (%s)')), 574 574 ); 575 575 $post_mime_types = apply_filters('post_mime_types', $post_mime_types); -
trunk/wp-admin/upload.php
r7359 r7397 99 99 100 100 $type_links[] = "<li><a href=\"upload.php?post_mime_type=$mime_type\"$class>" . 101 sprintf( $label[2], $num_posts[$mime_type]) . '</a>';101 sprintf(__ngettext($label[2][0], $label[2][1], $num_posts[$mime_type]), $num_posts[$mime_type]) . '</a>'; 102 102 } 103 103 echo implode(' | </li>', $type_links) . '</li>'; -
trunk/wp-includes/l10n.php
r6916 r7397 197 197 198 198 /** 199 * __ngettext_noop() - register plural strings in POT file, but don't translate them 200 * 201 * Used when you want do keep structures with translatable plural strings and 202 * use them later. 203 * 204 * Example: 205 * $messages = array( 206 * 'post' => ngettext_noop('%s post', '%s posts'), 207 * 'page' => ngettext_noop('%s pages', '%s pages') 208 * ); 209 * ... 210 * $message = $messages[$type]; 211 * $usable_text = sprintf(__ngettext($message[0], $message[1], $count), $count); 212 * 213 * @since 2.5 214 * @param $single Single form to be i18ned 215 * @param $plural Plural form to be i18ned 216 * @param $number Not used, here for compatibility with __ngettext, optional 217 * @param $domain Not used, here for compatibility with __ngettext, optional 218 * @return array array($single, $plural) 219 */ 220 function __ngettext_noop($single, $plural, $number=1, $domain = 'default') { 221 return array($single, $plural); 222 } 223 224 /** 199 225 * load_textdomain() - Loads MO file into the list of domains 200 226 *
Note: See TracChangeset
for help on using the changeset viewer.