Make WordPress Core


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

    r54063 r55276  
    8686<tr>
    8787<th scope="row"><?php _e( 'Your homepage displays' ); ?></th>
    88 <td id="front-static-pages"><fieldset><legend class="screen-reader-text"><span><?php _e( 'Your homepage displays' ); ?></span></legend>
     88<td id="front-static-pages"><fieldset>
     89    <legend class="screen-reader-text"><span>
     90        <?php
     91        /* translators: Hidden accessibility text. */
     92        _e( 'Your homepage displays' );
     93        ?>
     94    </span></legend>
    8995    <p><label>
    9096        <input name="show_on_front" type="radio" value="posts" class="tog" <?php checked( 'posts', get_option( 'show_on_front' ) ); ?> />
     
    160166<tr>
    161167<th scope="row"><?php _e( 'For each post in a feed, include' ); ?> </th>
    162 <td><fieldset><legend class="screen-reader-text"><span><?php _e( 'For each post in a feed, include' ); ?> </span></legend>
     168<td><fieldset>
     169    <legend class="screen-reader-text"><span>
     170        <?php
     171        /* translators: Hidden accessibility text. */
     172        _e( 'For each post in a feed, include' );
     173        ?>
     174    </span></legend>
    163175    <p>
    164176        <label><input name="rss_use_excerpt" type="radio" value="0" <?php checked( 0, get_option( 'rss_use_excerpt' ) ); ?> /> <?php _e( 'Full text' ); ?></label><br />
     
    179191<tr class="option-site-visibility">
    180192<th scope="row"><?php has_action( 'blog_privacy_selector' ) ? _e( 'Site visibility' ) : _e( 'Search engine visibility' ); ?> </th>
    181 <td><fieldset><legend class="screen-reader-text"><span><?php has_action( 'blog_privacy_selector' ) ? _e( 'Site visibility' ) : _e( 'Search engine visibility' ); ?> </span></legend>
     193<td><fieldset>
     194    <legend class="screen-reader-text"><span>
     195        <?php
     196        has_action( 'blog_privacy_selector' )
     197            /* translators: Hidden accessibility text. */
     198            ? _e( 'Site visibility' )
     199            /* translators: Hidden accessibility text. */
     200            : _e( 'Search engine visibility' );
     201        ?>
     202    </span></legend>
    182203<?php if ( has_action( 'blog_privacy_selector' ) ) : ?>
    183204    <input id="blog-public" type="radio" name="blog_public" value="1" <?php checked( '1', get_option( 'blog_public' ) ); ?> />
Note: See TracChangeset for help on using the changeset viewer.