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/class-wp-users-list-table.php

    r54378 r55276  
    304304    <div class="alignleft actions">
    305305        <?php if ( current_user_can( 'promote_users' ) && $this->has_items() ) : ?>
    306         <label class="screen-reader-text" for="<?php echo $id; ?>"><?php _e( 'Change role to&hellip;' ); ?></label>
     306        <label class="screen-reader-text" for="<?php echo $id; ?>">
     307            <?php
     308            /* translators: Hidden accessibility text. */
     309            _e( 'Change role to&hellip;' );
     310            ?>
     311        </label>
    307312        <select name="<?php echo $id; ?>" id="<?php echo $id; ?>">
    308313            <option value=""><?php _e( 'Change role to&hellip;' ); ?></option>
     
    522527                '<input type="checkbox" name="users[]" id="user_%1$s" class="%3$s" value="%1$s" />',
    523528                $user_object->ID,
    524                 /* translators: %s: User login. */
     529                /* translators: Hidden accessibility text. %s: User login. */
    525530                sprintf( __( 'Select %s' ), $user_object->user_login ),
    526531                $role_classes
     
    580585                            $row .= sprintf(
    581586                                '<span aria-hidden="true">&#8212;</span><span class="screen-reader-text">%s</span>',
     587                                /* translators: Hidden accessibility text. */
    582588                                _x( 'Unknown', 'name' )
    583589                            );
     
    597603                                $numposts,
    598604                                sprintf(
    599                                     /* translators: %s: Number of posts. */
     605                                    /* translators: Hidden accessibility text. %s: Number of posts. */
    600606                                    _n( '%s post by this author', '%s posts by this author', $numposts ),
    601607                                    number_format_i18n( $numposts )
Note: See TracChangeset for help on using the changeset viewer.