Update transactional emails label

This commit is contained in:
Amine Ben hammou
2020-06-29 23:22:06 +02:00
committed by Veljko V
parent c9c0750bca
commit f3e48867b8
3 changed files with 33 additions and 3 deletions

View File

@@ -48,6 +48,10 @@
.mailpoet_emails_per_second_warning {
color: $color-editor-warning;
}
.mailpoet-note {
font-style: italic;
}
}
.mailpoet_woocommerce_editor_button {

View File

@@ -1,11 +1,20 @@
import React from 'react';
import ReactStringReplace from 'react-string-replace';
import { t, onChange } from 'common/functions';
import { useSetting } from 'settings/store/hooks';
import { Label, Inputs } from 'settings/components';
import { useSetting, useSelector } from 'settings/store/hooks';
export default function Transactional() {
const [provider] = useSetting('smtp_provider');
const isMssActive = useSelector('isMssActive')();
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 (
<>
@@ -36,7 +45,23 @@ export default function Transactional() {
onChange={onChange(setEnabled)}
/>
<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>
<br />
<input

View File

@@ -124,7 +124,8 @@
'transactionalTitle': _x('Send all sites 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'),
'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'),
'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."),