Media: Update the media bulk action labels for consistency.

Props ianbelanger, garrett-eclipse, afercia, Presskopp.
Fixes #44675.


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


git-svn-id: http://core.svn.wordpress.org/trunk@44956 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Gary Pendergast 2019-04-08 23:54:52 +00:00
parent 9292802d92
commit 4b1ff1c298
9 changed files with 16 additions and 18 deletions

View File

@ -151,7 +151,7 @@ class WP_Media_List_Table extends WP_List_Table {
$actions['untrash'] = __( 'Restore' );
$actions['delete'] = __( 'Delete Permanently' );
} else {
$actions['trash'] = _x( 'Trash', 'verb' );
$actions['trash'] = __( 'Move to Trash' );
}
} else {
$actions['delete'] = __( 'Delete Permanently' );

View File

@ -399,7 +399,7 @@ function attachment_submit_meta_box( $post ) {
<?php
if ( current_user_can( 'delete_post', $post->ID ) ) {
if ( EMPTY_TRASH_DAYS && MEDIA_TRASH ) {
echo "<a class='submitdelete deletion' href='" . get_delete_post_link( $post->ID ) . "'>" . _x( 'Trash', 'verb' ) . '</a>';
echo "<a class='submitdelete deletion' href='" . get_delete_post_link( $post->ID ) . "'>" . __( 'Move to Trash' ) . '</a>';
} else {
$delete_ays = ! MEDIA_TRASH ? " onclick='return showNotice.warn();'" : '';
echo "<a class='submitdelete deletion'$delete_ays href='" . get_delete_post_link( $post->ID, null, true ) . "'>" . __( 'Delete Permanently' ) . '</a>';

View File

@ -944,7 +944,7 @@ SelectModeToggle = Button.extend(/** @lends wp.media.view.SelectModeToggle.proto
if ( this.controller.isModeActive( 'select' ) ) {
this.model.set( {
size: 'large',
text: l10n.cancelSelection
text: l10n.cancel
} );
children.not( '.spinner, .media-button' ).hide();
this.$el.show();
@ -998,11 +998,11 @@ DeleteSelected = Button.extend(/** @lends wp.media.view.DeleteSelectedButton.pro
filterChange: function( model ) {
if ( 'trash' === model.get( 'status' ) ) {
this.model.set( 'text', l10n.untrashSelected );
this.model.set( 'text', l10n.restoreSelected );
} else if ( wp.media.view.settings.mediaTrash ) {
this.model.set( 'text', l10n.trashSelected );
} else {
this.model.set( 'text', l10n.deleteSelected );
this.model.set( 'text', l10n.deletePermanently );
}
},

File diff suppressed because one or more lines are too long

View File

@ -7683,7 +7683,7 @@ AttachmentsBrowser = View.extend(/** @lends wp.media.view.AttachmentsBrowser.pro
filters: Filters,
style: 'primary',
disabled: true,
text: mediaTrash ? l10n.trashSelected : l10n.deleteSelected,
text: mediaTrash ? l10n.trashSelected : l10n.deletePermanently,
controller: this.controller,
priority: -60,
click: function() {
@ -7743,7 +7743,7 @@ AttachmentsBrowser = View.extend(/** @lends wp.media.view.AttachmentsBrowser.pro
filters: Filters,
style: 'primary',
disabled: true,
text: l10n.deleteSelected,
text: l10n.deletePermanently,
controller: this.controller,
priority: -55,
click: function() {

File diff suppressed because one or more lines are too long

View File

@ -480,9 +480,9 @@ function wp_print_media_templates() {
<# if ( ! data.uploading && data.can.remove ) { #> |
<?php if ( MEDIA_TRASH ) : ?>
<# if ( 'trash' === data.status ) { #>
<button type="button" class="button-link untrash-attachment"><?php _e( 'Untrash' ); ?></button>
<button type="button" class="button-link untrash-attachment"><?php _e( 'Restore from Trash' ); ?></button>
<# } else { #>
<button type="button" class="button-link trash-attachment"><?php _ex( 'Trash', 'verb' ); ?></button>
<button type="button" class="button-link trash-attachment"><?php _e( 'Move to Trash' ); ?></button>
<# } #>
<?php else : ?>
<button type="button" class="button-link delete-attachment"><?php _e( 'Delete Permanently' ); ?></button>
@ -591,9 +591,9 @@ function wp_print_media_templates() {
<# if ( ! data.uploading && data.can.remove ) { #>
<?php if ( MEDIA_TRASH ) : ?>
<# if ( 'trash' === data.status ) { #>
<button type="button" class="button-link untrash-attachment"><?php _e( 'Untrash' ); ?></button>
<button type="button" class="button-link untrash-attachment"><?php _e( 'Restore from Trash' ); ?></button>
<# } else { #>
<button type="button" class="button-link trash-attachment"><?php _ex( 'Trash', 'verb' ); ?></button>
<button type="button" class="button-link trash-attachment"><?php _ex( 'Move to Trash', 'verb' ); ?></button>
<# } #>
<?php else : ?>
<button type="button" class="button-link delete-attachment"><?php _e( 'Delete Permanently' ); ?></button>

View File

@ -3680,10 +3680,8 @@ function wp_enqueue_media( $args = array() ) {
'warnBulkDelete' => __( "You are about to permanently delete these items from your site.\nThis action cannot be undone.\n 'Cancel' to stop, 'OK' to delete." ),
'warnBulkTrash' => __( "You are about to trash these items.\n 'Cancel' to stop, 'OK' to delete." ),
'bulkSelect' => __( 'Bulk Select' ),
'cancelSelection' => __( 'Cancel Selection' ),
'trashSelected' => __( 'Trash Selected' ),
'untrashSelected' => __( 'Untrash Selected' ),
'deleteSelected' => __( 'Delete Selected' ),
'trashSelected' => __( 'Move to Trash' ),
'restoreSelected' => __( 'Restore from Trash' ),
'deletePermanently' => __( 'Delete Permanently' ),
'apply' => __( 'Apply' ),
'filterByDate' => __( 'Filter by date' ),

View File

@ -13,7 +13,7 @@
*
* @global string $wp_version
*/
$wp_version = '5.2-beta1-45146';
$wp_version = '5.2-beta1-45147';
/**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.