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/edit-form-comment.php

    r53450 r55276  
    4848<h2 class="edit-comment-author"><?php _e( 'Author' ); ?></h2>
    4949<fieldset>
    50 <legend class="screen-reader-text"><?php _e( 'Comment Author' ); ?></legend>
     50<legend class="screen-reader-text">
     51    <?php
     52    /* translators: Hidden accessibility text. */
     53    _e( 'Comment Author' );
     54    ?>
     55</legend>
    5156<table class="form-table editcomment" role="presentation">
    5257<tbody>
     
    7479
    7580<div id="postdiv" class="postarea">
    76 <?php
    77     echo '<label for="content" class="screen-reader-text">' . __( 'Comment' ) . '</label>';
     81<label for="content" class="screen-reader-text">
     82    <?php
     83    /* translators: Hidden accessibility text. */
     84    _e( 'Comment' );
     85    ?>
     86</label>
     87<?php
    7888    $quicktags_settings = array( 'buttons' => 'strong,em,link,block,del,ins,img,ul,ol,li,code,close' );
    7989    wp_editor(
     
    118128
    119129<fieldset id="comment-status-radio">
    120 <legend class="screen-reader-text"><?php _e( 'Comment status' ); ?></legend>
     130<legend class="screen-reader-text">
     131    <?php
     132    /* translators: Hidden accessibility text. */
     133    _e( 'Comment status' );
     134    ?>
     135</legend>
    121136<label><input type="radio"<?php checked( $comment->comment_approved, '1' ); ?> name="comment_status" value="1" /><?php _ex( 'Approved', 'comment status' ); ?></label><br />
    122137<label><input type="radio"<?php checked( $comment->comment_approved, '0' ); ?> name="comment_status" value="0" /><?php _ex( 'Pending', 'comment status' ); ?></label><br />
     
    142157?>
    143158</span>
    144 <a href="#edit_timestamp" class="edit-timestamp hide-if-no-js"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text"><?php _e( 'Edit date and time' ); ?></span></a>
     159<a href="#edit_timestamp" class="edit-timestamp hide-if-no-js"><span aria-hidden="true"><?php _e( 'Edit' ); ?></span> <span class="screen-reader-text">
     160    <?php
     161    /* translators: Hidden accessibility text. */
     162    _e( 'Edit date and time' );
     163    ?>
     164</span></a>
    145165<fieldset id='timestampdiv' class='hide-if-js'>
    146 <legend class="screen-reader-text"><?php _e( 'Date and time' ); ?></legend>
     166<legend class="screen-reader-text">
     167    <?php
     168    /* translators: Hidden accessibility text. */
     169    _e( 'Date and time' );
     170    ?>
     171</legend>
    147172<?php
    148173/**
Note: See TracChangeset for help on using the changeset viewer.