From b9199cbcf7175ea75dd43389e4251f450b0ee2e7 Mon Sep 17 00:00:00 2001 From: Sergey Biryukov Date: Tue, 22 Sep 2015 14:32:08 +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. git-svn-id: https://develop.svn.wordpress.org/trunk@34424 602fd350-edb4-49c9-b593-d223f7449a82 --- .../includes/class-wp-comments-list-table.php | 38 ++++++++++++++++--- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/src/wp-admin/includes/class-wp-comments-list-table.php b/src/wp-admin/includes/class-wp-comments-list-table.php index 9259017dbc..8204f97153 100644 --- a/src/wp-admin/includes/class-wp-comments-list-table.php +++ b/src/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 )