WordPress.org

Make WordPress Core

Opened 12 months ago

Last modified 8 weeks ago

#45317 new enhancement

Trash or trash, that is the question

Reported by: Presskopp Owned by:
Milestone: 5.4 Priority: normal
Severity: normal Version:
Component: Text Changes Keywords: has-patch needs-testing has-unit-tests
Focuses: Cc:
PR Number:

Description

We usually have a big Trash (written capitalized), but not here:

CORE:

moved to the trash.

Whether to bypass trash and force deletion.

Move to trash

CORE/ADMIN:

The currently selected Privacy Policy page is in the trash. Please create or select a new Privacy Policy page or <a href="%s">restore the current page</a>.

%s media file restored from the trash.

%s media file moved to the trash.

You can also edit or move multiple posts to the trash at once. Select the posts you want to act on using the checkboxes, then select the action you want to take from the Bulk Actions menu and click Apply.

Media file restored from the trash.

Media file moved to the trash.

When a comment contains any of these words in its content, name, URL, email, or IP address, it will be put in the trash. One word or IP address per line. It will match inside words, so &#8220;press&#8221; will match &#8220;WordPress&#8221;.

Comment by %s moved to the trash.

Let me know if we want to trash the trash

Attachments (3)

45317.patch (7.3 KB) - added by aandrewdixon 7 months ago.
Patch to change instances of "trash" to "Trash" where required.
45317.2.diff (20.6 KB) - added by garrett-eclipse 7 months ago.
Updated patch with additional Trash verbiage changes, and updates to some comments and qunit tests
45317.3.diff (35.9 KB) - added by garrett-eclipse 8 weeks ago.
Refresh in order for it to apply properly. As well as caught several strings in comments that were overlooked

Download all attachments as: .zip

Change History (15)

#1 @garrett-eclipse
8 months ago

Thanks @Presskopp coming from #44675 my thoughts are 'Trash' should be capitalized when referring to the 'virtual' place as it's a noun. The 'trash' action would be lowercase when use like; 'Would you like to trash this'.
Reviewing the strings in your ticket all would be 'Trash' except the last would have both variants as follows;
'Let me know if we want to trash the Trash'

#2 @Presskopp
8 months ago

  • Keywords good-first-bug added; needs-patch removed

#3 @Presskopp
8 months ago

  • Keywords needs-patch added

@aandrewdixon
7 months ago

Patch to change instances of "trash" to "Trash" where required.

@garrett-eclipse
7 months ago

Updated patch with additional Trash verbiage changes, and updates to some comments and qunit tests

#4 follow-up: @garrett-eclipse
7 months ago

  • Keywords has-patch needs-testing has-unit-tests added; good-first-bug needs-patch removed
  • Milestone changed from Awaiting Review to 5.2

Thanks @aandrewdixon I appreciate the initial patch. I've uploaded another version to include a few more strings;
'Moved to the Trash.' - wp-includes/script-loader.php
'Whether to bypass Trash and force deletion.' - wp-includes/rest-api/endpoints/class-wp-rest-comments-controller.php
'Whether to bypass Trash and force deletion.' - wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php
*I also updated some comments and some of the qunit tests so they didn't fail due to the string changes.

The only instance I left alone was the one found on the block editor (Gutenberg) as it's already been handled upstream;
https://github.com/WordPress/gutenberg/pull/14591

#5 @ocean90
7 months ago

  • Milestone changed from 5.2 to 5.3
  • Type changed from defect (bug) to enhancement

#6 in reply to: ↑ 4 @aandrewdixon
7 months ago

Replying to garrett-eclipse:

@garrett-eclipse - Just noticed my editor was filtering to only search the wp-admin folder earlier when I did the searches to make the changes. Thanks for picking up the ones I stupidly missed.

#7 @garrett-eclipse
7 months ago

No worries Andrew, thanks for the initial patch.

#9 in reply to: ↑ 8 @garrett-eclipse
7 months ago

Hi @Presskopp the string changes in this enhancement haven't been committed yet and are slated for 5.3.

Replying to Presskopp:

To me it seems like the folowing 2 are not patched yet:

moved to the trash.

https://build.trac.wordpress.org/browser/trunk/wp-includes/script-loader.php?marks=1137#L1137

This is addressed in the patch attached to this ticket here: 45317.2.diff

Move to trash

https://build.trac.wordpress.org/browser/trunk/wp-includes/js/dist/editor.js?marks=12748#L12748

This string has been addressed upstream in Gutenberg (https://github.com/WordPress/gutenberg/pull/14591) and if it's not part of the 5.2 package would assume it would also land in 5.3.

The 'Move to Trash' strings committed today were part of #44675

#10 @garrett-eclipse
7 months ago

FYI - Looks like the 'Move to trash' instance in GB is now fixed in core.

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


2 months ago

@garrett-eclipse
8 weeks ago

Refresh in order for it to apply properly. As well as caught several strings in comments that were overlooked

#12 @desrosj
8 weeks ago

  • Milestone changed from 5.3 to 5.4

This one still needs testing and review. Unfortunately, we've run out of time for 5.3 enhancements with beta 1 in a few hours. Going to punt.

Note: See TracTickets for help on using tickets.