Make WordPress Core

Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#45317 closed enhancement (fixed)

Trash or trash, that is the question

Reported by: presskopp's profile Presskopp Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.4 Priority: normal
Severity: normal Version:
Component: Administration Keywords: has-patch needs-testing has-unit-tests
Focuses: ui-copy Cc:

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 6 years ago.
Patch to change instances of "trash" to "Trash" where required.
45317.2.diff (20.6 KB) - added by garrett-eclipse 6 years 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 5 years 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 (18)

#1 @garrett-eclipse
6 years 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
6 years ago

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

#3 @Presskopp
6 years ago

  • Keywords needs-patch added

@aandrewdixon
6 years ago

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

@garrett-eclipse
6 years ago

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

#4 follow-up: @garrett-eclipse
6 years 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
6 years ago

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

#6 in reply to: ↑ 4 @aandrewdixon
6 years 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
6 years ago

No worries Andrew, thanks for the initial patch.

#9 in reply to: ↑ 8 @garrett-eclipse
6 years 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
6 years 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.


5 years ago

@garrett-eclipse
5 years ago

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

#12 @desrosj
5 years 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.

#13 @garrett-eclipse
5 years ago

  • Component changed from Text Changes to Administration
  • Focuses ui-copy added

#14 @SergeyBiryukov
5 years ago

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

In 47233:

Administration: Capitalize Trash consistently in various messages and comments.

When used as a noun referring to the "virtual" place, Trash should be capitalized.

Props garrett-eclipse, aandrewdixon, Presskopp.
Fixes #45317.

#15 @SergeyBiryukov
5 years ago

In 48594:

Administration: Capitalize Trash consistently in various messages.

When used as a noun referring to the "virtual" place, Trash should be capitalized.

Follow-up to [47233], [48352].

See #45317, #40244.

Note: See TracTickets for help on using tickets.