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

Merged
merged 7 commits into from Sep 7, 2018

Conversation

Projects
None yet
2 participants
@johnwatkins0
Contributor

johnwatkins0 commented Sep 6, 2018

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."

@johnwatkins0 johnwatkins0 requested a review from kienstra Sep 6, 2018

@westonruter

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' )

This comment has been minimized.

@westonruter

westonruter Sep 6, 2018

Member

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'] );

This comment has been minimized.

@westonruter

westonruter Sep 6, 2018

Member

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' );

This comment has been minimized.

@johnwatkins0

johnwatkins0 Sep 6, 2018

Contributor

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' ),

This comment has been minimized.

@westonruter

westonruter Sep 6, 2018

Member

This should be “forgotten invalid AMP pages” for now.

johnwatkins0 added some commits Sep 6, 2018

@westonruter

This comment has been minimized.

Member

westonruter commented Sep 7, 2018

What about this success message:

image

@@ -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' )

This comment has been minimized.

@johnwatkins0

johnwatkins0 Sep 7, 2018

Contributor

Removed hyphen from 'Re-check' for consistency.

This comment has been minimized.

@westonruter

westonruter Sep 7, 2018

Member

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' ); ?>

This comment has been minimized.

@johnwatkins0

johnwatkins0 Sep 7, 2018

Contributor

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.',

This comment has been minimized.

@westonruter

westonruter Sep 7, 2018

Member

“Remembered”? 😄

'deleted' => _n(
'%s invalid AMP page permanently forgotten.',
'%s invalid AMP post permanently forgotten.',
$bulk_counts['deleted'],

This comment has been minimized.

@westonruter

westonruter Sep 7, 2018

Member

Minor thing (and other such instances): this could be wrapped in number_format_i18n().

This comment has been minimized.

@westonruter

westonruter Sep 7, 2018

Member

Meh, core isn't doing it. So no need for it here.

@westonruter westonruter added this to the v1.0 milestone Sep 7, 2018

@westonruter westonruter merged commit 4015913 into develop Sep 7, 2018

2 checks passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details

@westonruter westonruter deleted the update/1360-trash-text branch Sep 7, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment