Make WordPress Core


Ignore:
Timestamp:
02/07/2023 05:08:26 PM (22 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/includes/plugin-install.php

    r55197 r55276  
    321321    <form class="search-form search-plugins" method="get">
    322322        <input type="hidden" name="tab" value="search" />
    323         <label class="screen-reader-text" for="typeselector"><?php _e( 'Search plugins by:' ); ?></label>
     323        <label class="screen-reader-text" for="typeselector">
     324            <?php
     325            /* translators: Hidden accessibility text. */
     326            _e( 'Search plugins by:' );
     327            ?>
     328        </label>
    324329        <select name="type" id="typeselector">
    325330            <option value="term"<?php selected( 'term', $type ); ?>><?php _e( 'Keyword' ); ?></option>
     
    327332            <option value="tag"<?php selected( 'tag', $type ); ?>><?php _ex( 'Tag', 'Plugin Installer' ); ?></option>
    328333        </select>
    329         <label class="screen-reader-text" for="search-plugins"><?php _e( 'Search Plugins' ); ?></label>
     334        <label class="screen-reader-text" for="search-plugins">
     335            <?php
     336            /* translators: Hidden accessibility text. */
     337            _e( 'Search Plugins' );
     338            ?>
     339        </label>
    330340        <input type="search" name="s" id="search-plugins" value="<?php echo esc_attr( $term ); ?>" class="wp-filter-search" placeholder="<?php esc_attr_e( 'Search plugins...' ); ?>" />
    331341        <?php submit_button( __( 'Search Plugins' ), 'hide-if-js', false, false, array( 'id' => 'search-submit' ) ); ?>
     
    345355    <form method="post" enctype="multipart/form-data" class="wp-upload-form" action="<?php echo esc_url( self_admin_url( 'update.php?action=upload-plugin' ) ); ?>">
    346356        <?php wp_nonce_field( 'plugin-upload' ); ?>
    347         <label class="screen-reader-text" for="pluginzip"><?php _e( 'Plugin zip file' ); ?></label>
     357        <label class="screen-reader-text" for="pluginzip">
     358            <?php
     359            /* translators: Hidden accessibility text. */
     360            _e( 'Plugin zip file' );
     361            ?>
     362        </label>
    348363        <input type="file" id="pluginzip" name="pluginzip" accept=".zip" />
    349364        <?php submit_button( __( 'Install Now' ), '', 'install-plugin-submit', false ); ?>
Note: See TracChangeset for help on using the changeset viewer.