Update transactional emails label
This commit is contained in:
committed by
Veljko V
parent
c9c0750bca
commit
f3e48867b8
@@ -48,6 +48,10 @@
|
|||||||
.mailpoet_emails_per_second_warning {
|
.mailpoet_emails_per_second_warning {
|
||||||
color: $color-editor-warning;
|
color: $color-editor-warning;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.mailpoet-note {
|
||||||
|
font-style: italic;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.mailpoet_woocommerce_editor_button {
|
.mailpoet_woocommerce_editor_button {
|
||||||
|
@@ -1,11 +1,20 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
import ReactStringReplace from 'react-string-replace';
|
||||||
|
|
||||||
import { t, onChange } from 'common/functions';
|
import { t, onChange } from 'common/functions';
|
||||||
import { useSetting } from 'settings/store/hooks';
|
|
||||||
import { Label, Inputs } from 'settings/components';
|
import { Label, Inputs } from 'settings/components';
|
||||||
|
import { useSetting, useSelector } from 'settings/store/hooks';
|
||||||
|
|
||||||
export default function Transactional() {
|
export default function Transactional() {
|
||||||
|
const [provider] = useSetting('smtp_provider');
|
||||||
|
const isMssActive = useSelector('isMssActive')();
|
||||||
const [enabled, setEnabled] = useSetting('send_transactional_emails');
|
const [enabled, setEnabled] = useSetting('send_transactional_emails');
|
||||||
|
let methodLabel;
|
||||||
|
if (isMssActive) methodLabel = 'MailPoet Sending Service';
|
||||||
|
else if (provider === 'manual') methodLabel = 'SMTP';
|
||||||
|
else if (provider === 'SendGrid') methodLabel = 'SendGrid';
|
||||||
|
else if (provider === 'AmazonSES') methodLabel = 'Amazon SES';
|
||||||
|
else if (provider === 'server') methodLabel = t('hostOption');
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
@@ -36,7 +45,23 @@ export default function Transactional() {
|
|||||||
onChange={onChange(setEnabled)}
|
onChange={onChange(setEnabled)}
|
||||||
/>
|
/>
|
||||||
<label htmlFor="transactional-enabled">
|
<label htmlFor="transactional-enabled">
|
||||||
{t('transactionalCurrentMethod')}
|
{t('transactionalCurrentMethod').replace('%1$s', methodLabel)}
|
||||||
|
<br />
|
||||||
|
<span className="mailpoet-note">
|
||||||
|
{ReactStringReplace(t('transactionalMssNote'),
|
||||||
|
/\[link\](.*?)\[\/link\]/,
|
||||||
|
(text) => (
|
||||||
|
<a
|
||||||
|
key={text}
|
||||||
|
href="https://kb.mailpoet.com/article/292-choose-how-to-send-your-wordpress-websites-emails#attachments"
|
||||||
|
rel="noopener noreferrer"
|
||||||
|
data-beacon-article="5ddbf92504286364bc9228c5"
|
||||||
|
target="_blank"
|
||||||
|
>
|
||||||
|
{text}
|
||||||
|
</a>
|
||||||
|
))}
|
||||||
|
</span>
|
||||||
</label>
|
</label>
|
||||||
<br />
|
<br />
|
||||||
<input
|
<input
|
||||||
|
@@ -124,7 +124,8 @@
|
|||||||
'transactionalTitle': _x('Send all site’s emails with…', 'Transational emails settings title'),
|
'transactionalTitle': _x('Send all site’s emails with…', 'Transational emails settings title'),
|
||||||
'transactionalDescription': _x('Choose which method to send all your WordPress emails (e.g. password reset, new registration, WooCommerce invoices, etc.).', 'Transational emails settings description'),
|
'transactionalDescription': _x('Choose which method to send all your WordPress emails (e.g. password reset, new registration, WooCommerce invoices, etc.).', 'Transational emails settings description'),
|
||||||
'transactionalLink': _x('Read more.', 'Transactional emails settings link'),
|
'transactionalLink': _x('Read more.', 'Transactional emails settings link'),
|
||||||
'transactionalCurrentMethod': _x('The current sending method, eg. “MailPoet Sending Service” or “Sendgrid” (recommended)', 'Transactional emails settings option'),
|
'transactionalCurrentMethod': _x('The current sending method - %1$s (recommended)', 'Transactional emails settings option'),
|
||||||
|
'transactionalMssNote': __('Note: attachments, CC, BCC and multiple TO are not supported. [link]Learn more[/link]'),
|
||||||
'transactionalWP': _x('The default WordPress sending method (default)', 'Transactional emails settings option'),
|
'transactionalWP': _x('The default WordPress sending method (default)', 'Transactional emails settings option'),
|
||||||
'inactiveSubsTitle': __('Stop sending to inactive subscribers'),
|
'inactiveSubsTitle': __('Stop sending to inactive subscribers'),
|
||||||
'inactiveSubsDescription': __("Gmail, Yahoo and other email providers will treat your emails like spam if your subscribers don't open your emails in the long run. This option will mark your subscribers as Inactive and MailPoet will stop sending to them."),
|
'inactiveSubsDescription': __("Gmail, Yahoo and other email providers will treat your emails like spam if your subscribers don't open your emails in the long run. This option will mark your subscribers as Inactive and MailPoet will stop sending to them."),
|
||||||
|
Reference in New Issue
Block a user