Make WordPress Core


Ignore:
Timestamp:
02/07/2023 05:08:26 PM (2 years 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/nav-menus.php

    r54973 r55276  
    806806                                    ?>
    807807                                    ">
    808                                         <span aria-hidden="true"><?php _ex( 'Edit', 'menu' ); ?></span><span class="screen-reader-text"><?php _e( 'Edit selected menu' ); ?></span>
     808                                        <span aria-hidden="true"><?php _ex( 'Edit', 'menu' ); ?></span><span class="screen-reader-text">
     809                                            <?php
     810                                            /* translators: Hidden accessibility text. */
     811                                            _e( 'Edit selected menu' );
     812                                            ?>
     813                                        </span>
    809814                                    </a>
    810815                                </span>
     
    852857        <span class="first-menu-message">
    853858            <?php _e( 'Create your first menu below.' ); ?>
    854             <span class="screen-reader-text"><?php _e( 'Fill in the Menu Name and click the Create Menu button to create your first menu.' ); ?></span>
     859            <span class="screen-reader-text">
     860                <?php
     861                /* translators: Hidden accessibility text. */
     862                _e( 'Fill in the Menu Name and click the Create Menu button to create your first menu.' );
     863                ?>
     864            </span>
    855865        </span><!-- /first-menu-message -->
    856866        <?php elseif ( $menu_count < 2 ) : ?>
     
    871881            );
    872882            ?>
    873             <span class="screen-reader-text"><?php _e( 'Click the Save Menu button to save your changes.' ); ?></span>
     883            <span class="screen-reader-text">
     884                <?php
     885                /* translators: Hidden accessibility text. */
     886                _e( 'Click the Save Menu button to save your changes.' );
     887                ?>
     888            </span>
    874889        </span><!-- /add-edit-menu-action -->
    875890        <?php else : ?>
     
    936951                );
    937952                ?>
    938                 <span class="screen-reader-text"><?php _e( 'Click the Save Menu button to save your changes.' ); ?></span>
     953                <span class="screen-reader-text">
     954                    <?php
     955                    /* translators: Hidden accessibility text. */
     956                    _e( 'Click the Save Menu button to save your changes.' );
     957                    ?>
     958                </span>
    939959            </span><!-- /add-new-menu-action -->
    940960        </form>
Note: See TracChangeset for help on using the changeset viewer.