WordPress.org

Make WordPress Core

Changeset 10606


Ignore:
Timestamp:
02/20/2009 07:35:16 PM (9 years ago)
Author:
ryan
Message:

Use _n(). Props nbachiyski. fixes #9111

Location:
trunk
Files:
23 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit-pages.php

    r10348 r10606  
    113113<div id="message" class="updated fade"><p>
    114114<?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'] ) );
    116116    unset($_GET['updated']);
    117117}
    118118
    119119if ( 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'] ) );
    121121    unset($_GET['skipped']);
    122122}
    123123
    124124if ( 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'] ) );
    126126    unset($_GET['locked']);
    127127}
    128128
    129129if ( 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'] ) );
    131131    unset($_GET['deleted']);
    132132}
     
    151151$total_posts = array_sum( (array) $num_posts );
    152152$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>';
    154154foreach ( $post_stati as $status => $label ) {
    155155    $class = '';
  • trunk/wp-admin/edit.php

    r10348 r10606  
    111111<div id="message" class="updated fade"><p>
    112112<?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'] ) );
    114114    unset($_GET['updated']);
    115115}
     
    119119
    120120if ( 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'] ) );
    122122    unset($_GET['locked']);
    123123}
    124124
    125125if ( 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'] ) );
    127127    unset($_GET['deleted']);
    128128}
     
    142142$total_posts = array_sum( (array) $num_posts );
    143143$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>';
    145145
    146146
     
    156156        $class = ' class="current"';
    157157
    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>';
    159159}
    160160echo implode( " |</li>\n", $status_links ) . '</li>';
  • trunk/wp-admin/import/blogware.php

    r10339 r10606  
    156156            if ( $num_comments ) {
    157157                echo ' ';
    158                 printf( __ngettext('%s comment', '%s comments', $num_comments), $num_comments );
     158                printf( _n('%s comment', '%s comments', $num_comments), $num_comments );
    159159            }
    160160            echo '</li>';
  • trunk/wp-admin/import/btt.php

    r9903 r10606  
    8484        } else {
    8585            $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>';
    8787            echo '<ul>';
    8888            foreach ( $metakeys as $post_meta ) {
  • trunk/wp-admin/import/dotclear.php

    r9933 r10606  
    313313            // Store category translation for future use
    314314            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>';
    316316            return true;
    317317        }
     
    614614            add_option('dclinks2wplinks',$dclinks2wplinks);
    615615            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);
    617617            echo '<br /><br /></p>';
    618618            return true;
  • trunk/wp-admin/import/greymatter.php

    r9933 r10606  
    284284                if ($numAddedComments > 0) {
    285285                    echo ': ';
    286                 printf( __ngettext('imported %s comment', 'imported %s comments', $numAddedComments) , $numAddedComments);
     286                printf( _n('imported %s comment', 'imported %s comments', $numAddedComments) , $numAddedComments);
    287287                }
    288288                $preExisting = $numComments - numAddedComments;
    289289                if ($preExisting > 0) {
    290290                    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);
    292292                }
    293293            }
  • trunk/wp-admin/import/jkw.php

    r9903 r10606  
    9999        } else {
    100100            $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>';
    102102            echo '<ul>';
    103103            foreach ( $metakeys as $post_meta ) {
     
    140140        } else {
    141141            $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>';
    143143            echo '<ul>';
    144144            foreach ( $metakeys as $post_meta ) {
  • trunk/wp-admin/import/mt.php

    r10430 r10606  
    289289
    290290        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);
    292292
    293293        $num_pings = 0;
     
    306306
    307307        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);
    309309
    310310        echo "</li>";
  • trunk/wp-admin/import/stp.php

    r9903 r10606  
    8989            add_option('stpimp_posts', $posts);
    9090            $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>';
    9292        }
    9393
     
    107107        $tags_added = $this->tag2post();
    108108
    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>';
    110110        echo '<form action="admin.php?import=stp&amp;step=3" method="post">';
    111111        wp_nonce_field('import-stp');
  • trunk/wp-admin/import/textpattern.php

    r9903 r10606  
    202202            // Store category translation for future use
    203203            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>';
    205205            return true;
    206206        }
     
    487487            add_option('txplinks2wplinks',$txplinks2wplinks);
    488488            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);
    490490            echo '<br /><br /></p>';
    491491            return true;
  • trunk/wp-admin/import/utw.php

    r9903 r10606  
    9999            $count = count($tags);
    100100
    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>';
    102102            echo '<p>' . __('The following tags were found:') . '</p>';
    103103
     
    151151            $count = count($posts);
    152152
    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>';
    154154
    155155        }
     
    172172        $tags_added = $this->tag2post();
    173173
    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>';
    175175
    176176        echo '<form action="admin.php?import=utw&amp;step=4" method="post">';
  • trunk/wp-admin/import/wordpress.php

    r10339 r10606  
    529529
    530530        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);
    532532
    533533        // Now for post meta
  • trunk/wp-admin/import/wp-cat2tag.php

    r9903 r10606  
    6666        if ( $cat_num > 0 ) {
    6767            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>';
    6969            echo '<div class="narrow">';
    7070            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>';
     
    142142        if ( $tags_num > 0 ) {
    143143            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>';
    145145            echo '<div class="narrow">';
    146146            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>';
  • trunk/wp-admin/includes/media.php

    r10390 r10606  
    16911691        $class = ' class="current"';
    16921692
    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>';
    16941694}
    16951695echo implode(' | </li>', $type_links) . '</li>';
  • trunk/wp-admin/includes/plugin-install.php

    r10468 r10606  
    339339                <td class="vers"><?php echo $version; ?></td>
    340340                <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'])) ?>">
    342342                        <div class="star star-rating" style="width: <?php echo attribute_escape($plugin['rating']) ?>px"></div>
    343343                        <div class="star star5"><img src="<?php echo admin_url('images/star.gif'); ?>" alt="<?php _e('5 stars') ?>" /></div>
     
    486486            <li><strong><?php _e('Compatible up to:') ?></strong> <?php echo $api->tested ?></li>
    487487<?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>
    489489<?php endif; if ( ! empty($api->slug) ) : ?>
    490490            <li><a target="_blank" href="http://wordpress.org/extend/plugins/<?php echo $api->slug ?>/"><?php _e('WordPress.org Plugin Page &#187;') ?></a></li>
     
    494494        </ul>
    495495        <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)); ?>">
    497497            <div class="star star-rating" style="width: <?php echo attribute_escape($api->rating) ?>px"></div>
    498498            <div class="star star5"><img src="<?php echo admin_url('images/star.gif'); ?>" alt="<?php _e('5 stars') ?>" /></div>
     
    502502            <div class="star star1"><img src="<?php echo admin_url('images/star.gif'); ?>" alt="<?php _e('1 star') ?>" /></div>
    503503        </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>
    505505    </div>
    506506    <div id="section-holder" class="wrap">
  • trunk/wp-admin/includes/post.php

    r10528 r10606  
    775775    $q['cat'] = isset($q['cat']) ? (int) $q['cat'] : 0;
    776776    $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>')),
    782782            );
    783783
     
    841841    $q['posts_per_page'] = 15;
    842842    $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>')),
    846846            );
    847847    $post_mime_types = apply_filters('post_mime_types', $post_mime_types);
  • trunk/wp-admin/includes/theme-install.php

    r10592 r10606  
    473473            <li><strong><?php _e('Compatible up to:') ?></strong> <?php echo $api->tested ?></li>
    474474<?php endif; if ( ! empty($api->downloaded) ) : ?>
    475             <li><strong><?php _e('Downloaded:') ?></strong> <?php printf(__ngettext('%s time', '%s times', $api->downloaded), number_format_i18n($api->downloaded)) ?></li>
     475            <li><strong><?php _e('Downloaded:') ?></strong> <?php printf(_n('%s time', '%s times', $api->downloaded), number_format_i18n($api->downloaded)) ?></li>
    476476<?php endif; if ( ! empty($api->slug) ) : ?>
    477477            <li><a target="_blank" href="http://wordpress.org/extend/themes/<?php echo $api->slug ?>/"><?php _e('WordPress.org Theme Page &#187;') ?></a></li>
     
    481481        </ul>
    482482        <h2><?php _e('Average Rating') ?></h2>
    483         <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)); ?>">
     483        <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)); ?>">
    484484            <div class="star star-rating" style="width: <?php echo attribute_escape($api->rating) ?>px"></div>
    485485            <div class="star star5"><img src="<?php echo admin_url('images/star.gif'); ?>" alt="<?php _e('5 stars') ?>" /></div>
     
    489489            <div class="star star1"><img src="<?php echo admin_url('images/star.gif'); ?>" alt="<?php _e('1 star') ?>" /></div>
    490490        </div>
    491         <small><?php printf(__ngettext('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings)); ?></small>
     491        <small><?php printf(_n('(based on %s rating)', '(based on %s ratings)', $api->num_ratings), number_format_i18n($api->num_ratings)); ?></small>
    492492    </div>
    493493    <div id="section-holder" class="wrap">
  • trunk/wp-admin/link-manager.php

    r10481 r10606  
    8181    echo '<div id="message" class="updated fade"><p>';
    8282    $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);
    8484    echo '</p></div>';
    8585    $_SERVER['REQUEST_URI'] = remove_query_arg(array('deleted'), $_SERVER['REQUEST_URI']);
  • trunk/wp-admin/upload.php

    r10348 r10606  
    122122
    123123    $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)')),
    127127            );
    128128    $post_mime_types = apply_filters('post_mime_types', $post_mime_types);
     
    148148if ( isset($_GET['attached']) && (int) $_GET['attached'] ) {
    149149    $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 );
    151151    $_SERVER['REQUEST_URI'] = remove_query_arg(array('attached'), $_SERVER['REQUEST_URI']);
    152152}
     
    189189
    190190$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>';
    192192foreach ( $post_mime_types as $mime_type => $label ) {
    193193    $class = '';
     
    199199        $class = ' class="current"';
    200200
    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>';
    202202}
    203203$class = isset($_GET['detached']) ? ' class="current"' : '';
  • trunk/wp-admin/users.php

    r10348 r10606  
    203203        case 'del_many':
    204204            $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>';
    206206            break;
    207207        case 'add':
     
    265265$current_role = false;
    266266$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>';
    268268foreach ( $wp_roles->get_names() as $this_role => $name ) {
    269269    if ( !isset($avail_roles[$this_role]) )
  • trunk/wp-includes/category-template.php

    r10554 r10606  
    599599 */
    600600function 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 ) );
    602602}
    603603
     
    639639    if ( !isset( $args['topic_count_text_callback'] ) && isset( $args['single_text'] ) && isset( $args['multiple_text'] ) ) {
    640640        $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),
    642642            number_format_i18n( $count ));';
    643643        $args['topic_count_text_callback'] = create_function('$count', $body);
  • trunk/wp-includes/formatting.php

    r10562 r10606  
    14741474            $mins = 1;
    14751475        }
    1476         $since = sprintf(__ngettext('%s min', '%s mins', $mins), $mins);
     1476        $since = sprintf(_n('%s min', '%s mins', $mins), $mins);
    14771477    } else if (($diff <= 86400) && ($diff > 3600)) {
    14781478        $hours = round($diff / 3600);
     
    14801480            $hours = 1;
    14811481        }
    1482         $since = sprintf(__ngettext('%s hour', '%s hours', $hours), $hours);
     1482        $since = sprintf(_n('%s hour', '%s hours', $hours), $hours);
    14831483    } elseif ($diff >= 86400) {
    14841484        $days = round($diff / 86400);
     
    14861486            $days = 1;
    14871487        }
    1488         $since = sprintf(__ngettext('%s day', '%s days', $days), $days);
     1488        $since = sprintf(_n('%s day', '%s days', $days), $days);
    14891489    }
    14901490    return $since;
  • trunk/wp-includes/pluggable.php

    r10577 r10606  
    10391039    $notify_message .= sprintf( __('Spam it: %s'), admin_url("comment.php?action=cdc&dt=spam&c=$comment_id") ) . "\r\n";
    10401040
    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:',
    10421042        'Currently %s comments are waiting for approval. Please visit the moderation panel:', $comments_waiting), number_format_i18n($comments_waiting) ) . "\r\n";
    10431043    $notify_message .= admin_url("edit-comments.php?comment_status=moderated") . "\r\n";
Note: See TracChangeset for help on using the changeset viewer.