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-includes/customize/class-wp-customize-header-image-control.php

    r54526 r55276  
    134134                data-customize-image-value="{{data.header.url}}"
    135135                data-customize-header-image-data="{{JSON.stringify(data.header)}}">
    136                 <span class="screen-reader-text"><?php _e( 'Set image' ); ?></span>
     136                <span class="screen-reader-text">
     137                    <?php
     138                    /* translators: Hidden accessibility text. */
     139                    _e( 'Set image' );
     140                    ?>
     141                </span>
    137142                <img src="{{data.header.thumbnail_url}}" alt="{{data.header.alt_text || data.header.description}}" />
    138143            </button>
    139144
    140145            <# if ( data.type === 'uploaded' ) { #>
    141                 <button type="button" class="dashicons dashicons-no close"><span class="screen-reader-text"><?php _e( 'Remove image' ); ?></span></button>
     146                <button type="button" class="dashicons dashicons-no close">
     147                    <span class="screen-reader-text">
     148                        <?php
     149                        /* translators: Hidden accessibility text. */
     150                        _e( 'Remove image' );
     151                        ?>
     152                    </span>
     153                </button>
    142154            <# } #>
    143155
Note: See TracChangeset for help on using the changeset viewer.