Make WordPress Core


Ignore:
Timestamp:
05/11/2010 07:52:50 PM (16 years ago)
Author:
nbachiyski
Message:

I18n for custom post type labels. Props demetris, dimadin. Fixes #12968

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/edit.php

    r14374 r14571  
    138138}
    139139
    140 $title = sprintf(__('Edit %s'), $post_type_object->label);
    141 
    142140wp_enqueue_script('inline-edit-post');
    143141
     
    166164<div class="wrap">
    167165<?php screen_icon(); ?>
    168 <h2><?php echo esc_html( $title ); ?> <a href="<?php echo $post_new_file ?>" class="button add-new-h2"><?php echo esc_html_x('Add New', 'post'); ?></a> <?php
     166<h2><?php echo esc_html( $post_type_object->labels->edit_item ); ?> <a href="<?php echo $post_new_file ?>" class="button add-new-h2"><?php echo esc_html($post_type_object->labels->add_new); ?></a> <?php
    169167if ( isset($_GET['s']) && $_GET['s'] )
    170168    printf( '<span class="subtitle">' . __('Search results for &#8220;%s&#8221;') . '</span>', get_search_query() ); ?>
     
    263261
    264262<p class="search-box">
    265     <label class="screen-reader-text" for="post-search-input"><?php printf( _x('Search %s', '%s: post type name'), $post_type_object->label ); ?>:</label>
     263    <label class="screen-reader-text" for="post-search-input"><?php echo $post_type_object->labels->search_items; ?>:</label>
    266264    <input type="text" id="post-search-input" name="s" value="<?php the_search_query(); ?>" />
    267     <input type="submit" value="<?php echo esc_attr( sprintf( _x('Search %s', '%s: post type name'), $post_type_object->label ) ); ?>" class="button" />
     265    <input type="submit" value="<?php echo esc_attr( $post_type_object->labels->search_items ); ?>" class="button" />
    268266</p>
    269267
     
    411409<p><?php
    412410if ( isset($_GET['post_status']) && 'trash' == $_GET['post_status'] )
    413     printf( __( 'No %s found in the Trash.' ), $post_type_object->label );
     411    echo $post_type_object->labels->not_found_in_trash;
    414412else
    415     printf( __( 'No %s found.' ), $post_type_object->label );
     413    echo $post_type_object->labels->not_found;
    416414?></p>
    417415<?php } ?>
Note: See TracChangeset for help on using the changeset viewer.