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/includes/ms.php

    r54833 r55276  
    306306        <td>
    307307            <input type="number" step="1" min="0" style="width: 100px" name="option[blog_upload_space]" id="blog-upload-space-number" aria-describedby="blog-upload-space-desc" value="<?php echo $quota; ?>" />
    308             <span id="blog-upload-space-desc"><span class="screen-reader-text"><?php _e( 'Size in megabytes' ); ?></span> <?php _e( 'MB (Leave blank for network default)' ); ?></span>
     308            <span id="blog-upload-space-desc"><span class="screen-reader-text">
     309                <?php
     310                /* translators: Hidden accessibility text. */
     311                _e( 'Size in megabytes' );
     312                ?>
     313            </span> <?php _e( 'MB (Leave blank for network default)' ); ?></span>
    309314        </td>
    310315    </tr>
     
    916921
    917922                    if ( is_array( $blog_users ) && ! empty( $blog_users ) ) {
    918                         $user_site      = "<a href='" . esc_url( get_home_url( $details->userblog_id ) ) . "'>{$details->blogname}</a>";
    919                         $user_dropdown  = '<label for="reassign_user" class="screen-reader-text">' . __( 'Select a user' ) . '</label>';
     923                        $user_site     = "<a href='" . esc_url( get_home_url( $details->userblog_id ) ) . "'>{$details->blogname}</a>";
     924                        $user_dropdown = '<label for="reassign_user" class="screen-reader-text">' .
     925                                /* translators: Hidden accessibility text. */
     926                                __( 'Select a user' ) .
     927                            '</label>';
    920928                        $user_dropdown .= "<select name='blog[$user_id][$key]' id='reassign_user'>";
    921929                        $user_list      = '';
Note: See TracChangeset for help on using the changeset viewer.