Introduce and use translate_nooped_plural(). Fixes #13996

* _n_noop() and _nx_noop() now return associative arrays for greater clarity
 * translate_nooped_plural() takes one such associative array and translates it
 * it works on both the result from _n_noop() and from _nx_noop()
 * this breaks backwards compatibility, but I doubt any plugin uses it (I will do a global grep to confirm)
 * translate_nooped_plural() is applied where applicable


git-svn-id: https://develop.svn.wordpress.org/trunk@16073 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Nikolay Bachiyski
2010-10-29 13:12:14 +00:00
parent 5e54944621
commit 1937c1221d
5 changed files with 24 additions and 9 deletions

View File

@@ -170,7 +170,7 @@ class WP_Posts_Table extends WP_List_Table {
if ( isset($_REQUEST['post_status']) && $status_name == $_REQUEST['post_status'] )
$class = ' class="current"';
$status_links[$status_name] = "<li><a href='edit.php?post_status=$status_name&amp;post_type=$post_type'$class>" . sprintf( _n( $status->label_count[0], $status->label_count[1], $num_posts->$status_name ), number_format_i18n( $num_posts->$status_name ) ) . '</a>';
$status_links[$status_name] = "<li><a href='edit.php?post_status=$status_name&amp;post_type=$post_type'$class>" . sprintf( translate_nooped_plural( $status->label_count, $num_posts->$status_name ), number_format_i18n( $num_posts->$status_name ) ) . '</a>';
}
if ( ! empty( $this->sticky_posts_count ) ) {