Make WordPress Core


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

    r55238 r55276  
    4646<tr>
    4747<th scope="row"><?php _e( 'Default post settings' ); ?></th>
    48 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Default post settings' ); ?></span></legend>
     48<td><fieldset><legend class="screen-reader-text"><span>
     49    <?php
     50    /* translators: Hidden accessibility text. */
     51    _e( 'Default post settings' );
     52    ?>
     53</span></legend>
    4954<label for="default_pingback_flag">
    5055<input name="default_pingback_flag" type="checkbox" id="default_pingback_flag" value="1" <?php checked( '1', get_option( 'default_pingback_flag' ) ); ?> />
     
    6469<tr>
    6570<th scope="row"><?php _e( 'Other comment settings' ); ?></th>
    66 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Other comment settings' ); ?></span></legend>
     71<td><fieldset><legend class="screen-reader-text"><span>
     72    <?php
     73    /* translators: Hidden accessibility text. */
     74    _e( 'Other comment settings' );
     75    ?>
     76</span></legend>
    6777<label for="require_name_email"><input type="checkbox" name="require_name_email" id="require_name_email" value="1" <?php checked( '1', get_option( 'require_name_email' ) ); ?> /> <?php _e( 'Comment author must fill out name and email' ); ?></label>
    6878<br />
     
    167177<tr>
    168178<th scope="row"><?php _e( 'Email me whenever' ); ?></th>
    169 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Email me whenever' ); ?></span></legend>
     179<td><fieldset><legend class="screen-reader-text"><span>
     180    <?php
     181    /* translators: Hidden accessibility text. */
     182    _e( 'Email me whenever' );
     183    ?>
     184</span></legend>
    170185<label for="comments_notify">
    171186<input name="comments_notify" type="checkbox" id="comments_notify" value="1" <?php checked( '1', get_option( 'comments_notify' ) ); ?> />
     
    179194<tr>
    180195<th scope="row"><?php _e( 'Before a comment appears' ); ?></th>
    181 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Before a comment appears' ); ?></span></legend>
     196<td><fieldset><legend class="screen-reader-text"><span>
     197    <?php
     198    /* translators: Hidden accessibility text. */
     199    _e( 'Before a comment appears' );
     200    ?>
     201</span></legend>
    182202<label for="comment_moderation">
    183203<input name="comment_moderation" type="checkbox" id="comment_moderation" value="1" <?php checked( '1', get_option( 'comment_moderation' ) ); ?> />
     
    189209<tr>
    190210<th scope="row"><?php _e( 'Comment Moderation' ); ?></th>
    191 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Comment Moderation' ); ?></span></legend>
     211<td><fieldset><legend class="screen-reader-text"><span>
     212    <?php
     213    /* translators: Hidden accessibility text. */
     214    _e( 'Comment Moderation' );
     215    ?>
     216</span></legend>
    192217<p><label for="comment_max_links">
    193218<?php
     
    208233<tr>
    209234<th scope="row"><?php _e( 'Disallowed Comment Keys' ); ?></th>
    210 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Disallowed Comment Keys' ); ?></span></legend>
     235<td><fieldset><legend class="screen-reader-text"><span>
     236    <?php
     237    /* translators: Hidden accessibility text. */
     238    _e( 'Disallowed Comment Keys' );
     239    ?>
     240</span></legend>
    211241<p><label for="disallowed_keys"><?php _e( 'When a comment contains any of these words in its content, author name, URL, email, IP address, or browser&#8217;s user agent string, it will be put in the Trash. One word or IP address per line. It will match inside words, so &#8220;press&#8221; will match &#8220;WordPress&#8221;.' ); ?></label></p>
    212242<p>
     
    244274<tr class="avatar-settings<?php echo $show_avatars_class; ?>">
    245275<th scope="row"><?php _e( 'Maximum Rating' ); ?></th>
    246 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Maximum Rating' ); ?></span></legend>
     276<td><fieldset><legend class="screen-reader-text"><span>
     277    <?php
     278    /* translators: Hidden accessibility text. */
     279    _e( 'Maximum Rating' );
     280    ?>
     281</span></legend>
    247282
    248283<?php
     
    267302<tr class="avatar-settings<?php echo $show_avatars_class; ?>">
    268303<th scope="row"><?php _e( 'Default Avatar' ); ?></th>
    269 <td class="defaultavatarpicker"><fieldset><legend class="screen-reader-text"><span><?php _e( 'Default Avatar' ); ?></span></legend>
     304<td class="defaultavatarpicker"><fieldset><legend class="screen-reader-text"><span>
     305    <?php
     306    /* translators: Hidden accessibility text. */
     307    _e( 'Default Avatar' );
     308    ?>
     309</span></legend>
    270310
    271311<p>
Note: See TracChangeset for help on using the changeset viewer.