Make WordPress Core


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

    r55145 r55276  
    333333                    <label for="language-switcher-locales">
    334334                        <span class="dashicons dashicons-translation" aria-hidden="true"></span>
    335                         <span class="screen-reader-text"><?php _e( 'Language' ); ?></span>
     335                        <span class="screen-reader-text">
     336                            <?php
     337                            /* translators: Hidden accessibility text. */
     338                            _e( 'Language' );
     339                            ?>
     340                        </span>
    336341                    </label>
    337342
     
    649654                $admin_email_help_url = __( 'https://wordpress.org/support/article/settings-general-screen/#email-address' );
    650655
    651                 /* translators: Accessibility text. */
    652                 $accessibility_text = sprintf( '<span class="screen-reader-text"> %s</span>', __( '(opens in a new tab)' ) );
     656                $accessibility_text = sprintf(
     657                    '<span class="screen-reader-text"> %s</span>',
     658                    /* translators: Hidden accessibility text. */
     659                    __( '(opens in a new tab)' )
     660                );
    653661
    654662                printf(
Note: See TracChangeset for help on using the changeset viewer.