Skip to content
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

Subscriptions: Add a clear message when an email having many pending confirmations tries to subscribe a site. #14275

Merged
merged 4 commits into from
Jan 14, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions modules/subscriptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,9 @@ function widget_submit() {
case 'pending':
$result = 'already';
break;
case 'flooded_email':
$result = 'many_pending_subs';
break;
default:
$result = 'error';
break;
Expand Down
6 changes: 6 additions & 0 deletions modules/subscriptions/views.php
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,12 @@ static function render_widget_status_messages( $instance ) {
__( 'Manage your email preferences.', 'jetpack' )
); ?></p>
<?php break;
case 'many_pending_subs' : ?>
<p class="error"><?php printf( __( 'You already have several pending email subscriptions. <br /> Approve or delete a few subscriptions at <a href="%1$s" title="%2$s" target="_blank">subscribe.wordpress.com</a> before continuing.', 'jetpack' ),
htdat marked this conversation as resolved.
Show resolved Hide resolved
htdat marked this conversation as resolved.
Show resolved Hide resolved
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know if several is the right word here, since this can happen with just a few pending subs. Should we remove that word?

Copy link
Member Author

@htdat htdat Jan 7, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

several means more than two but not many. (I checked on the Oxford dictionary :D) Basically, I think its meaning is similar to "a few"?

Originally, I used "a few" too and then I followed the same message in WP.com side
https://github.com/Automattic/jetpack/blob/8.0/modules/subscriptions/views.php#L177

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll let a native chime in on this :)

cc @kraftbj

'https://subscribe.wordpress.com/',
__( 'Manage your email preferences.', 'jetpack' )
htdat marked this conversation as resolved.
Show resolved Hide resolved
); ?></p>
<?php break;
case 'success' : ?>
<div class="success"><?php echo wpautop( str_replace( '[total-subscribers]', number_format_i18n( $subscribers_total['value'] ), $success_message ) ); ?></div>
<?php break;
Expand Down