Make WordPress Core


Ignore:
Timestamp:
02/07/2023 05:08:26 PM (18 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/theme-install.php

    r54268 r55276  
    7171            'collapseSidebar'     => __( 'Collapse Sidebar' ),
    7272            'expandSidebar'       => __( 'Expand Sidebar' ),
    73             /* translators: Accessibility text. */
     73            /* translators: Hidden accessibility text. */
    7474            'selectFeatureFilter' => __( 'Select one or more Theme features to filter by' ),
    7575        ),
     
    192192    </div>
    193193
    194     <h2 class="screen-reader-text hide-if-no-js"><?php _e( 'Filter themes list' ); ?></h2>
     194    <h2 class="screen-reader-text hide-if-no-js">
     195        <?php
     196        /* translators: Hidden accessibility text. */
     197        _e( 'Filter themes list' );
     198        ?>
     199    </h2>
    195200
    196201    <div class="wp-filter hide-if-no-js">
     
    264269        </div>
    265270    </div>
    266     <h2 class="screen-reader-text hide-if-no-js"><?php _e( 'Themes list' ); ?></h2>
     271    <h2 class="screen-reader-text hide-if-no-js">
     272        <?php
     273        /* translators: Hidden accessibility text. */
     274        _e( 'Themes list' );
     275        ?>
     276    </h2>
    267277    <div class="theme-browser content-filterable"></div>
    268278    <div class="theme-install-overlay wp-full-overlay expanded"></div>
     
    441451    <div class="wp-full-overlay-sidebar">
    442452        <div class="wp-full-overlay-header">
    443             <button class="close-full-overlay"><span class="screen-reader-text"><?php _e( 'Close' ); ?></span></button>
    444             <button class="previous-theme"><span class="screen-reader-text"><?php _e( 'Previous theme' ); ?></span></button>
    445             <button class="next-theme"><span class="screen-reader-text"><?php _e( 'Next theme' ); ?></span></button>
     453            <button class="close-full-overlay"><span class="screen-reader-text">
     454                <?php
     455                /* translators: Hidden accessibility text. */
     456                _e( 'Close' );
     457                ?>
     458            </span></button>
     459            <button class="previous-theme"><span class="screen-reader-text">
     460                <?php
     461                /* translators: Hidden accessibility text. */
     462                _e( 'Previous theme' );
     463                ?>
     464            </span></button>
     465            <button class="next-theme"><span class="screen-reader-text">
     466                <?php
     467                /* translators: Hidden accessibility text. */
     468                _e( 'Next theme' );
     469                ?>
     470            </span></button>
    446471            <# if ( data.installed ) { #>
    447472                <# if ( data.compatible_wp && data.compatible_php ) { #>
Note: See TracChangeset for help on using the changeset viewer.