From bc41f44158f5e761ac1171c8b7afda2061853872 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Wed, 18 Nov 2015 18:04:28 +0000 Subject: [PATCH] I18N: After [34424], replace the placeholder with comments count after `translate_nooped_plural()` runs, not before. Props hnle. Fixes #34680. Built from https://develop.svn.wordpress.org/trunk@35670 git-svn-id: http://core.svn.wordpress.org/trunk@35634 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../includes/class-wp-comments-list-table.php | 71 +++++++++---------- wp-includes/version.php | 2 +- 2 files changed, 35 insertions(+), 38 deletions(-) diff --git a/wp-admin/includes/class-wp-comments-list-table.php b/wp-admin/includes/class-wp-comments-list-table.php index 4a68221624..6560ff2c52 100644 --- a/wp-admin/includes/class-wp-comments-list-table.php +++ b/wp-admin/includes/class-wp-comments-list-table.php @@ -204,45 +204,39 @@ class WP_Comments_List_Table extends WP_List_Table { //, number_format_i18n($num_comments->moderated) ), "" . number_format_i18n($num_comments->moderated) . ""), //, number_format_i18n($num_comments->spam) ), "" . number_format_i18n($num_comments->spam) . "") $stati = array( - 'all' => str_replace( '%s', '%s', - /* translators: %s: all comments count */ - _nx_noop( - 'All (%s)', - 'All (%s)', - 'comments' - ) + /* translators: %s: all comments count */ + 'all' => _nx_noop( + 'All (%s)', + 'All (%s)', + 'comments' ), // singular not used - 'moderated' => str_replace( '%s', '%s', - /* translators: %s: pending comments count */ - _nx_noop( - 'Pending (%s)', - 'Pending (%s)', - 'comments' - ) + + /* translators: %s: pending comments count */ + 'moderated' => _nx_noop( + 'Pending (%s)', + 'Pending (%s)', + 'comments' ), - 'approved' => str_replace( '%s', '%s', - /* translators: %s: approved comments count */ - _nx_noop( - 'Approved (%s)', - 'Approved (%s)', - 'comments' - ) + + /* translators: %s: approved comments count */ + 'approved' => _nx_noop( + 'Approved (%s)', + 'Approved (%s)', + 'comments' ), - 'spam' => str_replace( '%s', '%s', - /* translators: %s: spam comments count */ - _nx_noop( - 'Spam (%s)', - 'Spam (%s)', - 'comments' - ) + + /* translators: %s: spam comments count */ + 'spam' => _nx_noop( + 'Spam (%s)', + 'Spam (%s)', + 'comments' ), - 'trash' => str_replace( '%s', '%s', - /* translators: %s: trashed comments count */ - _nx_noop( - 'Trash (%s)', - 'Trash (%s)', - 'comments' - ) + + /* translators: %s: trashed comments count */ + 'trash' => _nx_noop( + 'Trash (%s)', + 'Trash (%s)', + 'comments' ) ); @@ -266,9 +260,12 @@ class WP_Comments_List_Table extends WP_List_Table { if ( !empty( $_REQUEST['s'] ) ) $link = add_query_arg( 's', esc_attr( wp_unslash( $_REQUEST['s'] ) ), $link ); */ - $status_links[$status] = "" . sprintf( + $status_links[ $status ] = "" . sprintf( translate_nooped_plural( $label, $num_comments->$status ), - number_format_i18n( $num_comments->$status ) + sprintf( '%s', + $status, + number_format_i18n( $num_comments->$status ) + ) ) . ''; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 073818b964..7569830f67 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-beta4-35669'; +$wp_version = '4.4-beta4-35670'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.