Customize: Fix i18n by re-using the `add_new_item` post type label instead of using a post type name in a generic string.

Props afercia, westonruter.
See #34923.
Fixes #37895.

Built from https://develop.svn.wordpress.org/trunk@38479


git-svn-id: http://core.svn.wordpress.org/trunk@38420 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Weston Ruter 2016-08-31 19:15:28 +00:00
parent bce5ea9494
commit 03adca4299
2 changed files with 2 additions and 4 deletions

View File

@ -939,9 +939,7 @@ final class WP_Customize_Nav_Menus {
<?php $post_type_obj = get_post_type_object( $available_item_type['object'] ); ?> <?php $post_type_obj = get_post_type_object( $available_item_type['object'] ); ?>
<?php if ( current_user_can( $post_type_obj->cap->create_posts ) && current_user_can( $post_type_obj->cap->publish_posts ) ) : ?> <?php if ( current_user_can( $post_type_obj->cap->create_posts ) && current_user_can( $post_type_obj->cap->publish_posts ) ) : ?>
<div class="new-content-item"> <div class="new-content-item">
<input type="text" class="create-item-input" placeholder="<?php <input type="text" class="create-item-input" placeholder="<?php echo esc_attr( $post_type_obj->labels->add_new_item ); ?>">
/* translators: %s: Singular title of post type or taxonomy */
printf( __( 'Create New %s' ), $post_type_obj->labels->singular_name ); ?>">
<button type="button" class="button add-content"><?php _e( 'Add' ); ?></button> <button type="button" class="button add-content"><?php _e( 'Add' ); ?></button>
</div> </div>
<?php endif; ?> <?php endif; ?>

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '4.7-alpha-38478'; $wp_version = '4.7-alpha-38479';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.