Make WordPress Core

Opened 4 years ago

Closed 11 months ago

Last modified 10 months ago

#51387 closed defect (bug) (fixed)

Add trash post type label

Reported by: ntsekouras's profile ntsekouras Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 6.3 Priority: normal
Severity: normal Version:
Component: Posts, Post Types Keywords: has-patch needs-testing has-dev-note
Focuses: administration Cc:


Now as we can see from the available post type labels, there is not one for trashing an entity.
Ref here:

In Gutenberg when you trash an entity should show a message from the labels, so as to be translated as well.

Related issue in Gutenberg here:

Change History (10)

#1 @SergeyBiryukov
4 years ago

  • Component changed from General to Posts, Post Types

#2 @johnbillion
4 years ago

  • Keywords needs-patch added

This ticket was mentioned in PR #4253 on WordPress/wordpress-develop by @James Roberts.

14 months ago

  • Keywords has-patch added; needs-patch removed

Added the item_trashed default label to the get_default_labels() method.

This update adds the item_trashed default label to the get_default_labels() method. As per #25604 , this should allow #25563 to move forward now that the strings are translatable. Note: #25563 was reverted, pending this update to core.

Testing Instructions:

  1. Manually apply the changes in #25563 to a local copy of the Gutenberg plugin.
  2. Remove the if statement [ here].
  3. Instead of noticeMessage = ${ postType.labels.singular_name } trashed.;, use noticeMessage = postType.labels.item_trashed;
  4. Re-build Gutenberg - npm run build.
  5. Open a post in the editor - On the Document settings pane, click on "Move to trash".
  6. Voice Over should read "Post trashed" before redirecting.

Trac ticket:

#4 @James Roberts
14 months ago

  • Keywords needs-testing added

@James Roberts commented on PR #4253:

14 months ago

E2E test locally gives the following results:

Test Suites: 6 passed, 6 total
Tests:       15 passed, 15 total
Snapshots:   0 total
Time:        117.714 s, estimated 224 s

Would it be possible to re-run it?

#6 @SergeyBiryukov
11 months ago

  • Milestone changed from Awaiting Review to 6.3

#7 @SergeyBiryukov
11 months ago

  • Owner set to SergeyBiryukov
  • Resolution set to fixed
  • Status changed from new to closed

In 55923:

Posts, Post Types: Introduce item_trashed post type label.

This allows the block editor to announce the correct message when an entity is moved to the Trash.

Original issue from Gutenberg repository:

Props james-roberts, ntsekouras, nrqsnchz, afercia, swissspidy, joedolson, talldanwp, SergeyBiryukov.
Fixes #51387.

@SergeyBiryukov commented on PR #4253:

11 months ago

Thanks for the PR! Merged in r55923.

#9 @swissspidy
11 months ago

  • Keywords needs-dev-note added

#10 @stevenlinx
10 months ago

  • Keywords has-dev-note added; needs-dev-note removed
Note: See TracTickets for help on using tickets.