From 6a8cb09f868486b1a8ecdcac2a75e56a1826bc91 Mon Sep 17 00:00:00 2001 From: "Dominik Schilling (ocean90)" Date: Tue, 8 Mar 2016 17:42:45 +0000 Subject: [PATCH] Media: Change wording for media files which aren't attached. The media library can contain files which aren't attached yet. When attaching a file you currently get "Media attachment reattached.", or the opposite "Media attachment detached.". That's redundant and can be inaccurate. It's also not easy to translate in some languages. This change generalizes the strings to refer to a "media file" instead. Props SergeyBiryukov, ocean90, netweb. Fixes #36089. git-svn-id: https://develop.svn.wordpress.org/trunk@36887 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/edit-form-advanced.php | 2 +- .../includes/class-wp-media-list-table.php | 2 +- src/wp-admin/media.php | 2 +- src/wp-admin/upload.php | 44 +++++++++---------- src/wp-includes/media.php | 2 +- 5 files changed, 26 insertions(+), 26 deletions(-) diff --git a/src/wp-admin/edit-form-advanced.php b/src/wp-admin/edit-form-advanced.php index ffc2fd176c..d49bfb1e64 100644 --- a/src/wp-admin/edit-form-advanced.php +++ b/src/wp-admin/edit-form-advanced.php @@ -160,7 +160,7 @@ $messages['page'] = array( 9 => sprintf( __( 'Page scheduled for: %s.' ), '' . $scheduled_date . '' ) . $scheduled_page_link_html, 10 => __( 'Page draft updated.' ) . $preview_page_link_html, ); -$messages['attachment'] = array_fill( 1, 10, __( 'Media attachment updated.' ) ); // Hack, for now. +$messages['attachment'] = array_fill( 1, 10, __( 'Media file updated.' ) ); // Hack, for now. /** * Filter the post updated messages. diff --git a/src/wp-admin/includes/class-wp-media-list-table.php b/src/wp-admin/includes/class-wp-media-list-table.php index ba75c05740..98deaac8c9 100644 --- a/src/wp-admin/includes/class-wp-media-list-table.php +++ b/src/wp-admin/includes/class-wp-media-list-table.php @@ -213,7 +213,7 @@ class WP_Media_List_Table extends WP_List_Table { * @access public */ public function no_items() { - _e( 'No media attachments found.' ); + _e( 'No media files found.' ); } /** diff --git a/src/wp-admin/media.php b/src/wp-admin/media.php index d6c509621f..5f13d3ad16 100644 --- a/src/wp-admin/media.php +++ b/src/wp-admin/media.php @@ -92,7 +92,7 @@ case 'edit' : if ( isset($_GET['message']) ) { switch ( $_GET['message'] ) { case 'updated' : - $message = __('Media attachment updated.'); + $message = __('Media file updated.'); $class = 'updated'; break; } diff --git a/src/wp-admin/upload.php b/src/wp-admin/upload.php index e0522d417b..39ef32501e 100644 --- a/src/wp-admin/upload.php +++ b/src/wp-admin/upload.php @@ -199,7 +199,7 @@ get_current_screen()->add_help_tab( array( 'id' => 'attaching-files', 'title' => __('Attaching Files'), 'content' => - '

' . __( 'If a media file has not been attached to any post, you will see that in the Attached To column, and can click on Attach File to launch a small popup that will allow you to search for a post and attach the file.' ) . '

' + '

' . __( 'If a media file has not been attached to any content, you will see that in the Uploaded To column, and can click on Attach to launch a small popup that will allow you to search for existing content and attach the file.' ) . '

' ) ); get_current_screen()->set_help_sidebar( @@ -234,16 +234,16 @@ if ( isset( $_REQUEST['s'] ) && strlen( $_REQUEST['s'] ) ) { ' . __('Undo') . ''; @@ -285,20 +285,20 @@ if ( ! empty( $_GET['trashed'] ) && $trashed = absint( $_GET['trashed'] ) ) { if ( ! empty( $_GET['untrashed'] ) && $untrashed = absint( $_GET['untrashed'] ) ) { if ( 1 == $untrashed ) { - $message = __( 'Media attachment restored from the trash.' ); + $message = __( 'Media file restored from the trash.' ); } else { - /* translators: %s: number of media attachments */ - $message = _n( '%s media attachment restored from the trash.', '%s media attachments restored from the trash.', $untrashed ); + /* translators: %s: number of media files */ + $message = _n( '%s media file restored from the trash.', '%s media files restored from the trash.', $untrashed ); } $message = sprintf( $message, number_format_i18n( $untrashed ) ); $_SERVER['REQUEST_URI'] = remove_query_arg(array('untrashed'), $_SERVER['REQUEST_URI']); } -$messages[1] = __( 'Media attachment updated.' ); -$messages[2] = __( 'Media attachment permanently deleted.' ); -$messages[3] = __( 'Error saving media attachment.' ); -$messages[4] = __( 'Media attachment moved to the trash.' ) . ' ' . __( 'Undo' ) . ''; -$messages[5] = __( 'Media attachment restored from the trash.' ); +$messages[1] = __( 'Media file updated.' ); +$messages[2] = __( 'Media file permanently deleted.' ); +$messages[3] = __( 'Error saving media file.' ); +$messages[4] = __( 'Media file moved to the trash.' ) . ' ' . __( 'Undo' ) . ''; +$messages[5] = __( 'Media file restored from the trash.' ); if ( ! empty( $_GET['message'] ) && isset( $messages[ $_GET['message'] ] ) ) { $message = $messages[ $_GET['message'] ]; diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php index cf730815f5..6b0187a932 100644 --- a/src/wp-includes/media.php +++ b/src/wp-includes/media.php @@ -3362,7 +3362,7 @@ function wp_enqueue_media( $args = array() ) { 'filterByDate' => __( 'Filter by date' ), 'filterByType' => __( 'Filter by type' ), 'searchMediaLabel' => __( 'Search Media' ), - 'noMedia' => __( 'No media attachments found.' ), + 'noMedia' => __( 'No media files found.' ), // Library Details 'attachmentDetails' => __( 'Attachment Details' ),