Make WordPress Core


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

Use _n(). Props nbachiyski. fixes #9111

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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>';
Note: See TracChangeset for help on using the changeset viewer.