Make WordPress Core


Ignore:
Timestamp:
02/07/2023 05:08:26 PM (17 months ago)
Author:
SergeyBiryukov
Message:

I18N: Mark screen reader strings as such with translator comments.

This aims to provide better context for translators and make it easier to determine that some strings contain hidden accessibility text and are not displayed in the UI.

Props kebbet, mercime, pavelevap, ocean90, swissspidy, Chouby, jipmoors, afercia, desrosj, costdev, audrasjb, SergeyBiryukov.
Fixes #29748.

File:
1 edited

Legend:

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

    r54378 r55276  
    507507
    508508        if ( $comment_types && is_array( $comment_types ) ) {
    509             printf( '<label class="screen-reader-text" for="filter-by-comment-type">%s</label>', __( 'Filter by comment type' ) );
     509            printf(
     510                '<label class="screen-reader-text" for="filter-by-comment-type">%s</label>',
     511                /* translators: Hidden accessibility text. */
     512                __( 'Filter by comment type' )
     513            );
    510514
    511515            echo '<select id="filter-by-comment-type" name="comment_type">';
     
    863867        $output .= '</div>';
    864868
    865         $output .= '<button type="button" class="toggle-row"><span class="screen-reader-text">' . __( 'Show more details' ) . '</span></button>';
     869        $output .= '<button type="button" class="toggle-row"><span class="screen-reader-text">' .
     870            /* translators: Hidden accessibility text. */
     871            __( 'Show more details' ) .
     872        '</span></button>';
    866873
    867874        return $output;
     
    879886        if ( $this->user_can ) {
    880887            ?>
    881         <label class="screen-reader-text" for="cb-select-<?php echo $comment->comment_ID; ?>"><?php _e( 'Select comment' ); ?></label>
     888        <label class="screen-reader-text" for="cb-select-<?php echo $comment->comment_ID; ?>">
     889            <?php
     890            /* translators: Hidden accessibility text. */
     891            _e( 'Select comment' );
     892            ?>
     893        </label>
    882894        <input id="cb-select-<?php echo $comment->comment_ID; ?>" type="checkbox" name="delete_comments[]" value="<?php echo $comment->comment_ID; ?>" />
    883895            <?php
Note: See TracChangeset for help on using the changeset viewer.