Make WordPress Core


Ignore:
Timestamp:
02/07/2023 05:08:26 PM (2 years 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-media-list-table.php

    r55249 r55276  
    279279                <?php $this->view_switcher( $mode ); ?>
    280280
    281                 <label for="attachment-filter" class="screen-reader-text"><?php _e( 'Filter by type' ); ?></label>
     281                <label for="attachment-filter" class="screen-reader-text">
     282                    <?php
     283                    /* translators: Hidden accessibility text. */
     284                    _e( 'Filter by type' );
     285                    ?>
     286                </label>
    282287                <select class="attachment-filters" name="attachment-filter" id="attachment-filter">
    283288                    <?php
     
    359364                    '<span class="vers comment-grey-bubble" title="%1$s" aria-hidden="true"></span><span class="screen-reader-text">%2$s</span>',
    360365                    esc_attr__( 'Comments' ),
     366                    /* translators: Hidden accessibility text. */
    361367                    __( 'Comments' )
    362368                );
     
    408414            <label class="screen-reader-text" for="cb-select-<?php echo $post->ID; ?>">
    409415                <?php
    410                 /* translators: %s: Attachment title. */
     416                /* translators: Hidden accessibility text. %s: Attachment title. */
    411417                printf( __( 'Select %s' ), _draft_or_post_title() );
    412418                ?>
     
    470476        </strong>
    471477        <p class="filename">
    472             <span class="screen-reader-text"><?php _e( 'File name:' ); ?> </span>
     478            <span class="screen-reader-text">
     479                <?php
     480                /* translators: Hidden accessibility text. */
     481                _e( 'File name:' );
     482                ?>
     483            </span>
    473484            <?php
    474485            $file = get_attached_file( $post->ID );
Note: See TracChangeset for help on using the changeset viewer.