-
Notifications
You must be signed in to change notification settings - Fork 384
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
1360 Admin amp_invalid_url table - replace 'trash' text #1408
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What about updating the post type's not_found_in_trash
label as well?
get_delete_post_link( $post->ID ), | ||
/* translators: %s: post title */ | ||
esc_attr( sprintf( __( 'Forget “%s”', 'amp' ), $post->post_title ) ), | ||
__( 'Forget', 'amp' ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be esc_html__()
instead of __()
if ( isset( $views['trash'] ) ) { | ||
$status = get_post_status_object( 'trash' ); | ||
|
||
$views['trash'] = str_replace( $status->label, __( 'Forgotten', 'amp' ), $views['trash'] ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Better to use esc_html__()
here than __()
.
* | ||
* @param array $actions The bulk actions in the edit.php page. | ||
* @return array $actions The filtered bulk actions. | ||
*/ | ||
public static function add_bulk_action( $actions ) { | ||
public static function filter_bulk_actions( $actions ) { | ||
$actions['trash'] = esc_html__( 'Forget', 'amp' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also updating the "Move to Trash" text in the Bulk Actions select.
@@ -89,7 +89,7 @@ public static function register() { | |||
'menu_name' => __( 'Invalid Pages', 'amp' ), | |||
'singular_name' => __( 'Invalid AMP Page (URL)', 'amp' ), | |||
'not_found' => __( 'No invalid AMP pages found', 'amp' ), | |||
'not_found_in_trash' => __( 'No invalid AMP pages in trash', 'amp' ), | |||
'not_found_in_trash' => __( 'No forgotten AMP pages', 'amp' ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be “forgotten invalid AMP pages” for now.
@@ -627,7 +628,7 @@ public static function filter_row_actions( $actions, $post ) { | |||
$actions[ self::VALIDATE_ACTION ] = sprintf( | |||
'<a href="%s">%s</a>', | |||
esc_url( self::get_recheck_url( $post ) ), | |||
esc_html__( 'Re-check', 'amp' ) | |||
esc_html__( 'Recheck', 'amp' ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed hyphen from 'Re-check' for consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good, as it seems the most commonly-accepted spelling is without the hyphen.
@@ -1045,7 +1052,7 @@ public static function print_status_meta_box( $post ) { | |||
<div id="minor-publishing-actions"> | |||
<div id="re-check-action"> | |||
<a class="button button-secondary" href="<?php echo esc_url( self::get_recheck_url( $post ) ); ?>"> | |||
<?php esc_html_e( 'Re-check', 'amp' ); ?> | |||
<?php esc_html_e( 'Recheck', 'amp' ); ?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed hyphen from 'Re-check' for consistency.
/* translators: %s is the number of posts restored from trash. */ | ||
'untrashed' => _n( | ||
'%s invalid AMP page unforgotten.', | ||
'%s invalid AMP pages unforgotten.', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
“Remembered”? 😄
'deleted' => _n( | ||
'%s invalid AMP page permanently forgotten.', | ||
'%s invalid AMP post permanently forgotten.', | ||
$bulk_counts['deleted'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor thing (and other such instances): this could be wrapped in number_format_i18n()
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Meh, core isn't doing it. So no need for it here.
This addresses @kienstra's comments on #1360 requesting changes to the "Trash" text in the
amp_invalid_url
admin archive and views links.In the archive table, the "Trash" verb is changed to "Forget." In the views links, "Trash" is changed to "Forgotten."