WordPress.org

Make WordPress Core

Ticket #8128: plural-context-part-0.diff

File plural-context-part-0.diff, 2.7 KB (added by nbachiyski, 5 years ago)

Plural post/page differentiation for edit-pages.php

  • wp-admin/edit-pages.php

     
    7171wp_enqueue_script('inline-edit-post'); 
    7272 
    7373$post_stati  = array(   //      array( adj, noun ) 
    74                 'publish' => array(__('Published'), __('Published pages'), __ngettext_noop('Published <span class="count">(%s)</span>', 'Published <span class="count">(%s)</span>')), 
    75                 'future' => array(__('Scheduled'), __('Scheduled pages'), __ngettext_noop('Scheduled <span class="count">(%s)</span>', 'Scheduled <span class="count">(%s)</span>')), 
    76                 'pending' => array(__('Pending Review'), __('Pending pages'), __ngettext_noop('Pending Review <span class="count">(%s)</span>', 'Pending Review <span class="count">(%s)</span>')), 
    77                 'draft' => array(__('Draft'), _c('Drafts|manage posts header'), __ngettext_noop('Draft <span class="count">(%s)</span>', 'Drafts <span class="count">(%s)</span>')), 
    78                 'private' => array(__('Private'), __('Private pages'), __ngettext_noop('<a %s>Private</a> <span class="count">(%s)</span>', '<a %s>Private</a> <span class="count">(%s)</span>')) 
     74                'publish' => array(__('Published|page'), __('Published pages'), _n_noop('Published <span class="count">(%s)</span>|page', 'Published <span class="count">(%s)</span>')), 
     75                'future' => array(__('Scheduled|page'), __('Scheduled pages'), _n_noop('Scheduled <span class="count">(%s)</span>|page', 'Scheduled <span class="count">(%s)</span>')), 
     76                'pending' => array(__('Pending Review|page'), __('Pending pages'), _n_noop('Pending Review <span class="count">(%s)</span>|page', 'Pending Review <span class="count">(%s)</span>')), 
     77                'draft' => array(__('Draft|page'), _c('Drafts|manage posts header'), _n_noop('Draft <span class="count">(%s)</span>|page', 'Drafts <span class="count">(%s)</span>')), 
     78                'private' => array(__('Private|page'), __('Private pages'), _n_noop('<a %s>Private</a> <span class="count">(%s)</span>|page', '<a %s>Private</a> <span class="count">(%s)</span>')) 
    7979        ); 
    8080 
    8181$query = array('post_type' => 'page', 'orderby' => 'menu_order title', 'what_to_show' => 'posts', 
     
    147147        if ( isset( $_GET['post_status'] ) && $status == $_GET['post_status'] ) 
    148148                $class = ' class="current"'; 
    149149 
    150         $status_links[] = "<li><a href='edit-pages.php?post_status=$status'$class>" . sprintf( __ngettext( $label[2][0], $label[2][1], $num_posts->$status ), number_format_i18n( $num_posts->$status ) ) . '</a>'; 
     150        $status_links[] = "<li><a href='edit-pages.php?post_status=$status'$class>" . sprintf( _nc( $label[2][0], $label[2][1], $num_posts->$status ), number_format_i18n( $num_posts->$status ) ) . '</a>'; 
    151151} 
    152152echo implode( " |</li>\n", $status_links ) . '</li>'; 
    153153unset($status_links);