Make WordPress Core

Opened 7 years ago

Closed 4 years ago

#38669 closed enhancement (fixed)

Standardize "found in trash" messages

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


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 7 years ago.
38669.2.diff (521 bytes) - added by Presskopp 7 years ago.
38669.3.diff (1.0 KB) - added by Presskopp 7 years ago.
38669.4.diff (996 bytes) - added by Presskopp 6 years ago.
38669.5.diff (972 bytes) - added by Presskopp 5 years ago.
Refreshing (and testing)

Download all attachments as: .zip

Change History (17)

#1 @ocean90
7 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
7 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.' ); }

7 years ago

#3 @Presskopp
7 years ago

this could be leading to a working patch..

7 years ago

#4 @Presskopp
7 years ago

trying to meet the coding standards

7 years ago

#5 @Presskopp
7 years ago

failed - try again

#6 @Presskopp
6 years ago

  • Keywords has-patch added

6 years ago

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

6 years ago

5 years ago

Refreshing (and testing)

#8 @desrosj
4 years ago

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

#9 @garrett-eclipse
4 years ago

  • Component changed from Text Changes to Administration

#10 @garrett-eclipse
4 years ago

  • Focuses ui-copy added

#11 @audrasjb
4 years 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
4 years 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.