Make WordPress Core


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

    r55188 r55276  
    821821        <div class="theme-wrap wp-clearfix" role="document">
    822822            <div class="theme-header">
    823                 <button type="button" class="left dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Show previous theme' ); ?></span></button>
    824                 <button type="button" class="right dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Show next theme' ); ?></span></button>
    825                 <button type="button" class="close dashicons dashicons-no"><span class="screen-reader-text"><?php _e( 'Close details dialog' ); ?></span></button>
     823                <button type="button" class="left dashicons dashicons-no"><span class="screen-reader-text">
     824                    <?php
     825                    /* translators: Hidden accessibility text. */
     826                    _e( 'Show previous theme' );
     827                    ?>
     828                </span></button>
     829                <button type="button" class="right dashicons dashicons-no"><span class="screen-reader-text">
     830                    <?php
     831                    /* translators: Hidden accessibility text. */
     832                    _e( 'Show next theme' );
     833                    ?>
     834                </span></button>
     835                <button type="button" class="close dashicons dashicons-no"><span class="screen-reader-text">
     836                    <?php
     837                    /* translators: Hidden accessibility text. */
     838                    _e( 'Close details dialog' );
     839                    ?>
     840                </span></button>
    826841            </div>
    827842            <div class="theme-about wp-clearfix">
     
    860875                                    /* translators: %s: Number of ratings. */
    861876                                    sprintf( __( '(%s ratings)' ), '{{ data.num_ratings }}' ),
    862                                     /* translators: Accessibility text. */
     877                                    /* translators: Hidden accessibility text. */
    863878                                    __( '(opens in a new tab)' )
    864879                                );
Note: See TracChangeset for help on using the changeset viewer.