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.

git-svn-id: https://develop.svn.wordpress.org/trunk@47233 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Sergey Biryukov
2020-02-10 04:10:09 +00:00
parent 5302cd6514
commit 023d4b2796
24 changed files with 70 additions and 70 deletions
+1 -1
View File
@@ -93,7 +93,7 @@ require_once ABSPATH . 'wp-admin/includes/admin.php';
auth_redirect();
// Schedule trash collection.
// Schedule Trash collection.
if ( ! wp_next_scheduled( 'wp_scheduled_delete' ) && ! wp_installing() ) {
wp_schedule_event( time(), 'daily', 'wp_scheduled_delete' );
}
+3 -3
View File
@@ -81,7 +81,7 @@ if ( $doaction ) {
}
if ( 'delete_all' === $doaction ) {
// Prepare for deletion of all posts with a specified post status (i.e. Empty trash).
// Prepare for deletion of all posts with a specified post status (i.e. Empty Trash).
$post_status = preg_replace( '/[^a-z0-9_-]+/i', '', $_REQUEST['post_status'] );
// Validate the post status exists.
if ( get_post_status_object( $post_status ) ) {
@@ -256,7 +256,7 @@ if ( 'post' === $post_type ) {
'<ul>' .
'<li>' . __( '<strong>Edit</strong> takes you to the editing screen for that post. You can also reach that screen by clicking on the post title.' ) . '</li>' .
'<li>' . __( '<strong>Quick Edit</strong> provides inline access to the metadata of your post, allowing you to update post details without leaving this screen.' ) . '</li>' .
'<li>' . __( '<strong>Trash</strong> removes your post from this list and places it in the trash, from which you can permanently delete it.' ) . '</li>' .
'<li>' . __( '<strong>Trash</strong> removes your post from this list and places it in the Trash, from which you can permanently delete it.' ) . '</li>' .
'<li>' . __( '<strong>Preview</strong> will show you what your draft post will look like if you publish it. View will take you to your live site to view the post. Which link is available depends on your post&#8217;s status.' ) . '</li>' .
'</ul>',
)
@@ -266,7 +266,7 @@ if ( 'post' === $post_type ) {
'id' => 'bulk-actions',
'title' => __( 'Bulk Actions' ),
'content' =>
'<p>' . __( '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.' ) . '</p>' .
'<p>' . __( '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.' ) . '</p>' .
'<p>' . __( 'When using Bulk Edit, you can change the metadata (categories, author, etc.) for all selected posts at once. To remove a post from the grouping, just click the x next to its name in the Bulk Edit area that appears.' ) . '</p>',
)
);
+3 -3
View File
@@ -716,7 +716,7 @@ function wp_ajax_delete_comment() {
$r = wp_untrash_comment( $comment );
// Undo trash, not in trash.
// Undo trash, not in Trash.
if ( ! isset( $_POST['comment_status'] ) || 'trash' !== $_POST['comment_status'] ) {
$delta = 1;
}
@@ -861,7 +861,7 @@ function wp_ajax_delete_post( $action ) {
}
/**
* Ajax handler for sending a post to the trash.
* Ajax handler for sending a post to the Trash.
*
* @since 3.1.0
*
@@ -897,7 +897,7 @@ function wp_ajax_trash_post( $action ) {
}
/**
* Ajax handler to restore a post from the trash.
* Ajax handler to restore a post from the Trash.
*
* @since 3.1.0
*
@@ -493,7 +493,7 @@ class WP_Posts_List_Table extends WP_List_Table {
/*
* Return if the post type doesn't have post formats, or there are no posts using formats,
* or if we're in the trash.
* or if we're in the Trash.
*/
if ( ! is_object_in_taxonomy( $post_type, 'post_format' ) || ! $used_post_formats || $this->is_trash ) {
return;
+2 -2
View File
@@ -525,7 +525,7 @@ function wp_comment_reply( $position = 1, $checkbox = false, $mode = 'single', $
}
/**
* Output 'undo move to trash' text for comments
* Output 'undo move to Trash' text for comments
*
* @since 2.9.0
*/
@@ -535,7 +535,7 @@ function wp_comment_trashnotice() {
<div class="trash-undo-inside">
<?php
/* translators: %s: Comment author, filled by AJAX. */
printf( __( 'Comment by %s moved to the trash.' ), '<strong></strong>' );
printf( __( 'Comment by %s moved to the Trash.' ), '<strong></strong>' );
?>
<span class="undo untrash"><a href="#"><?php _e( 'Undo' ); ?></a></span>
</div>
+1 -1
View File
@@ -206,7 +206,7 @@ printf(
<tr>
<th scope="row"><?php _e( 'Comment Blocklist' ); ?></th>
<td><fieldset><legend class="screen-reader-text"><span><?php _e( 'Comment Blocklist' ); ?></span></legend>
<p><label for="blacklist_keys"><?php _e( '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;.' ); ?></label></p>
<p><label for="blacklist_keys"><?php _e( '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;.' ); ?></label></p>
<p>
<textarea name="blacklist_keys" rows="10" cols="50" id="blacklist_keys" class="large-text code"><?php echo esc_textarea( get_option( 'blacklist_keys' ) ); ?></textarea>
</p>
+1 -1
View File
@@ -101,7 +101,7 @@ if ( ! empty( $privacy_policy_page_id ) ) {
'page_for_privacy_policy',
sprintf(
/* translators: %s: URL to Pages Trash. */
__( '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>.' ),
__( '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>.' ),
'edit.php?post_status=trash&post_type=page'
),
'error'
+6 -6
View File
@@ -328,10 +328,10 @@ if ( ! empty( $_GET['deleted'] ) && absint( $_GET['deleted'] ) ) {
if ( ! empty( $_GET['trashed'] ) && absint( $_GET['trashed'] ) ) {
$trashed = absint( $_GET['trashed'] );
if ( 1 == $trashed ) {
$message = __( 'Media file moved to the trash.' );
$message = __( 'Media file moved to the Trash.' );
} else {
/* translators: %s: Number of media files. */
$message = _n( '%s media file moved to the trash.', '%s media files moved to the trash.', $trashed );
$message = _n( '%s media file moved to the Trash.', '%s media files moved to the Trash.', $trashed );
}
$message = sprintf( $message, number_format_i18n( $trashed ) );
$message .= ' <a href="' . esc_url( wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids=' . ( isset( $_GET['ids'] ) ? $_GET['ids'] : '' ), 'bulk-media' ) ) . '">' . __( 'Undo' ) . '</a>';
@@ -341,10 +341,10 @@ if ( ! empty( $_GET['trashed'] ) && absint( $_GET['trashed'] ) ) {
if ( ! empty( $_GET['untrashed'] ) && absint( $_GET['untrashed'] ) ) {
$untrashed = absint( $_GET['untrashed'] );
if ( 1 == $untrashed ) {
$message = __( 'Media file restored from the trash.' );
$message = __( 'Media file restored from the Trash.' );
} else {
/* translators: %s: Number of media files. */
$message = _n( '%s media file restored from the trash.', '%s media files restored from the trash.', $untrashed );
$message = _n( '%s media file restored from the Trash.', '%s media files restored from the Trash.', $untrashed );
}
$message = sprintf( $message, number_format_i18n( $untrashed ) );
$_SERVER['REQUEST_URI'] = remove_query_arg( array( 'untrashed' ), $_SERVER['REQUEST_URI'] );
@@ -353,8 +353,8 @@ if ( ! empty( $_GET['untrashed'] ) && absint( $_GET['untrashed'] ) ) {
$messages[1] = __( 'Media file updated.' );
$messages[2] = __( 'Media file permanently deleted.' );
$messages[3] = __( 'Error saving media file.' );
$messages[4] = __( 'Media file moved to the trash.' ) . ' <a href="' . esc_url( wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids=' . ( isset( $_GET['ids'] ) ? $_GET['ids'] : '' ), 'bulk-media' ) ) . '">' . __( 'Undo' ) . '</a>';
$messages[5] = __( 'Media file restored from the trash.' );
$messages[4] = __( 'Media file moved to the Trash.' ) . ' <a href="' . esc_url( wp_nonce_url( 'upload.php?doaction=undo&action=untrash&ids=' . ( isset( $_GET['ids'] ) ? $_GET['ids'] : '' ), 'bulk-media' ) ) . '">' . __( 'Undo' ) . '</a>';
$messages[5] = __( 'Media file restored from the Trash.' );
if ( ! empty( $_GET['message'] ) && isset( $messages[ $_GET['message'] ] ) ) {
$message = $messages[ $_GET['message'] ];