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.
Built from https://develop.svn.wordpress.org/trunk@55276


git-svn-id: http://core.svn.wordpress.org/trunk@54809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Sergey Biryukov
2023-02-07 17:10:21 +00:00
parent bca7495bac
commit 9c5d4ca8d1
133 changed files with 1559 additions and 329 deletions

View File

@@ -199,7 +199,12 @@ if ( isset( $_GET['updated'] ) ) {
?>
<td>
<fieldset>
<legend class="screen-reader-text"><?php _e( 'New registrations settings' ); ?></legend>
<legend class="screen-reader-text">
<?php
/* translators: Hidden accessibility text. */
_e( 'New registrations settings' );
?>
</legend>
<label><input name="registration" type="radio" id="registration1" value="none"<?php checked( $reg, 'none' ); ?> /> <?php _e( 'Registration is disabled' ); ?></label><br />
<label><input name="registration" type="radio" id="registration2" value="user"<?php checked( $reg, 'user' ); ?> /> <?php _e( 'User accounts may be registered' ); ?></label><br />
<label><input name="registration" type="radio" id="registration3" value="blog"<?php checked( $reg, 'blog' ); ?> /> <?php _e( 'Logged in users may register new sites' ); ?></label><br />
@@ -400,7 +405,10 @@ if ( isset( $_GET['updated'] ) ) {
?>
</label><br />
<p class="screen-reader-text" id="blog-upload-space-desc">
<?php _e( 'Size in megabytes' ); ?>
<?php
/* translators: Hidden accessibility text. */
_e( 'Size in megabytes' );
?>
</p>
</td>
</tr>
@@ -426,7 +434,10 @@ if ( isset( $_GET['updated'] ) ) {
);
?>
<p class="screen-reader-text" id="fileupload-maxk-desc">
<?php _e( 'Size in kilobytes' ); ?>
<?php
/* translators: Hidden accessibility text. */
_e( 'Size in kilobytes' );
?>
</p>
</td>
</tr>
@@ -493,7 +504,10 @@ if ( isset( $_GET['updated'] ) ) {
<th scope="row"><?php _e( 'Enable administration menus' ); ?></th>
<td>
<?php
echo '<fieldset><legend class="screen-reader-text">' . __( 'Enable menus' ) . '</legend>';
echo '<fieldset><legend class="screen-reader-text">' .
/* translators: Hidden accessibility text. */
__( 'Enable menus' ) .
'</legend>';
foreach ( (array) $menu_items as $key => $val ) {
echo "<label><input type='checkbox' name='menu_items[" . $key . "]' value='1'" . ( isset( $menu_perms[ $key ] ) ? checked( $menu_perms[ $key ], '1', false ) : '' ) . ' /> ' . esc_html( $val ) . '</label><br/>';

View File

@@ -194,7 +194,12 @@ if ( ! empty( $messages ) ) {
<th scope="row"><?php _e( 'Attributes' ); ?></th>
<td>
<fieldset>
<legend class="screen-reader-text"><?php _e( 'Set site attributes' ); ?></legend>
<legend class="screen-reader-text">
<?php
/* translators: Hidden accessibility text. */
_e( 'Set site attributes' );
?>
</legend>
<?php foreach ( $attribute_fields as $field_key => $field_label ) : ?>
<label><input type="checkbox" name="blog[<?php echo $field_key; ?>]" value="1" <?php checked( (bool) $details->$field_key, true ); ?> <?php disabled( ! in_array( (int) $details->$field_key, array( 0, 1 ), true ) ); ?> />
<?php echo $field_label; ?></label><br />