Skip to content

Commit dd999ad

Browse files
committed
update wording
1 parent d2463a8 commit dd999ad

2 files changed

Lines changed: 45 additions & 16 deletions

File tree

assets/css/web-components/prpl-suggested-task.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,10 @@
3030

3131
/* Button which triggers the popover, interactive tasks. */
3232
button[popovertarget] {
33-
line-height: 1;
3433
text-align: initial;
3534
color: var(--prpl-color-link);
3635
text-decoration: underline;
36+
line-height: 1.5;
3737
}
3838
}
3939

classes/suggested-tasks/providers/interactive/class-email-sending.php

Lines changed: 44 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,13 @@ class Email_Sending extends Interactive {
3535
*/
3636
const CATEGORY = 'configuration';
3737

38+
/**
39+
* Whether the task is dismissable.
40+
*
41+
* @var bool
42+
*/
43+
protected $is_dismissable = true;
44+
3845
/**
3946
* The popover ID.
4047
*
@@ -84,6 +91,24 @@ public function init() {
8491
$this->email_content = sprintf( \esc_html__( 'This is a test email. Complete the task by clicking the link: %s', 'progress-planner' ), \admin_url( 'admin.php?page=progress-planner&prpl_complete_task=' . $this->get_task_id() ) );
8592
}
8693

94+
/**
95+
* Get the title.
96+
*
97+
* @return string
98+
*/
99+
public function get_title() {
100+
return \esc_html__( 'Test if your website can send emails correctly', 'progress-planner' );
101+
}
102+
103+
/**
104+
* Get the description.
105+
*
106+
* @return string
107+
*/
108+
public function get_description() {
109+
return \esc_html__( 'Test if your website can send emails correctly', 'progress-planner' );
110+
}
111+
87112
/**
88113
* Enqueue the scripts.
89114
*
@@ -163,16 +188,17 @@ public function the_popover_content() {
163188
<div class="prpl-columns-wrapper-flex prpl-sending-email-step" id="prpl-sending-email-form-step">
164189
<div class="prpl-column prpl-column-content">
165190
<h2 class="prpl-interactive-task-title"><?php \esc_html_e( 'Test if your site can send emails', 'progress-planner' ); ?></h2>
166-
<p class="prpl-interactive-task-description"><?php \esc_html_e( 'Your WordPress website sometimes needs to send transactional email. For example, to reset passwords, when a fatal error occurs, or comment notifications. And oftentimes contactforms also try to send email. It is therefore important to verify that those emails are actually sent. Start by filling out your email address to send a test.', 'progress-planner' ); ?></p>
191+
<p class="prpl-interactive-task-description"><?php \esc_html_e( 'Your WordPress site sometimes needs to send emails. For example, to reset a password, send a comment notification, or warn you when something breaks. Contact forms also use email.', 'progress-planner' ); ?></p>
192+
<p class="prpl-interactive-task-description"><?php \esc_html_e( 'It’s important to check if these emails are actually sent. Enter your email address on the right to get a test email.', 'progress-planner' ); ?></p>
167193
</div>
168194
<div class="prpl-column">
169-
<p><?php \esc_html_e( 'To what email address should we send the test email?', 'progress-planner' ); ?></p>
195+
<p><?php \esc_html_e( 'Where should we send the test email?', 'progress-planner' ); ?></p>
170196
<div class="prpl-note">
171197
<span class="prpl-note-icon">
172198
<?php \progress_planner()->the_asset( 'images/icon_exclamation_triangle_solid.svg' ); ?>
173199
</span>
174200
<span class="prpl-note-text">
175-
<?php \esc_html_e( 'Usually our test email should arrive within a few minutes. In rare cases, it can take up to several hours for our test to arrive in your inbox.', 'progress-planner' ); ?>
201+
<?php \esc_html_e( 'You should get the email in a few minutes. In rare cases, it might take a few hours.', 'progress-planner' ); ?>
176202
</span>
177203
</div>
178204
<form id="prpl-sending-email-form" onsubmit="return false;">
@@ -193,17 +219,19 @@ public function the_popover_content() {
193219
<?php /* We detected an error during sending test email, showing error message */ ?>
194220
<div class="prpl-columns-wrapper-flex prpl-sending-email-step" id="prpl-sending-email-error-occurred-step" style="display: none;">
195221
<div class="prpl-column prpl-column-content">
196-
197-
</div>
198-
199-
<div class="prpl-column">
200-
<p id="prpl-sending-email-error-occurred-message" data-email-message="
222+
<h2 class="prpl-interactive-task-title"><?php \esc_html_e( 'We tried to send a test email', 'progress-planner' ); ?></h2>
223+
<p class="prpl-interactive-task-description" id="prpl-sending-email-error-occurred-message" data-email-message="
201224
<?php
202225
/* translators: %s is the email subject. */
203-
printf( \esc_attr__( 'We\'ve just tried to send an email titled "%s" to "[EMAIL_ADDRESS]". Unfortunately this failed with the following error message: [ERROR_MESSAGE]', 'progress-planner' ), \esc_attr( $this->email_subject ) );
226+
printf( \esc_attr__( 'We just tried to send the email "%s" to [EMAIL_ADDRESS], but it didn’t work. The error message was: [ERROR_MESSAGE]', 'progress-planner' ), \esc_attr( $this->email_subject ) );
204227
?>
205228
"></p>
206229

230+
</div>
231+
232+
<div class="prpl-column">
233+
<p><?php \esc_html_e( 'Please fix the issue and try again.', 'progress-planner' ); ?></p>
234+
207235
<div class="prpl-steps-nav-wrapper">
208236
<button class="prpl-button" data-action="showForm"><?php \esc_html_e( 'Retry now', 'progress-planner' ); ?></button>
209237
<button class="prpl-button" data-action="closePopover"><?php \esc_html_e( 'Close', 'progress-planner' ); ?></button>
@@ -214,10 +242,11 @@ public function the_popover_content() {
214242
<?php /* Email sent, asking user if they received it */ ?>
215243
<div class="prpl-columns-wrapper-flex prpl-sending-email-step" id="prpl-sending-email-result-step" style="display: none;">
216244
<div class="prpl-column prpl-column-content">
217-
<p id="prpl-sending-email-sent-message" data-email-message="
245+
<h2 class="prpl-interactive-task-title"><?php \esc_html_e( 'We sent a test email', 'progress-planner' ); ?></h2>
246+
<p class="prpl-interactive-task-description" id="prpl-sending-email-sent-message" data-email-message="
218247
<?php
219248
/* translators: %s is the email subject. */
220-
printf( \esc_attr__( 'We\'ve just tried to send an email titled "%s" to "[EMAIL_ADDRESS]". Usually our test email should arrive within a few minutes. In rare cases, it can take up to several hours for our test to arrive in your inbox.', 'progress-planner' ), \esc_attr( $this->email_subject ) );
249+
printf( \esc_attr__( 'We just sent the email "%s" to [EMAIL_ADDRESS]. It usually arrives within a few minutes. In rare cases, it might take a few hours.', 'progress-planner' ), \esc_attr( $this->email_subject ) );
221250
?>
222251
"></p>
223252

@@ -266,7 +295,7 @@ public function the_popover_content() {
266295
<?php /* Email received, showing success message */ ?>
267296
<div class="prpl-columns-wrapper-flex prpl-sending-email-step" id="prpl-sending-email-success-step" style="display: none;">
268297
<div class="prpl-column prpl-column-content">
269-
<?php \esc_html_e( 'We\'re happy to hear you\'ve received our test email. This indicates email is set up properly on your website.', 'progress-planner' ); ?>
298+
<?php \esc_html_e( 'Great, you received the test email! That means email is working correctly on your website.', 'progress-planner' ); ?>
270299
</div>
271300

272301
<div class="prpl-column">
@@ -323,15 +352,15 @@ public function get_task_details( $task_id = '' ) {
323352

324353
return [
325354
'task_id' => $task_id,
326-
'title' => \esc_html__( 'Test if your site can send emails', 'progress-planner' ),
355+
'title' => $this->get_title(),
327356
'parent' => 0,
328357
'priority' => 'high',
329358
'category' => $this->get_provider_category(),
330359
'provider_id' => $this->get_provider_id(),
331360
'points' => 1,
332-
'dismissable' => true,
361+
'dismissable' => $this->is_dismissable(),
333362
'popover_id' => 'prpl-popover-' . $this->popover_id,
334-
'description' => '<p>' . \esc_html__( 'Check if email sending is working.', 'progress-planner' ) . '</p>',
363+
'description' => $this->get_description(),
335364
];
336365
}
337366
}

0 commit comments

Comments
 (0)