Make WordPress Core


Ignore:
Timestamp:
09/22/2015 02:32:08 PM (9 years ago)
Author:
SergeyBiryukov
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/class-wp-comments-list-table.php

    r34383 r34424  
    205205        //, number_format_i18n($num_comments->spam) ), "<span class='spam-comment-count'>" . number_format_i18n($num_comments->spam) . "</span>")
    206206        $stati = array(
    207                 'all' => _nx_noop('All', 'All', 'comments'), // singular not used
    208                 'moderated' => _n_noop('Pending <span class="count">(<span class="pending-count">%s</span>)</span>', 'Pending <span class="count">(<span class="pending-count">%s</span>)</span>'),
    209                 'approved' => _n_noop('Approved <span class="count">(<span class="approved-count">%s</span>)</span>', 'Approved <span class="count">(<span class="approved-count">%s</span>)</span>'),
    210                 'spam' => _n_noop('Spam <span class="count">(<span class="spam-count">%s</span>)</span>', 'Spam <span class="count">(<span class="spam-count">%s</span>)</span>'),
    211                 'trash' => _n_noop('Trash <span class="count">(<span class="trash-count">%s</span>)</span>', 'Trash <span class="count">(<span class="trash-count">%s</span>)</span>')
     207                'all' => _nx_noop( 'All', 'All', 'comments' ), // singular not used
     208                'moderated' => str_replace( '%s', '<span class="pending-count">%s</span>',
     209                    /* translators: %s: pending comments count */
     210                    _nx_noop(
     211                        'Pending <span class="count">(%s)</span>',
     212                        'Pending <span class="count">(%s)</span>',
     213                        'comments'
     214                    )
     215                ),
     216                'approved' => str_replace( '%s', '<span class="approved-count">%s</span>',
     217                    /* translators: %s: approved comments count */
     218                    _nx_noop(
     219                        'Approved <span class="count">(%s)</span>',
     220                        'Approved <span class="count">(%s)</span>',
     221                        'comments'
     222                    )
     223                ),
     224                'spam' => str_replace( '%s', '<span class="spam-count">%s</span>',
     225                    /* translators: %s: spam comments count */
     226                    _nx_noop(
     227                        'Spam <span class="count">(%s)</span>',
     228                        'Spam <span class="count">(%s)</span>',
     229                        'comments'
     230                    )
     231                ),
     232                'trash' => str_replace( '%s', '<span class="trash-count">%s</span>',
     233                    /* translators: %s: trashed comments count */
     234                    _nx_noop(
     235                        'Trash <span class="count">(%s)</span>',
     236                        'Trash <span class="count">(%s)</span>',
     237                        'comments'
     238                    )
     239                )
    212240            );
    213241
Note: See TracChangeset for help on using the changeset viewer.