From 8db1c75a7e22d0eb36436e3c91a9dc3bfd7c96d3 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 22 Sep 2015 14:33:25 +0000 Subject: [PATCH] Remove extra HTML from translatable strings in `WP_Comments_List_Table::get_views()`. Add a context and translator comments. Props Tmeister for initial patch. Fixes #31859. Built from https://develop.svn.wordpress.org/trunk@34424 git-svn-id: http://core.svn.wordpress.org/trunk@34388 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- .../includes/class-wp-comments-list-table.php | 38 ++++++++++++++++--- wp-includes/version.php | 2 +- 2 files changed, 34 insertions(+), 6 deletions(-) diff --git a/wp-admin/includes/class-wp-comments-list-table.php b/wp-admin/includes/class-wp-comments-list-table.php index 9259017dbc..8204f97153 100644 --- a/wp-admin/includes/class-wp-comments-list-table.php +++ b/wp-admin/includes/class-wp-comments-list-table.php @@ -204,11 +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' => _nx_noop('All', 'All', 'comments'), // singular not used - 'moderated' => _n_noop('Pending (%s)', 'Pending (%s)'), - 'approved' => _n_noop('Approved (%s)', 'Approved (%s)'), - 'spam' => _n_noop('Spam (%s)', 'Spam (%s)'), - 'trash' => _n_noop('Trash (%s)', 'Trash (%s)') + 'all' => _nx_noop( 'All', 'All', 'comments' ), // singular not used + 'moderated' => str_replace( '%s', '%s', + /* translators: %s: pending comments count */ + _nx_noop( + 'Pending (%s)', + 'Pending (%s)', + 'comments' + ) + ), + 'approved' => str_replace( '%s', '%s', + /* translators: %s: approved comments count */ + _nx_noop( + 'Approved (%s)', + 'Approved (%s)', + 'comments' + ) + ), + 'spam' => str_replace( '%s', '%s', + /* translators: %s: spam comments count */ + _nx_noop( + 'Spam (%s)', + 'Spam (%s)', + 'comments' + ) + ), + 'trash' => str_replace( '%s', '%s', + /* translators: %s: trashed comments count */ + _nx_noop( + 'Trash (%s)', + 'Trash (%s)', + 'comments' + ) + ) ); if ( !EMPTY_TRASH_DAYS ) diff --git a/wp-includes/version.php b/wp-includes/version.php index 8d668aa538..7f2923ad27 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.4-alpha-34423'; +$wp_version = '4.4-alpha-34424'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.