WordPress.org

Make WordPress Core

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

File plural-context-part-1.diff, 4.5 KB (added by nbachiyski, 5 years ago)
  • wp-admin/users.php

     
    264264 
    265265$current_role = false; 
    266266$class = empty($role) ? ' class="current"' : ''; 
    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>'; 
     267$role_links[] = "<li><a href='users.php'$class>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_users, 'users' ), number_format_i18n( $total_users ) ) . '</a>'; 
    268268foreach ( $wp_roles->get_names() as $this_role => $name ) { 
    269269        if ( !isset($avail_roles[$this_role]) ) 
    270270                continue; 
  • wp-admin/upload.php

     
    187187                $num_posts[$type] = ( isset( $num_posts[$type] ) ) ? $num_posts[$type] + $_num_posts[$real] : $_num_posts[$real]; 
    188188 
    189189$class = empty($_GET['post_mime_type']) && ! isset($_GET['detached']) ? ' class="current"' : ''; 
    190 $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>'; 
     190$type_links[] = "<li><a href='upload.php'$class>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $_total_posts, 'uploaded files' ), number_format_i18n( $_total_posts ) ) . '</a>'; 
    191191foreach ( $post_mime_types as $mime_type => $label ) { 
    192192        $class = ''; 
    193193 
  • wp-admin/plugins.php

     
    439439<?php 
    440440$status_links = array(); 
    441441$class = ( 'all' == $status ) ? ' class="current"' : ''; 
    442 $status_links[] = "<li><a href='plugins.php?plugin_status=all' $class>" . sprintf( _n( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_all_plugins ), number_format_i18n( $total_all_plugins ) ) . '</a>'; 
     442$status_links[] = "<li><a href='plugins.php?plugin_status=all' $class>" . sprintf( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_all_plugins, 'plugins' ), number_format_i18n( $total_all_plugins ) ) . '</a>'; 
    443443if ( ! empty($active_plugins) ) { 
    444444        $class = ( 'active' == $status ) ? ' class="current"' : ''; 
    445445        $status_links[] = "<li><a href='plugins.php?plugin_status=active' $class>" . sprintf( _n( 'Active <span class="count">(%s)</span>', 'Active <span class="count">(%s)</span>', $total_active_plugins ), number_format_i18n( $total_active_plugins ) ) . '</a>'; 
  • wp-admin/edit.php

     
    141141$num_posts = wp_count_posts( 'post', 'readable' ); 
    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( _n( '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( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_posts, 'posts' ), number_format_i18n( $total_posts ) ) . '</a>'; 
    145145 
    146146 
    147147foreach ( $post_stati as $status => $label ) { 
  • wp-admin/edit-pages.php

     
    150150$num_posts = wp_count_posts('page', 'readable'); 
    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( _n( '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( _nx( 'All <span class="count">(%s)</span>', 'All <span class="count">(%s)</span>', $total_posts, 'pages' ), number_format_i18n( $total_posts ) ) . '</a>'; 
    154154foreach ( $post_stati as $status => $label ) { 
    155155        $class = ''; 
    156156