Make WordPress Core

Ticket #36089: 36089.2.patch

File 36089.2.patch, 7.8 KB (added by ocean90, 9 years ago)

Updates help text and a few more "media attachment"

  • src/wp-admin/edit-form-advanced.php

     
    160160         9 => sprintf( __( 'Page scheduled for: %s.' ), '<strong>' . $scheduled_date . '</strong>' ) . $scheduled_page_link_html,
    161161        10 => __( 'Page draft updated.' ) . $preview_page_link_html,
    162162);
    163 $messages['attachment'] = array_fill( 1, 10, __( 'Media attachment updated.' ) ); // Hack, for now.
     163$messages['attachment'] = array_fill( 1, 10, __( 'Media file updated.' ) ); // Hack, for now.
    164164
    165165/**
    166166 * Filter the post updated messages.
  • src/wp-admin/includes/class-wp-media-list-table.php

     
    213213         * @access public
    214214         */
    215215        public function no_items() {
    216                 _e( 'No media attachments found.' );
     216                _e( 'No media files found.' );
    217217        }
    218218
    219219        /**
  • src/wp-admin/media.php

     
    9292        if ( isset($_GET['message']) ) {
    9393                switch ( $_GET['message'] ) {
    9494                        case 'updated' :
    95                                 $message = __('Media attachment updated.');
     95                                $message = __('Media file updated.');
    9696                                $class = 'updated';
    9797                                break;
    9898                }
  • src/wp-admin/upload.php

     
    199199'id'            => 'attaching-files',
    200200'title'         => __('Attaching Files'),
    201201'content'       =>
    202         '<p>' . __( '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.' ) . '</p>'
     202        '<p>' . __( 'If a media file has not been attached to any post, 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 a post and attach the file.' ) . '</p>'
    203203) );
    204204
    205205get_current_screen()->set_help_sidebar(
     
    234234<?php
    235235$message = '';
    236236if ( ! empty( $_GET['posted'] ) ) {
    237         $message = __( 'Media attachment updated.' );
     237        $message = __( 'Media file updated.' );
    238238        $_SERVER['REQUEST_URI'] = remove_query_arg(array('posted'), $_SERVER['REQUEST_URI']);
    239239}
    240240
    241241if ( ! empty( $_GET['attached'] ) && $attached = absint( $_GET['attached'] ) ) {
    242242        if ( 1 == $attached ) {
    243                 $message = __( 'Media attachment reattached.' );
     243                $message = __( 'Media file reattached.' );
    244244        } else {
    245                 /* translators: %s: number of media attachments */
    246                 $message = _n( '%s media attachment reattached.', '%s media attachments reattached.', $attached );
     245                /* translators: %s: number of media files */
     246                $message = _n( '%s media file reattached.', '%s media files reattached.', $attached );
    247247        }
    248248        $message = sprintf( $message, number_format_i18n( $attached ) );
    249249        $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'detach', 'attached' ), $_SERVER['REQUEST_URI'] );
     
    251251
    252252if ( ! empty( $_GET['detach'] ) && $detached = absint( $_GET['detach'] ) ) {
    253253        if ( 1 == $detached ) {
    254                 $message = __( 'Media attachment detached.' );
     254                $message = __( 'Media file detached.' );
    255255        } else {
    256                 /* translators: %s: number of media attachments */
    257                 $message = _n( '%s media attachment detached.', '%s media attachments detached.', $detached );
     256                /* translators: %s: number of media files */
     257                $message = _n( '%s media file detached.', '%s media filse detached.', $detached );
    258258        }
    259259        $message = sprintf( $message, number_format_i18n( $detached ) );
    260260        $_SERVER['REQUEST_URI'] = remove_query_arg( array( 'detach', 'attached' ), $_SERVER['REQUEST_URI'] );
     
    262262
    263263if ( ! empty( $_GET['deleted'] ) && $deleted = absint( $_GET['deleted'] ) ) {
    264264        if ( 1 == $deleted ) {
    265                 $message = __( 'Media attachment permanently deleted.' );
     265                $message = __( 'Media file permanently deleted.' );
    266266        } else {
    267                 /* translators: %s: number of media attachments */
    268                 $message = _n( '%s media attachment permanently deleted.', '%s media attachments permanently deleted.', $deleted );
     267                /* translators: %s: number of media files */
     268                $message = _n( '%s media file permanently deleted.', '%s media files permanently deleted.', $deleted );
    269269        }
    270270        $message = sprintf( $message, number_format_i18n( $deleted ) );
    271271        $_SERVER['REQUEST_URI'] = remove_query_arg(array('deleted'), $_SERVER['REQUEST_URI']);
     
    273273
    274274if ( ! empty( $_GET['trashed'] ) && $trashed = absint( $_GET['trashed'] ) ) {
    275275        if ( 1 == $trashed ) {
    276                 $message = __( 'Media attachment moved to the trash.' );
     276                $message = __( 'Media file moved to the trash.' );
    277277        } else {
    278                 /* translators: %s: number of media attachments */
    279                 $message = _n( '%s media attachment moved to the trash.', '%s media attachments moved to the trash.', $trashed );
     278                /* translators: %s: number of media files */
     279                $message = _n( '%s media file moved to the trash.', '%s media files moved to the trash.', $trashed );
    280280        }
    281281        $message = sprintf( $message, number_format_i18n( $trashed ) );
    282282        $message .= ' <a href="' . esc_url( wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids='.(isset($_GET['ids']) ? $_GET['ids'] : ''), "bulk-media" ) ) . '">' . __('Undo') . '</a>';
     
    285285
    286286if ( ! empty( $_GET['untrashed'] ) && $untrashed = absint( $_GET['untrashed'] ) ) {
    287287        if ( 1 == $untrashed ) {
    288                 $message = __( 'Media attachment restored from the trash.' );
     288                $message = __( 'Media file restored from the trash.' );
    289289        } else {
    290                 /* translators: %s: number of media attachments */
    291                 $message = _n( '%s media attachment restored from the trash.', '%s media attachments restored from the trash.', $untrashed );
     290                /* translators: %s: number of media files */
     291                $message = _n( '%s media file restored from the trash.', '%s media files restored from the trash.', $untrashed );
    292292        }
    293293        $message = sprintf( $message, number_format_i18n( $untrashed ) );
    294294        $_SERVER['REQUEST_URI'] = remove_query_arg(array('untrashed'), $_SERVER['REQUEST_URI']);
    295295}
    296296
    297 $messages[1] = __( 'Media attachment updated.' );
    298 $messages[2] = __( 'Media attachment permanently deleted.' );
    299 $messages[3] = __( 'Error saving media attachment.' );
    300 $messages[4] = __( 'Media attachment moved to the trash.' ) . ' <a href="' . esc_url( wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids='.(isset($_GET['ids']) ? $_GET['ids'] : ''), "bulk-media" ) ) . '">' . __( 'Undo' ) . '</a>';
    301 $messages[5] = __( 'Media attachment restored from the trash.' );
     297$messages[1] = __( 'Media file updated.' );
     298$messages[2] = __( 'Media file permanently deleted.' );
     299$messages[3] = __( 'Error saving media file.' );
     300$messages[4] = __( 'Media file moved to the trash.' ) . ' <a href="' . esc_url( wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids='.(isset($_GET['ids']) ? $_GET['ids'] : ''), "bulk-media" ) ) . '">' . __( 'Undo' ) . '</a>';
     301$messages[5] = __( 'Media file restored from the trash.' );
    302302
    303303if ( ! empty( $_GET['message'] ) && isset( $messages[ $_GET['message'] ] ) ) {
    304304        $message = $messages[ $_GET['message'] ];
  • src/wp-includes/media.php

     
    33623362                'filterByDate'           => __( 'Filter by date' ),
    33633363                'filterByType'           => __( 'Filter by type' ),
    33643364                'searchMediaLabel'       => __( 'Search Media' ),
    3365                 'noMedia'                => __( 'No media attachments found.' ),
     3365                'noMedia'                => __( 'No media files found.' ),
    33663366
    33673367                // Library Details
    33683368                'attachmentDetails'  => __( 'Attachment Details' ),