Make WordPress Core

Ticket #21325: 21325.theme-installer-search.diff

File 21325.theme-installer-search.diff, 989 bytes (added by MikeLittle, 13 years ago)

Implements translatable search label

  • wp-admin/includes/theme-install.php

     
    6464        <option value="author" <?php selected('author', $type) ?>><?php _e('Author'); ?></option>
    6565        <option value="tag" <?php selected('tag', $type) ?>><?php _ex('Tag', 'Theme Installer'); ?></option>
    6666        </select>
    67         <label class="screen-reader-text" for="s"><?php printf( __("Search by %s"), ( $type == 'term' ? __( 'keyword' ) : $type ) ); ?></label>
     67        <label class="screen-reader-text" for="s"><?php
     68          switch ( $type ) {
     69                  case 'term':
     70                          _e( 'Search by keyword' );
     71                          break;
     72                  case 'author':
     73                          _e( 'Search by author' );
     74                          break;
     75                  case 'tag':
     76                          _e( 'Search by tag' );
     77                          break;
     78          }
     79        ?></label>
    6880        <?php else : ?>
    6981        <label class="screen-reader-text" for="s"><?php _e("Search by keyword"); ?></label>
    7082        <?php endif; ?>