Make WordPress Core


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

    r54739 r55276  
    493493    <form action="<?php echo esc_url( network_admin_url( 'users.php' ) ); ?>" method="get">
    494494        <p>
    495             <label class="screen-reader-text" for="search-users"><?php _e( 'Search Users' ); ?></label>
     495            <label class="screen-reader-text" for="search-users">
     496                <?php
     497                /* translators: Hidden accessibility text. */
     498                _e( 'Search Users' );
     499                ?>
     500            </label>
    496501            <input type="search" name="s" value="" size="30" autocomplete="off" id="search-users" />
    497502            <?php submit_button( __( 'Search Users' ), '', false, false, array( 'id' => 'submit_users' ) ); ?>
     
    501506    <form action="<?php echo esc_url( network_admin_url( 'sites.php' ) ); ?>" method="get">
    502507        <p>
    503             <label class="screen-reader-text" for="search-sites"><?php _e( 'Search Sites' ); ?></label>
     508            <label class="screen-reader-text" for="search-sites">
     509                <?php
     510                /* translators: Hidden accessibility text. */
     511                _e( 'Search Sites' );
     512                ?>
     513            </label>
    504514            <input type="search" name="s" value="" size="30" autocomplete="off" id="search-sites" />
    505515            <?php submit_button( __( 'Search Sites' ), '', false, false, array( 'id' => 'submit_sites' ) ); ?>
     
    10971107
    10981108        if ( current_user_can( 'edit_posts' ) ) {
    1099             echo '<h3 class="screen-reader-text">' . __( 'View more comments' ) . '</h3>';
     1109            echo '<h3 class="screen-reader-text">' .
     1110                /* translators: Hidden accessibility text. */
     1111                __( 'View more comments' ) .
     1112            '</h3>';
    11001113            _get_list_table( 'WP_Comments_List_Table' )->views();
    11011114        }
     
    12881301                'https://make.wordpress.org/community/meetups-landing-page',
    12891302                __( 'Meetups' ),
    1290                 /* translators: Accessibility text. */
     1303                /* translators: Hidden accessibility text. */
    12911304                __( '(opens in a new tab)' )
    12921305            );
     
    13001313                'https://central.wordcamp.org/schedule/',
    13011314                __( 'WordCamps' ),
    1302                 /* translators: Accessibility text. */
     1315                /* translators: Hidden accessibility text. */
    13031316                __( '(opens in a new tab)' )
    13041317            );
     
    13131326                esc_url( _x( 'https://wordpress.org/news/', 'Events and News dashboard widget' ) ),
    13141327                __( 'News' ),
    1315                 /* translators: Accessibility text. */
     1328                /* translators: Hidden accessibility text. */
    13161329                __( '(opens in a new tab)' )
    13171330            );
     
    16381651                esc_url( admin_url( 'upload.php' ) ),
    16391652                $text,
     1653                /* translators: Hidden accessibility text. */
    16401654                __( 'Manage Uploads' )
    16411655            );
     
    16531667                esc_url( admin_url( 'upload.php' ) ),
    16541668                $text,
     1669                /* translators: Hidden accessibility text. */
    16551670                __( 'Manage Uploads' )
    16561671            );
     
    18831898            esc_url( wp_get_update_php_url() ),
    18841899            __( 'Learn more about updating PHP' ),
    1885             /* translators: Accessibility text. */
     1900            /* translators: Hidden accessibility text. */
    18861901            __( '(opens in a new tab)' )
    18871902        );
Note: See TracChangeset for help on using the changeset viewer.