Correct the welcome email status
[MAILPOET-1658]
This commit is contained in:
@@ -193,24 +193,10 @@ const NewsletterListWelcome = createReactClass({ // eslint-disable-line react/pr
|
|||||||
},
|
},
|
||||||
|
|
||||||
renderStatus: function renderStatus(newsletter) {
|
renderStatus: function renderStatus(newsletter) {
|
||||||
let totalSentMessage = MailPoet.I18n.t('notSentYet');
|
const totalSentMessage = MailPoet.I18n.t('sentToXSubscribers')
|
||||||
const totalSent = (parseInt(newsletter.total_sent, 10));
|
|
||||||
if (totalSent === 1) {
|
|
||||||
totalSentMessage = MailPoet.I18n.t('sentToXSubscribers');
|
|
||||||
}
|
|
||||||
if (totalSent > 1) {
|
|
||||||
totalSentMessage = MailPoet.I18n.t('sentToXSubscribersPlural')
|
|
||||||
.replace('%$1d', newsletter.total_sent.toLocaleString());
|
.replace('%$1d', newsletter.total_sent.toLocaleString());
|
||||||
}
|
const totalScheduledMessage = MailPoet.I18n.t('scheduledToXSubscribers')
|
||||||
let totalScheduledMessage = '';
|
.replace('%$1d', newsletter.total_scheduled.toLocaleString());
|
||||||
const totalScheduled = (parseInt(newsletter.total_scheduled, 10));
|
|
||||||
if (totalScheduled === 1) {
|
|
||||||
totalScheduledMessage = MailPoet.I18n.t('scheduledToXSubscribers');
|
|
||||||
}
|
|
||||||
if (totalScheduled > 1) {
|
|
||||||
totalScheduledMessage = MailPoet.I18n.t('scheduledToXSubscribersPlural')
|
|
||||||
.replace('%$1d', newsletter.total_sent.toLocaleString());
|
|
||||||
}
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
@@ -225,8 +211,7 @@ const NewsletterListWelcome = createReactClass({ // eslint-disable-line react/pr
|
|||||||
</select>
|
</select>
|
||||||
</p>
|
</p>
|
||||||
<p>
|
<p>
|
||||||
{ totalSentMessage }
|
{ totalSentMessage } <br />
|
||||||
{ totalScheduledMessage !== '' ? <br /> : '' }
|
|
||||||
{ totalScheduledMessage }
|
{ totalScheduledMessage }
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
|
@@ -105,10 +105,8 @@
|
|||||||
'active': __('Active'),
|
'active': __('Active'),
|
||||||
'inactive': __('Not Active'),
|
'inactive': __('Not Active'),
|
||||||
'newsletterQueueCompleted': __('Sent to %$1d of %$2d'),
|
'newsletterQueueCompleted': __('Sent to %$1d of %$2d'),
|
||||||
'sentToXSubscribers': _x('Sent to 1 subscriber', 'inform the number of emails already sent'),
|
'sentToXSubscribers': _x('%$1d sent', 'number of welcome emails sent'),
|
||||||
'sentToXSubscribersPlural': _x('Sent to %$1d subscribers', 'inform the number of emails already sent; always plural'),
|
'scheduledToXSubscribers': _x('%$1d scheduled', 'number of welcome emails scheduled to be sent'),
|
||||||
'scheduledToXSubscribers': _x('1 scheduled to be sent', 'inform the number of emails planned to be sent'),
|
|
||||||
'scheduledToXSubscribersPlural': _x('%$1d scheduled to be sent', 'inform the number of emails planned to be sent; always plural'),
|
|
||||||
'resume': __('Resume'),
|
'resume': __('Resume'),
|
||||||
'pause': __('Pause'),
|
'pause': __('Pause'),
|
||||||
'paused': __('Paused'),
|
'paused': __('Paused'),
|
||||||
|
Reference in New Issue
Block a user