WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 5 months ago

#38669 closed enhancement (fixed)

Standardize "found in trash" messages

Reported by: Presskopp Owned by: audrasjb
Milestone: 5.4 Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch commit
Focuses: ui-copy Cc:

Description

Currently, we use the following strings, if trash is empty:

No pages found in Trash. (wp-includes/post.php:1375)
No posts found in Trash. (wp-includes/post.php:1375)
No media files found. (wp-includes/media.php:3451)
No comments found. (wp-admin/includes/class-wp-comments-list-table.php:189)

There's also a new string coming with 4.7:
No changesets found in Trash. (wp-includes/post.php:167)

We should either strip the "in Trash" part or add it to the ones where it's missing.

related: #38341 (there's a screenshot)

Attachments (5)

38669.diff (1.2 KB) - added by Presskopp 4 years ago.
38669.2.diff (521 bytes) - added by Presskopp 3 years ago.
38669.3.diff (1.0 KB) - added by Presskopp 3 years ago.
38669.4.diff (996 bytes) - added by Presskopp 2 years ago.
38669.5.diff (972 bytes) - added by Presskopp 22 months ago.
Refreshing (and testing)

Download all attachments as: .zip

Change History (17)

#1 @ocean90
4 years ago

  • Version trunk deleted

"No media files found." and "No comments found." are also used when there are no items yet or a search result is empty.

#2 @Presskopp
4 years ago

What do you think of an approach like this (example: class-wp-comments-list-table.php)?

        public function no_items() {
                global $comment_status;

                if ( 'moderated' === $comment_status ) {
                        _e( 'No comments awaiting moderation.' );
                } else { 
                        if ( 'trash' === $comment_status ) {
                                _e( 'No comments found in Trash.' );
                        } else {
                        _e( 'No comments found.' ); }
                }
        }

@Presskopp
4 years ago

#3 @Presskopp
4 years ago

this could be leading to a working patch..

@Presskopp
3 years ago

#4 @Presskopp
3 years ago

trying to meet the coding standards

@Presskopp
3 years ago

#5 @Presskopp
3 years ago

failed - try again

#6 @Presskopp
2 years ago

  • Keywords has-patch added

@Presskopp
2 years ago

This ticket was mentioned in Slack in #core by presskopp. View the logs.


2 years ago

@Presskopp
22 months ago

Refreshing (and testing)

#8 @desrosj
7 months ago

  • Milestone changed from Awaiting Review to 5.4
  • Owner set to desrosj
  • Status changed from new to reviewing

#9 @garrett-eclipse
5 months ago

  • Component changed from Text Changes to Administration

#10 @garrett-eclipse
5 months ago

  • Focuses ui-copy added

#11 @audrasjb
5 months ago

  • Keywords commit added
  • Owner changed from desrosj to audrasjb
  • Status changed from reviewing to accepted
  • Type changed from defect (bug) to enhancement

I tested the patch: it works fine and it still applies cleanly on my side.
Thanks for the ticket and the patch!

Marking for commit.

#12 @SergeyBiryukov
5 months ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 47234:

Administration: Standardize "found in Trash" messages.

Props Presskopp, audrasjb.
Fixes #38669.

Note: See TracTickets for help on using tickets.