summaryrefslogtreecommitdiff
path: root/Postman/Postman-Mail
diff options
context:
space:
mode:
Diffstat (limited to 'Postman/Postman-Mail')
-rw-r--r--Postman/Postman-Mail/PostmanDefaultModuleTransport.php2
-rw-r--r--Postman/Postman-Mail/PostmanGmailApiModuleTransport.php8
-rw-r--r--Postman/Postman-Mail/PostmanMailgunTransport.php32
-rw-r--r--Postman/Postman-Mail/PostmanMandrillTransport.php20
-rw-r--r--Postman/Postman-Mail/PostmanMessage.php4
-rw-r--r--Postman/Postman-Mail/PostmanModuleTransport.php16
-rw-r--r--Postman/Postman-Mail/PostmanMyMailConnector.php6
-rw-r--r--Postman/Postman-Mail/PostmanSendGridMailEngine.php12
-rw-r--r--Postman/Postman-Mail/PostmanSendGridTransport.php20
-rw-r--r--Postman/Postman-Mail/PostmanSmtpModuleTransport.php82
-rw-r--r--Postman/Postman-Mail/PostmanTransportRegistry.php6
-rw-r--r--Postman/Postman-Mail/PostmanWooCommerce.php42
-rw-r--r--Postman/Postman-Mail/PostmanZendMailEngine.php2
13 files changed, 126 insertions, 126 deletions
diff --git a/Postman/Postman-Mail/PostmanDefaultModuleTransport.php b/Postman/Postman-Mail/PostmanDefaultModuleTransport.php
index 8f30962..dbce30a 100644
--- a/Postman/Postman-Mail/PostmanDefaultModuleTransport.php
+++ b/Postman/Postman-Mail/PostmanDefaultModuleTransport.php
@@ -102,7 +102,7 @@ if (! class_exists ( 'PostmanSmtpModuleTransport' )) {
return self::SLUG;
}
public function getName() {
- return __ ( 'Default', Postman::TEXT_DOMAIN );
+ return __ ( 'Default', 'post-smtp' );
}
public function getHostname() {
return 'localhost';
diff --git a/Postman/Postman-Mail/PostmanGmailApiModuleTransport.php b/Postman/Postman-Mail/PostmanGmailApiModuleTransport.php
index ab568ea..eae4320 100644
--- a/Postman/Postman-Mail/PostmanGmailApiModuleTransport.php
+++ b/Postman/Postman-Mail/PostmanGmailApiModuleTransport.php
@@ -98,7 +98,7 @@ class PostmanGmailApiModuleTransport extends PostmanAbstractZendModuleTransport
return self::SLUG;
}
public function getName() {
- return __ ( 'Gmail API', Postman::TEXT_DOMAIN );
+ return __ ( 'Gmail API', 'post-smtp' );
}
public function isEnvelopeFromValidationSupported() {
return false;
@@ -148,7 +148,7 @@ class PostmanGmailApiModuleTransport extends PostmanAbstractZendModuleTransport
*/
public function getDeliveryDetails() {
/* translators: where (1) is the secure icon and (2) is the transport name */
- return sprintf ( __ ( 'Postman will send mail via the <b>%1$s %2$s</b>.', Postman::TEXT_DOMAIN ), '🔐', $this->getName () );
+ return sprintf ( __ ( 'Postman will send mail via the <b>%1$s %2$s</b>.', 'post-smtp' ), '🔐', $this->getName () );
}
/**
@@ -162,7 +162,7 @@ class PostmanGmailApiModuleTransport extends PostmanAbstractZendModuleTransport
$this->setReadyForOAuthGrant ();
if ($this->isPermissionNeeded ()) {
/* translators: %1$s is the Client ID label, and %2$s is the Client Secret label */
- $message = sprintf ( __ ( 'You have configured OAuth 2.0 authentication, but have not received permission to use it.', Postman::TEXT_DOMAIN ), $this->getScribe ()->getClientIdLabel (), $this->getScribe ()->getClientSecretLabel () );
+ $message = sprintf ( __ ( 'You have configured OAuth 2.0 authentication, but have not received permission to use it.', 'post-smtp' ), $this->getScribe ()->getClientIdLabel (), $this->getScribe ()->getClientSecretLabel () );
$message .= sprintf ( ' <a href="%s">%s</a>.', PostmanUtils::getGrantOAuthPermissionUrl (), $this->getScribe ()->getRequestPermissionLinkText () );
array_push ( $messages, $message );
$this->setNotConfiguredAndReady ();
@@ -217,7 +217,7 @@ class PostmanGmailApiModuleTransport extends PostmanAbstractZendModuleTransport
$overrideItem ['auth_items'] = array (
array (
'selected' => true,
- 'name' => __ ( 'OAuth 2.0 (requires Client ID and Client Secret)', Postman::TEXT_DOMAIN ),
+ 'name' => __ ( 'OAuth 2.0 (requires Client ID and Client Secret)', 'post-smtp' ),
'value' => 'oauth2'
)
);
diff --git a/Postman/Postman-Mail/PostmanMailgunTransport.php b/Postman/Postman-Mail/PostmanMailgunTransport.php
index dcbc1ae..4f79424 100644
--- a/Postman/Postman-Mail/PostmanMailgunTransport.php
+++ b/Postman/Postman-Mail/PostmanMailgunTransport.php
@@ -36,7 +36,7 @@ class PostmanMailgunTransport extends PostmanAbstractModuleTransport implements
return self::SLUG;
}
public function getName() {
- return __( 'Mailgun API', Postman::TEXT_DOMAIN );
+ return __( 'Mailgun API', 'post-smtp' );
}
/**
* v0.2.1
@@ -78,7 +78,7 @@ class PostmanMailgunTransport extends PostmanAbstractModuleTransport implements
}
public function getDeliveryDetails() {
/* translators: where (1) is the secure icon and (2) is the transport name */
- return sprintf( __( 'Post SMTP will send mail via the <b>%1$s %2$s</b>.', Postman::TEXT_DOMAIN ), '🔐', $this->getName() );
+ return sprintf( __( 'Post SMTP will send mail via the <b>%1$s %2$s</b>.', 'post-smtp' ), '🔐', $this->getName() );
}
/**
@@ -102,17 +102,17 @@ class PostmanMailgunTransport extends PostmanAbstractModuleTransport implements
$domainName = $this->options->getMailgunDomainName();
if ( empty( $apiKey ) ) {
- array_push( $messages, __( 'API Key can not be empty', Postman::TEXT_DOMAIN ) . '.' );
+ array_push( $messages, __( 'API Key can not be empty', 'post-smtp' ) . '.' );
$this->setNotConfiguredAndReady();
}
if ( empty( $domainName ) ) {
- array_push( $messages, __( 'Domain Name can not be empty', Postman::TEXT_DOMAIN ) . '.' );
+ array_push( $messages, __( 'Domain Name can not be empty', 'post-smtp' ) . '.' );
$this->setNotConfiguredAndReady();
}
if ( ! $this->isSenderConfigured() ) {
- array_push( $messages, __( 'Message From Address can not be empty', Postman::TEXT_DOMAIN ) . '.' );
+ array_push( $messages, __( 'Message From Address can not be empty', 'post-smtp' ) . '.' );
$this->setNotConfiguredAndReady();
}
return $messages;
@@ -155,7 +155,7 @@ class PostmanMailgunTransport extends PostmanAbstractModuleTransport implements
$overrideItem ['auth_items'] = array(
array(
'selected' => true,
- 'name' => __( 'API Key', Postman::TEXT_DOMAIN ),
+ 'name' => __( 'API Key', 'post-smtp' ),
'value' => 'api_key',
),
);
@@ -184,40 +184,40 @@ class PostmanMailgunTransport extends PostmanAbstractModuleTransport implements
*/
public function addSettings() {
// the Mailgun Auth section
- add_settings_section( PostmanMailgunTransport::MAILGUN_AUTH_SECTION, __( 'Authentication', Postman::TEXT_DOMAIN ), array(
+ add_settings_section( PostmanMailgunTransport::MAILGUN_AUTH_SECTION, __( 'Authentication', 'post-smtp' ), array(
$this,
'printMailgunAuthSectionInfo',
), PostmanMailgunTransport::MAILGUN_AUTH_OPTIONS );
- add_settings_field( PostmanOptions::MAILGUN_API_KEY, __( 'API Key', Postman::TEXT_DOMAIN ), array(
+ add_settings_field( PostmanOptions::MAILGUN_API_KEY, __( 'API Key', 'post-smtp' ), array(
$this,
'mailgun_api_key_callback',
), PostmanMailgunTransport::MAILGUN_AUTH_OPTIONS, PostmanMailgunTransport::MAILGUN_AUTH_SECTION );
- add_settings_field( PostmanOptions::MAILGUN_DOMAIN_NAME, __( 'Domain Name', Postman::TEXT_DOMAIN ), array(
+ add_settings_field( PostmanOptions::MAILGUN_DOMAIN_NAME, __( 'Domain Name', 'post-smtp' ), array(
$this,
'mailgun_domain_name_callback',
), PostmanMailgunTransport::MAILGUN_AUTH_OPTIONS, PostmanMailgunTransport::MAILGUN_AUTH_SECTION );
- add_settings_field( PostmanOptions::MAILGUN_REGION, __( 'Mailgun Europe Region?', Postman::TEXT_DOMAIN ), array(
+ add_settings_field( PostmanOptions::MAILGUN_REGION, __( 'Mailgun Europe Region?', 'post-smtp' ), array(
$this,
'mailgun_region_callback',
), PostmanMailgunTransport::MAILGUN_AUTH_OPTIONS, PostmanMailgunTransport::MAILGUN_AUTH_SECTION );
}
public function printMailgunAuthSectionInfo() {
/* Translators: Where (1) is the service URL and (2) is the service name and (3) is a api key URL */
- printf( '<p id="wizard_mailgun_auth_help">%s</p>', sprintf( __( 'Create an account at <a href="%1$s" target="_blank">%2$s</a> and enter <a href="%3$s" target="_blank">an API key</a> below.', Postman::TEXT_DOMAIN ), 'https://mailgun.com', 'mailgun.com', 'https://app.mailgun.com/app/domains/' ) );
+ printf( '<p id="wizard_mailgun_auth_help">%s</p>', sprintf( __( 'Create an account at <a href="%1$s" target="_blank">%2$s</a> and enter <a href="%3$s" target="_blank">an API key</a> below.', 'post-smtp' ), 'https://mailgun.com', 'mailgun.com', 'https://app.mailgun.com/app/domains/' ) );
}
/**
*/
public function mailgun_api_key_callback() {
- printf( '<input type="password" autocomplete="off" id="mailgun_api_key" name="postman_options[mailgun_api_key]" value="%s" size="60" class="required" placeholder="%s"/>', null !== $this->options->getMailgunApiKey() ? esc_attr( PostmanUtils::obfuscatePassword( $this->options->getMailgunApiKey() ) ) : '', __( 'Required', Postman::TEXT_DOMAIN ) );
+ printf( '<input type="password" autocomplete="off" id="mailgun_api_key" name="postman_options[mailgun_api_key]" value="%s" size="60" class="required" placeholder="%s"/>', null !== $this->options->getMailgunApiKey() ? esc_attr( PostmanUtils::obfuscatePassword( $this->options->getMailgunApiKey() ) ) : '', __( 'Required', 'post-smtp' ) );
print '<input type="button" id="toggleMailgunApiKey" value="Show Password" class="button button-secondary" style="visibility:hidden" />';
}
function mailgun_domain_name_callback() {
- printf( '<input type="text" autocomplete="off" id="mailgun_domain_name" name="postman_options[mailgun_domain_name]" value="%s" size="60" class="required" placeholder="%s"/>', null !== $this->options->getMailgunDomainName() ? esc_attr( $this->options->getMailgunDomainName() ) : '', __( 'Required', Postman::TEXT_DOMAIN ) );
+ printf( '<input type="text" autocomplete="off" id="mailgun_domain_name" name="postman_options[mailgun_domain_name]" value="%s" size="60" class="required" placeholder="%s"/>', null !== $this->options->getMailgunDomainName() ? esc_attr( $this->options->getMailgunDomainName() ) : '', __( 'Required', 'post-smtp' ) );
}
function mailgun_region_callback() {
@@ -248,14 +248,14 @@ class PostmanMailgunTransport extends PostmanAbstractModuleTransport implements
public function printWizardAuthenticationStep() {
print '<section class="wizard_mailgun">';
$this->printMailgunAuthSectionInfo();
- printf( '<label for="api_key">%s</label>', __( 'API Key', Postman::TEXT_DOMAIN ) );
+ printf( '<label for="api_key">%s</label>', __( 'API Key', 'post-smtp' ) );
print '<br />';
print $this->mailgun_api_key_callback();
- printf( '<label for="domain_name">%s</label>', __( 'Domain Name', Postman::TEXT_DOMAIN ) );
+ printf( '<label for="domain_name">%s</label>', __( 'Domain Name', 'post-smtp' ) );
print '<br />';
print $this->mailgun_domain_name_callback();
print '<br />';
- printf( '<label for="mailgun_region">%s</label>', __( 'Mailgun Europe Region?', Postman::TEXT_DOMAIN ) );
+ printf( '<label for="mailgun_region">%s</label>', __( 'Mailgun Europe Region?', 'post-smtp' ) );
print '<br />';
print $this->mailgun_region_callback();
print '</section>';
diff --git a/Postman/Postman-Mail/PostmanMandrillTransport.php b/Postman/Postman-Mail/PostmanMandrillTransport.php
index 795abfd..4526887 100644
--- a/Postman/Postman-Mail/PostmanMandrillTransport.php
+++ b/Postman/Postman-Mail/PostmanMandrillTransport.php
@@ -41,7 +41,7 @@ class PostmanMandrillTransport extends PostmanAbstractModuleTransport implements
return self::SLUG;
}
public function getName() {
- return __ ( 'Mandrill API', Postman::TEXT_DOMAIN );
+ return __ ( 'Mandrill API', 'post-smtp' );
}
/**
* v0.2.1
@@ -132,7 +132,7 @@ class PostmanMandrillTransport extends PostmanAbstractModuleTransport implements
*/
public function getDeliveryDetails() {
/* translators: where (1) is the secure icon and (2) is the transport name */
- return sprintf ( __ ( 'Postman will send mail via the <b>%1$s %2$s</b>.', Postman::TEXT_DOMAIN ), '🔐', $this->getName () );
+ return sprintf ( __ ( 'Postman will send mail via the <b>%1$s %2$s</b>.', 'post-smtp' ), '🔐', $this->getName () );
}
/**
@@ -144,11 +144,11 @@ class PostmanMandrillTransport extends PostmanAbstractModuleTransport implements
$messages = parent::validateTransportConfiguration ();
$apiKey = $this->options->getMandrillApiKey ();
if (empty ( $apiKey )) {
- array_push ( $messages, __ ( 'API Key can not be empty', Postman::TEXT_DOMAIN ) . '.' );
+ array_push ( $messages, __ ( 'API Key can not be empty', 'post-smtp' ) . '.' );
$this->setNotConfiguredAndReady ();
}
if (! $this->isSenderConfigured ()) {
- array_push ( $messages, __ ( 'Message From Address can not be empty', Postman::TEXT_DOMAIN ) . '.' );
+ array_push ( $messages, __ ( 'Message From Address can not be empty', 'post-smtp' ) . '.' );
$this->setNotConfiguredAndReady ();
}
return $messages;
@@ -191,7 +191,7 @@ class PostmanMandrillTransport extends PostmanAbstractModuleTransport implements
$overrideItem ['auth_items'] = array (
array (
'selected' => true,
- 'name' => __ ( 'API Key', Postman::TEXT_DOMAIN ),
+ 'name' => __ ( 'API Key', 'post-smtp' ),
'value' => 'api_key'
)
);
@@ -220,12 +220,12 @@ class PostmanMandrillTransport extends PostmanAbstractModuleTransport implements
*/
public function addSettings() {
// the Mandrill Auth section
- add_settings_section ( PostmanMandrillTransport::MANDRILL_AUTH_SECTION, __ ( 'Authentication', Postman::TEXT_DOMAIN ), array (
+ add_settings_section ( PostmanMandrillTransport::MANDRILL_AUTH_SECTION, __ ( 'Authentication', 'post-smtp' ), array (
$this,
'printMandrillAuthSectionInfo'
), PostmanMandrillTransport::MANDRILL_AUTH_OPTIONS );
- add_settings_field ( PostmanOptions::MANDRILL_API_KEY, __ ( 'API Key', Postman::TEXT_DOMAIN ), array (
+ add_settings_field ( PostmanOptions::MANDRILL_API_KEY, __ ( 'API Key', 'post-smtp' ), array (
$this,
'mandrill_api_key_callback'
), PostmanMandrillTransport::MANDRILL_AUTH_OPTIONS, PostmanMandrillTransport::MANDRILL_AUTH_SECTION );
@@ -235,13 +235,13 @@ class PostmanMandrillTransport extends PostmanAbstractModuleTransport implements
*/
public function printMandrillAuthSectionInfo() {
/* Translators: Where (1) is the service URL and (2) is the service name and (3) is a api key URL */
- printf ( '<p id="wizard_mandrill_auth_help">%s</p>', sprintf ( __ ( 'Create an account at <a href="%1$s" target="_blank">%2$s</a> and enter <a href="%3$s" target="_blank">an API key</a> below.', Postman::TEXT_DOMAIN ), 'https://mandrillapp.com', 'Mandrillapp.com', 'https://mandrillapp.com/settings' ) );
+ printf ( '<p id="wizard_mandrill_auth_help">%s</p>', sprintf ( __ ( 'Create an account at <a href="%1$s" target="_blank">%2$s</a> and enter <a href="%3$s" target="_blank">an API key</a> below.', 'post-smtp' ), 'https://mandrillapp.com', 'Mandrillapp.com', 'https://mandrillapp.com/settings' ) );
}
/**
*/
public function mandrill_api_key_callback() {
- printf ( '<input type="password" autocomplete="off" id="mandrill_api_key" name="postman_options[mandrill_api_key]" value="%s" size="60" class="required" placeholder="%s"/>', null !== $this->options->getMandrillApiKey () ? esc_attr ( PostmanUtils::obfuscatePassword ( $this->options->getMandrillApiKey () ) ) : '', __ ( 'Required', Postman::TEXT_DOMAIN ) );
+ printf ( '<input type="password" autocomplete="off" id="mandrill_api_key" name="postman_options[mandrill_api_key]" value="%s" size="60" class="required" placeholder="%s"/>', null !== $this->options->getMandrillApiKey () ? esc_attr ( PostmanUtils::obfuscatePassword ( $this->options->getMandrillApiKey () ) ) : '', __ ( 'Required', 'post-smtp' ) );
print ' <input type="button" id="toggleMandrillApiKey" value="Show Password" class="button button-secondary" style="visibility:hidden" />';
}
@@ -268,7 +268,7 @@ class PostmanMandrillTransport extends PostmanAbstractModuleTransport implements
public function printWizardAuthenticationStep() {
print '<section class="wizard_mandrill">';
$this->printMandrillAuthSectionInfo ();
- printf ( '<label for="api_key">%s</label>', __ ( 'API Key', Postman::TEXT_DOMAIN ) );
+ printf ( '<label for="api_key">%s</label>', __ ( 'API Key', 'post-smtp' ) );
print '<br />';
print $this->mandrill_api_key_callback ();
print '</section>';
diff --git a/Postman/Postman-Mail/PostmanMessage.php b/Postman/Postman-Mail/PostmanMessage.php
index 2af67ef..3398cb9 100644
--- a/Postman/Postman-Mail/PostmanMessage.php
+++ b/Postman/Postman-Mail/PostmanMessage.php
@@ -52,7 +52,7 @@ if ( ! class_exists( 'PostmanMessage' ) ) {
}
function __get( $name ) {
- $message = __( '<code>%1$s</code> property of a <code>PostmanMessage</code> object is <strong>not supported</strong>. For now all of this class properties are private.', Postman::TEXT_DOMAIN );
+ $message = __( '<code>%1$s</code> property of a <code>PostmanMessage</code> object is <strong>not supported</strong>. For now all of this class properties are private.', 'post-smtp' );
if ( WP_DEBUG ) {
trigger_error( sprintf( $message, $name ) );
@@ -63,7 +63,7 @@ if ( ! class_exists( 'PostmanMessage' ) ) {
$class = new ReflectionClass(__CLASS__);
$methods = $class->getMethods(ReflectionMethod::IS_PUBLIC );
- $message = __( '<code>%1$s</code> method of a <code>PostmanMessage</code> object is <strong>not supported</strong>. Use one of the following methods <pre><code>%2$s</code></pre>', Postman::TEXT_DOMAIN );
+ $message = __( '<code>%1$s</code> method of a <code>PostmanMessage</code> object is <strong>not supported</strong>. Use one of the following methods <pre><code>%2$s</code></pre>', 'post-smtp' );
if ( WP_DEBUG ) {
trigger_error( sprintf( $message, $name, print_r( $methods, true ) ) );
diff --git a/Postman/Postman-Mail/PostmanModuleTransport.php b/Postman/Postman-Mail/PostmanModuleTransport.php
index 21c1624..8c4647b 100644
--- a/Postman/Postman-Mail/PostmanModuleTransport.php
+++ b/Postman/Postman-Mail/PostmanModuleTransport.php
@@ -503,7 +503,7 @@ abstract class PostmanAbstractZendModuleTransport extends PostmanAbstractModuleT
$deliveryDetails ['host'] = $this->getHostname () . ':' . $this->getPort ();
$deliveryDetails ['auth_desc'] = $this->getAuthenticationDescription ( $this->getAuthenticationType () );
/* translators: where (1) is the transport type, (2) is the host, and (3) is the Authentication Type (e.g. Postman will send mail via smtp.gmail.com:465 using OAuth 2.0 authentication.) */
- return sprintf ( __ ( 'Postman will send mail via %1$s to %2$s using %3$s authentication.', Postman::TEXT_DOMAIN ), '<b>' . $deliveryDetails ['transport_name'] . '</b>', '<b>' . $deliveryDetails ['host'] . '</b>', '<b>' . $deliveryDetails ['auth_desc'] . '</b>' );
+ return sprintf ( __ ( 'Postman will send mail via %1$s to %2$s using %3$s authentication.', 'post-smtp' ), '<b>' . $deliveryDetails ['transport_name'] . '</b>', '<b>' . $deliveryDetails ['host'] . '</b>', '<b>' . $deliveryDetails ['auth_desc'] . '</b>' );
}
/**
@@ -531,7 +531,7 @@ abstract class PostmanAbstractZendModuleTransport extends PostmanAbstractModuleT
if (PostmanOptions::AUTHENTICATION_TYPE_OAUTH2 == $authType) {
return 'OAuth 2.0';
} else if (PostmanOptions::AUTHENTICATION_TYPE_NONE == $authType) {
- return _x ( 'no', 'as in "There is no Spoon"', Postman::TEXT_DOMAIN );
+ return _x ( 'no', 'as in "There is no Spoon"', 'post-smtp' );
} else {
switch ($authType) {
case PostmanOptions::AUTHENTICATION_TYPE_CRAMMD5 :
@@ -550,7 +550,7 @@ abstract class PostmanAbstractZendModuleTransport extends PostmanAbstractModuleT
$authDescription = $authType;
break;
}
- return sprintf ( '%s (%s)', __ ( 'Password', Postman::TEXT_DOMAIN ), $authDescription );
+ return sprintf ( '%s (%s)', __ ( 'Password', 'post-smtp' ), $authDescription );
}
}
@@ -575,13 +575,13 @@ abstract class PostmanAbstractZendModuleTransport extends PostmanAbstractModuleT
parent::validateTransportConfiguration ();
$messages = parent::validateTransportConfiguration ();
if (! $this->isSenderConfigured ()) {
- array_push ( $messages, __ ( 'Message From Address can not be empty', Postman::TEXT_DOMAIN ) . '.' );
+ array_push ( $messages, __ ( 'Message From Address can not be empty', 'post-smtp' ) . '.' );
$this->setNotConfiguredAndReady ();
}
if ($this->getAuthenticationType () == PostmanOptions::AUTHENTICATION_TYPE_OAUTH2) {
if (! $this->isOAuth2ClientIdAndClientSecretConfigured ()) {
/* translators: %1$s is the Client ID label, and %2$s is the Client Secret label (e.g. Warning: OAuth 2.0 authentication requires an OAuth 2.0-capable Outgoing Mail Server, Sender Email Address, Client ID, and Client Secret.) */
- array_push ( $messages, sprintf ( __ ( 'OAuth 2.0 authentication requires a %1$s and %2$s.', Postman::TEXT_DOMAIN ), $this->getScribe ()->getClientIdLabel (), $this->getScribe ()->getClientSecretLabel () ) );
+ array_push ( $messages, sprintf ( __ ( 'OAuth 2.0 authentication requires a %1$s and %2$s.', 'post-smtp' ), $this->getScribe ()->getClientIdLabel (), $this->getScribe ()->getClientSecretLabel () ) );
$this->setNotConfiguredAndReady ();
}
}
@@ -703,21 +703,21 @@ abstract class PostmanAbstractZendModuleTransport extends PostmanAbstractModuleT
if ($socket->auth_crammd5 || $socket->auth_login || $socket->authPlain) {
array_push ( $overrideAuthItems, array (
'selected' => $passwordMode,
- 'name' => __ ( 'Password (requires username and password)', Postman::TEXT_DOMAIN ),
+ 'name' => __ ( 'Password (requires username and password)', 'post-smtp' ),
'value' => 'password'
) );
}
if ($socket->auth_xoauth || $winningRecommendation ['auth'] == 'oauth2') {
array_push ( $overrideAuthItems, array (
'selected' => $oauth2Mode,
- 'name' => __ ( 'OAuth 2.0 (requires Client ID and Client Secret)', Postman::TEXT_DOMAIN ),
+ 'name' => __ ( 'OAuth 2.0 (requires Client ID and Client Secret)', 'post-smtp' ),
'value' => 'oauth2'
) );
}
if ($socket->auth_none) {
array_push ( $overrideAuthItems, array (
'selected' => $noAuthMode,
- 'name' => __ ( 'None', Postman::TEXT_DOMAIN ),
+ 'name' => __ ( 'None', 'post-smtp' ),
'value' => 'none'
) );
}
diff --git a/Postman/Postman-Mail/PostmanMyMailConnector.php b/Postman/Postman-Mail/PostmanMyMailConnector.php
index e08aa02..d37f97e 100644
--- a/Postman/Postman-Mail/PostmanMyMailConnector.php
+++ b/Postman/Postman-Mail/PostmanMyMailConnector.php
@@ -172,7 +172,7 @@ if ( ! class_exists( 'PostmanMyMailConnector' ) ) {
* @return void
*/
public function delivery_method( $delivery_methods ) {
- $delivery_methods [ MAILSTER_POSTMAN_ID ] = __( 'Postman SMTP', Postman::TEXT_DOMAIN );
+ $delivery_methods [ MAILSTER_POSTMAN_ID ] = __( 'Postman SMTP', 'post-smtp' );
return $delivery_methods;
}
@@ -196,7 +196,7 @@ if ( ! class_exists( 'PostmanMyMailConnector' ) ) {
*/
public function activate() {
if ( defined( 'MAILSTER_VERSION' ) && version_compare( MAILSTER_POSTMAN_REQUIRED_VERSION, MAILSTER_VERSION, '<=' ) ) {
- mailster_notice( sprintf( __( 'MyMail: Change the delivery method in the %s!', Postman::TEXT_DOMAIN ), sprintf( '<a href="edit.php?post_type=newsletter&page=mailster_settings&mailster_remove_notice=mailster_delivery_method#delivery">%s</a>', __( 'Settings', 'postman-smtp' ) ) ), '', false, 'delivery_method' );
+ mailster_notice( sprintf( __( 'MyMail: Change the delivery method in the %s!', 'post-smtp' ), sprintf( '<a href="edit.php?post_type=newsletter&page=mailster_settings&mailster_remove_notice=mailster_delivery_method#delivery">%s</a>', __( 'Settings', 'postman-smtp' ) ) ), '', false, 'delivery_method' );
$this->reset();
}
}
@@ -212,7 +212,7 @@ if ( ! class_exists( 'PostmanMyMailConnector' ) ) {
if ( mailster_option( 'deliverymethod' ) == MAILSTER_POSTMAN_ID ) {
mailster_update_option( 'deliverymethod', 'simple' );
/* Translators where %s is the name of the page */
- mailster_notice( sprintf( __( 'MyMail: Change the delivery method in the %s!', Postman::TEXT_DOMAIN ), sprintf( '<a href="edit.php?post_type=newsletter&page=mailster_settings&mailster_remove_notice=mailster_delivery_method#delivery">%s</a>', __( 'Settings', 'postman-smtp' ) ) ), '', false, 'delivery_method' );
+ mailster_notice( sprintf( __( 'MyMail: Change the delivery method in the %s!', 'post-smtp' ), sprintf( '<a href="edit.php?post_type=newsletter&page=mailster_settings&mailster_remove_notice=mailster_delivery_method#delivery">%s</a>', __( 'Settings', 'postman-smtp' ) ) ), '', false, 'delivery_method' );
}
}
}
diff --git a/Postman/Postman-Mail/PostmanSendGridMailEngine.php b/Postman/Postman-Mail/PostmanSendGridMailEngine.php
index 32cfb9e..61527c3 100644
--- a/Postman/Postman-Mail/PostmanSendGridMailEngine.php
+++ b/Postman/Postman-Mail/PostmanSendGridMailEngine.php
@@ -219,22 +219,22 @@ if ( ! class_exists( 'PostmanSendGridMailEngine' ) ) {
private function errorCodesMap($error_code) {
switch ($error_code) {
case 413:
- $message = sprintf( __( 'ERROR: The JSON payload you have included in your request is too large. Status code is %1$s', Postman::TEXT_DOMAIN ), $error_code );
+ $message = sprintf( __( 'ERROR: The JSON payload you have included in your request is too large. Status code is %1$s', 'post-smtp' ), $error_code );
break;
case 429:
- $message = sprintf( __( 'ERROR: The number of requests you have made exceeds SendGrid rate limitations. Status code is %1$s', Postman::TEXT_DOMAIN ), $error_code );
+ $message = sprintf( __( 'ERROR: The number of requests you have made exceeds SendGrid rate limitations. Status code is %1$s', 'post-smtp' ), $error_code );
break;
case 500:
- $message = sprintf( __( 'ERROR: An error occurred on a SendGrid server. Status code is %1$s', Postman::TEXT_DOMAIN ), $error_code );
+ $message = sprintf( __( 'ERROR: An error occurred on a SendGrid server. Status code is %1$s', 'post-smtp' ), $error_code );
break;
case 513:
- $message = sprintf( __( 'ERROR: The SendGrid v3 Web API is not available. Status code is %1$s', Postman::TEXT_DOMAIN ), $error_code );
+ $message = sprintf( __( 'ERROR: The SendGrid v3 Web API is not available. Status code is %1$s', 'post-smtp' ), $error_code );
break;
case 502:
- $message = sprintf( __( 'ERROR: No recipient supplied. Status code is %1$s', Postman::TEXT_DOMAIN ), $error_code );
+ $message = sprintf( __( 'ERROR: No recipient supplied. Status code is %1$s', 'post-smtp' ), $error_code );
break;
default:
- $message = sprintf( __( 'ERROR: Status code is %1$s', Postman::TEXT_DOMAIN ), $error_code );
+ $message = sprintf( __( 'ERROR: Status code is %1$s', 'post-smtp' ), $error_code );
}
return $message;
diff --git a/Postman/Postman-Mail/PostmanSendGridTransport.php b/Postman/Postman-Mail/PostmanSendGridTransport.php
index 358fcc5..8a40f47 100644
--- a/Postman/Postman-Mail/PostmanSendGridTransport.php
+++ b/Postman/Postman-Mail/PostmanSendGridTransport.php
@@ -36,7 +36,7 @@ class PostmanSendGridTransport extends PostmanAbstractModuleTransport implements
return self::SLUG;
}
public function getName() {
- return __ ( 'SendGrid API', Postman::TEXT_DOMAIN );
+ return __ ( 'SendGrid API', 'post-smtp' );
}
/**
* v0.2.1
@@ -76,7 +76,7 @@ class PostmanSendGridTransport extends PostmanAbstractModuleTransport implements
}
public function getDeliveryDetails() {
/* translators: where (1) is the secure icon and (2) is the transport name */
- return sprintf ( __ ( 'Postman will send mail via the <b>%1$s %2$s</b>.', Postman::TEXT_DOMAIN ), '🔐', $this->getName () );
+ return sprintf ( __ ( 'Postman will send mail via the <b>%1$s %2$s</b>.', 'post-smtp' ), '🔐', $this->getName () );
}
/**
@@ -98,11 +98,11 @@ class PostmanSendGridTransport extends PostmanAbstractModuleTransport implements
$messages = parent::validateTransportConfiguration ();
$apiKey = $this->options->getSendGridApiKey ();
if (empty ( $apiKey )) {
- array_push ( $messages, __ ( 'API Key can not be empty', Postman::TEXT_DOMAIN ) . '.' );
+ array_push ( $messages, __ ( 'API Key can not be empty', 'post-smtp' ) . '.' );
$this->setNotConfiguredAndReady ();
}
if (! $this->isSenderConfigured ()) {
- array_push ( $messages, __ ( 'Message From Address can not be empty', Postman::TEXT_DOMAIN ) . '.' );
+ array_push ( $messages, __ ( 'Message From Address can not be empty', 'post-smtp' ) . '.' );
$this->setNotConfiguredAndReady ();
}
return $messages;
@@ -145,7 +145,7 @@ class PostmanSendGridTransport extends PostmanAbstractModuleTransport implements
$overrideItem ['auth_items'] = array (
array (
'selected' => true,
- 'name' => __ ( 'API Key', Postman::TEXT_DOMAIN ),
+ 'name' => __ ( 'API Key', 'post-smtp' ),
'value' => 'api_key'
)
);
@@ -174,25 +174,25 @@ class PostmanSendGridTransport extends PostmanAbstractModuleTransport implements
*/
public function addSettings() {
// the SendGrid Auth section
- add_settings_section ( PostmanSendGridTransport::SENDGRID_AUTH_SECTION, __ ( 'Authentication', Postman::TEXT_DOMAIN ), array (
+ add_settings_section ( PostmanSendGridTransport::SENDGRID_AUTH_SECTION, __ ( 'Authentication', 'post-smtp' ), array (
$this,
'printSendGridAuthSectionInfo'
), PostmanSendGridTransport::SENDGRID_AUTH_OPTIONS );
- add_settings_field ( PostmanOptions::SENDGRID_API_KEY, __ ( 'API Key', Postman::TEXT_DOMAIN ), array (
+ add_settings_field ( PostmanOptions::SENDGRID_API_KEY, __ ( 'API Key', 'post-smtp' ), array (
$this,
'sendgrid_api_key_callback'
), PostmanSendGridTransport::SENDGRID_AUTH_OPTIONS, PostmanSendGridTransport::SENDGRID_AUTH_SECTION );
}
public function printSendGridAuthSectionInfo() {
/* Translators: Where (1) is the service URL and (2) is the service name and (3) is a api key URL */
- printf ( '<p id="wizard_sendgrid_auth_help">%s</p>', sprintf ( __ ( 'Create an account at <a href="%1$s" target="_blank">%2$s</a> and enter <a href="%3$s" target="_blank">an API key</a> below.', Postman::TEXT_DOMAIN ), 'https://sendgrid.com', 'SendGrid.com', 'https://app.sendgrid.com/settings/api_keys' ) );
+ printf ( '<p id="wizard_sendgrid_auth_help">%s</p>', sprintf ( __ ( 'Create an account at <a href="%1$s" target="_blank">%2$s</a> and enter <a href="%3$s" target="_blank">an API key</a> below.', 'post-smtp' ), 'https://sendgrid.com', 'SendGrid.com', 'https://app.sendgrid.com/settings/api_keys' ) );
}
/**
*/
public function sendgrid_api_key_callback() {
- printf ( '<input type="password" autocomplete="off" id="sendgrid_api_key" name="postman_options[sendgrid_api_key]" value="%s" size="60" class="required" placeholder="%s"/>', null !== $this->options->getSendGridApiKey () ? esc_attr ( PostmanUtils::obfuscatePassword ( $this->options->getSendGridApiKey () ) ) : '', __ ( 'Required', Postman::TEXT_DOMAIN ) );
+ printf ( '<input type="password" autocomplete="off" id="sendgrid_api_key" name="postman_options[sendgrid_api_key]" value="%s" size="60" class="required" placeholder="%s"/>', null !== $this->options->getSendGridApiKey () ? esc_attr ( PostmanUtils::obfuscatePassword ( $this->options->getSendGridApiKey () ) ) : '', __ ( 'Required', 'post-smtp' ) );
print ' <input type="button" id="toggleSendGridApiKey" value="Show Password" class="button button-secondary" style="visibility:hidden" />';
}
@@ -219,7 +219,7 @@ class PostmanSendGridTransport extends PostmanAbstractModuleTransport implements
public function printWizardAuthenticationStep() {
print '<section class="wizard_sendgrid">';
$this->printSendGridAuthSectionInfo ();
- printf ( '<label for="api_key">%s</label>', __ ( 'API Key', Postman::TEXT_DOMAIN ) );
+ printf ( '<label for="api_key">%s</label>', __ ( 'API Key', 'post-smtp' ) );
print '<br />';
print $this->sendgrid_api_key_callback ();
print '</section>';
diff --git a/Postman/Postman-Mail/PostmanSmtpModuleTransport.php b/Postman/Postman-Mail/PostmanSmtpModuleTransport.php
index 3bd1ad2..b1f358d 100644
--- a/Postman/Postman-Mail/PostmanSmtpModuleTransport.php
+++ b/Postman/Postman-Mail/PostmanSmtpModuleTransport.php
@@ -91,21 +91,21 @@ class PostmanSmtpModuleTransport extends PostmanAbstractZendModuleTransport impl
protected function validateTransportConfiguration() {
$messages = parent::validateTransportConfiguration();
if ( ! $this->isHostConfigured( $this->options ) ) {
- array_push( $messages, __( 'Outgoing Mail Server Hostname and Port can not be empty.', Postman::TEXT_DOMAIN ) );
+ array_push( $messages, __( 'Outgoing Mail Server Hostname and Port can not be empty.', 'post-smtp' ) );
$this->setNotConfiguredAndReady();
}
if ( ! $this->isEnvelopeFromConfigured() ) {
- array_push( $messages, __( 'Envelope-From Email Address can not be empty', Postman::TEXT_DOMAIN ) . '.' );
+ array_push( $messages, __( 'Envelope-From Email Address can not be empty', 'post-smtp' ) . '.' );
$this->setNotConfiguredAndReady();
}
if ( $this->options->isAuthTypePassword() && ! $this->isPasswordAuthenticationConfigured( $this->options ) ) {
- array_push( $messages, __( 'Username and password can not be empty.', Postman::TEXT_DOMAIN ) );
+ array_push( $messages, __( 'Username and password can not be empty.', 'post-smtp' ) );
$this->setNotConfiguredAndReady();
}
if ( $this->getAuthenticationType() == PostmanOptions::AUTHENTICATION_TYPE_OAUTH2 ) {
if ( ! $this->isOAuth2SupportedHostConfigured() ) {
/* translators: %1$s is the Client ID label, and %2$s is the Client Secret label (e.g. Warning: OAuth 2.0 authentication requires an OAuth 2.0-capable Outgoing Mail Server, Sender Email Address, Client ID, and Client Secret.) */
- array_push( $messages, sprintf( __( 'OAuth 2.0 authentication requires a supported OAuth 2.0-capable Outgoing Mail Server.', Postman::TEXT_DOMAIN ) ) );
+ array_push( $messages, sprintf( __( 'OAuth 2.0 authentication requires a supported OAuth 2.0-capable Outgoing Mail Server.', 'post-smtp' ) ) );
$this->setNotConfiguredAndReady();
}
}
@@ -113,7 +113,7 @@ class PostmanSmtpModuleTransport extends PostmanAbstractZendModuleTransport impl
$this->setReadyForOAuthGrant();
if ( $this->isPermissionNeeded( $this->options, $this->getOAuthToken() ) ) {
/* translators: %1$s is the Client ID label, and %2$s is the Client Secret label */
- $message = sprintf( __( 'You have configured OAuth 2.0 authentication, but have not received permission to use it.', Postman::TEXT_DOMAIN ), $this->getScribe()->getClientIdLabel(), $this->getScribe()->getClientSecretLabel() );
+ $message = sprintf( __( 'You have configured OAuth 2.0 authentication, but have not received permission to use it.', 'post-smtp' ), $this->getScribe()->getClientIdLabel(), $this->getScribe()->getClientSecretLabel() );
$message .= sprintf( ' <a href="%s">%s</a>.', PostmanUtils::getGrantOAuthPermissionUrl(), $this->getScribe()->getRequestPermissionLinkText() );
array_push( $messages, $message );
$this->setNotConfiguredAndReady();
@@ -265,7 +265,7 @@ class PostmanSmtpModuleTransport extends PostmanAbstractZendModuleTransport impl
$authDesc = $this->getAuthenticationDescription( $recommendation ['auth'] );
$recommendation ['label'] = sprintf( 'SMTP - %2$s:%3$d', $transportDescription, $hostData->hostnameDomainOnly, $port );
/* translators: where %1$s is a description of the transport (eg. SMTPS-SSL), %2$s is a description of the authentication (eg. Password-CRAMMD5), %3$d is the TCP port (eg. 465), %4$d is the hostname */
- $recommendation ['message'] = sprintf( __( 'Postman recommends %1$s with %2$s authentication to host %4$s on port %3$d.', Postman::TEXT_DOMAIN ), $transportDescription, $authDesc, $port, $hostname );
+ $recommendation ['message'] = sprintf( __( 'Postman recommends %1$s with %2$s authentication to host %4$s on port %3$d.', 'post-smtp' ), $transportDescription, $authDesc, $port, $hostname );
}
// fill-in the rest of the recommendation
@@ -322,53 +322,53 @@ class PostmanSmtpModuleTransport extends PostmanAbstractZendModuleTransport impl
$oauthScribe = $transport->getScribe();
// Sanitize
- add_settings_section( PostmanAdminController::SMTP_SECTION, __( 'Transport Settings', Postman::TEXT_DOMAIN ), array(
+ add_settings_section( PostmanAdminController::SMTP_SECTION, __( 'Transport Settings', 'post-smtp' ), array(
$this,
'printSmtpSectionInfo',
), PostmanAdminController::SMTP_OPTIONS );
- add_settings_field( PostmanOptions::HOSTNAME, __( 'Outgoing Mail Server Hostname', Postman::TEXT_DOMAIN ), array(
+ add_settings_field( PostmanOptions::HOSTNAME, __( 'Outgoing Mail Server Hostname', 'post-smtp' ), array(
$this,
'hostname_callback',
), PostmanAdminController::SMTP_OPTIONS, PostmanAdminController::SMTP_SECTION );
- add_settings_field( PostmanOptions::PORT, __( 'Outgoing Mail Server Port', Postman::TEXT_DOMAIN ), array(
+ add_settings_field( PostmanOptions::PORT, __( 'Outgoing Mail Server Port', 'post-smtp' ), array(
$this,
'port_callback',
), PostmanAdminController::SMTP_OPTIONS, PostmanAdminController::SMTP_SECTION );
- add_settings_field( PostmanOptions::ENVELOPE_SENDER, __( 'Envelope-From Email Address', Postman::TEXT_DOMAIN ), array(
+ add_settings_field( PostmanOptions::ENVELOPE_SENDER, __( 'Envelope-From Email Address', 'post-smtp' ), array(
$this,
'sender_email_callback',
), PostmanAdminController::SMTP_OPTIONS, PostmanAdminController::SMTP_SECTION );
- add_settings_field( PostmanOptions::SECURITY_TYPE, _x( 'Security', 'Configuration Input Field', Postman::TEXT_DOMAIN ), array(
+ add_settings_field( PostmanOptions::SECURITY_TYPE, _x( 'Security', 'Configuration Input Field', 'post-smtp' ), array(
$this,
'encryption_type_callback',
), PostmanAdminController::SMTP_OPTIONS, PostmanAdminController::SMTP_SECTION );
- add_settings_field( PostmanOptions::AUTHENTICATION_TYPE, __( 'Authentication', Postman::TEXT_DOMAIN ), array(
+ add_settings_field( PostmanOptions::AUTHENTICATION_TYPE, __( 'Authentication', 'post-smtp' ), array(
$this,
'authentication_type_callback',
), PostmanAdminController::SMTP_OPTIONS, PostmanAdminController::SMTP_SECTION );
- add_settings_section( PostmanAdminController::BASIC_AUTH_SECTION, __( 'Authentication', Postman::TEXT_DOMAIN ), array(
+ add_settings_section( PostmanAdminController::BASIC_AUTH_SECTION, __( 'Authentication', 'post-smtp' ), array(
$this,
'printBasicAuthSectionInfo',
), PostmanAdminController::BASIC_AUTH_OPTIONS );
- add_settings_field( PostmanOptions::BASIC_AUTH_USERNAME, __( 'Username', Postman::TEXT_DOMAIN ), array(
+ add_settings_field( PostmanOptions::BASIC_AUTH_USERNAME, __( 'Username', 'post-smtp' ), array(
$this,
'basic_auth_username_callback',
), PostmanAdminController::BASIC_AUTH_OPTIONS, PostmanAdminController::BASIC_AUTH_SECTION );
- add_settings_field( PostmanOptions::BASIC_AUTH_PASSWORD, __( 'Password', Postman::TEXT_DOMAIN ), array(
+ add_settings_field( PostmanOptions::BASIC_AUTH_PASSWORD, __( 'Password', 'post-smtp' ), array(
$this,
'basic_auth_password_callback',
), PostmanAdminController::BASIC_AUTH_OPTIONS, PostmanAdminController::BASIC_AUTH_SECTION );
// the OAuth section
- add_settings_section( PostmanAdminController::OAUTH_SECTION, __( 'Authentication', Postman::TEXT_DOMAIN ), array(
+ add_settings_section( PostmanAdminController::OAUTH_SECTION, __( 'Authentication', 'post-smtp' ), array(
$this,
'printOAuthSectionInfo',
), PostmanAdminController::OAUTH_AUTH_OPTIONS );
@@ -398,21 +398,21 @@ class PostmanSmtpModuleTransport extends PostmanAbstractZendModuleTransport impl
* Print the Section text
*/
public function printSmtpSectionInfo() {
- print __( 'Configure the communication with the mail server.', Postman::TEXT_DOMAIN );
+ print __( 'Configure the communication with the mail server.', 'post-smtp' );
}
/**
* Get the settings option array and print one of its values
*/
public function hostname_callback() {
- printf( '<input type="text" id="input_hostname" name="postman_options[hostname]" value="%s" size="40" class="required" placeholder="%s"/>', null !== $this->options->getHostname() ? esc_attr( $this->options->getHostname() ) : '', __( 'Required', Postman::TEXT_DOMAIN ) );
+ printf( '<input type="text" id="input_hostname" name="postman_options[hostname]" value="%s" size="40" class="required" placeholder="%s"/>', null !== $this->options->getHostname() ? esc_attr( $this->options->getHostname() ) : '', __( 'Required', 'post-smtp' ) );
}
/**
* Get the settings option array and print one of its values
*/
public function port_callback( $args ) {
- printf( '<input type="text" id="input_port" name="postman_options[port]" value="%s" %s placeholder="%s"/>', null !== $this->options->getPort() ? esc_attr( $this->options->getPort() ) : '', isset( $args ['style'] ) ? $args ['style'] : '', __( 'Required', Postman::TEXT_DOMAIN ) );
+ printf( '<input type="text" id="input_port" name="postman_options[port]" value="%s" %s placeholder="%s"/>', null !== $this->options->getPort() ? esc_attr( $this->options->getPort() ) : '', isset( $args ['style'] ) ? $args ['style'] : '', __( 'Required', 'post-smtp' ) );
}
/**
@@ -421,7 +421,7 @@ class PostmanSmtpModuleTransport extends PostmanAbstractZendModuleTransport impl
public function encryption_type_callback() {
$encType = $this->options->getEncryptionType();
print '<select id="input_enc_type" class="input_encryption_type" name="postman_options[enc_type]">';
- printf( '<option class="input_enc_type_none" value="%s" %s>%s</option>', PostmanOptions::SECURITY_TYPE_NONE, $encType == PostmanOptions::SECURITY_TYPE_NONE ? 'selected="selected"' : '', __( 'None', Postman::TEXT_DOMAIN ) );
+ printf( '<option class="input_enc_type_none" value="%s" %s>%s</option>', PostmanOptions::SECURITY_TYPE_NONE, $encType == PostmanOptions::SECURITY_TYPE_NONE ? 'selected="selected"' : '', __( 'None', 'post-smtp' ) );
printf( '<option class="input_enc_type_ssl" value="%s" %s>%s</option>', PostmanOptions::SECURITY_TYPE_SMTPS, $encType == PostmanOptions::SECURITY_TYPE_SMTPS ? 'selected="selected"' : '', 'SMTPS' );
printf( '<option class="input_enc_type_tls" value="%s" %s>%s</option>', PostmanOptions::SECURITY_TYPE_STARTTLS, $encType == PostmanOptions::SECURITY_TYPE_STARTTLS ? 'selected="selected"' : '', 'STARTTLS' );
print '</select>';
@@ -445,7 +445,7 @@ class PostmanSmtpModuleTransport extends PostmanAbstractZendModuleTransport impl
* Print the Section text
*/
public function printBasicAuthSectionInfo() {
- print __( 'Enter the account credentials.', Postman::TEXT_DOMAIN );
+ print __( 'Enter the account credentials.', 'post-smtp' );
}
/**
@@ -453,9 +453,9 @@ class PostmanSmtpModuleTransport extends PostmanAbstractZendModuleTransport impl
*/
public function basic_auth_username_callback() {
$inputValue = (null !== $this->options->getUsername() ? esc_attr( $this->options->getUsername() ) : '');
- $inputDescription = __( 'The Username is usually the same as the Envelope-From Email Address.', Postman::TEXT_DOMAIN );
+ $inputDescription = __( 'The Username is usually the same as the Envelope-From Email Address.', 'post-smtp' );
print ('<input tabindex="99" id="fake_user_name" name="fake_user[name]" style="position:absolute; top:-500px;" type="text" value="Safari Autofill Me">') ;
- printf( '<input type="text" id="input_basic_auth_username" name="postman_options[basic_auth_username]" value="%s" size="40" class="required" placeholder="%s"/><br/><span class="postman_input_description">%s</span>', $inputValue, __( 'Required', Postman::TEXT_DOMAIN ), $inputDescription );
+ printf( '<input type="text" id="input_basic_auth_username" name="postman_options[basic_auth_username]" value="%s" size="40" class="required" placeholder="%s"/><br/><span class="postman_input_description">%s</span>', $inputValue, __( 'Required', 'post-smtp' ), $inputDescription );
}
/**
@@ -463,7 +463,7 @@ class PostmanSmtpModuleTransport extends PostmanAbstractZendModuleTransport impl
*/
public function basic_auth_password_callback() {
print ('<input tabindex="99" id="fake_password" name="fake[password]" style="position:absolute; top:-500px;" type="password" value="Safari Autofill Me">') ;
- printf( '<input type="password" id="input_basic_auth_password" name="postman_options[basic_auth_password]" value="%s" size="40" class="required" placeholder="%s"/>', null !== $this->options->getPassword() ? esc_attr( PostmanUtils::obfuscatePassword( $this->options->getPassword() ) ) : '', __( 'Required', Postman::TEXT_DOMAIN ) );
+ printf( '<input type="password" id="input_basic_auth_password" name="postman_options[basic_auth_password]" value="%s" size="40" class="required" placeholder="%s"/>', null !== $this->options->getPassword() ? esc_attr( PostmanUtils::obfuscatePassword( $this->options->getPassword() ) ) : '', __( 'Required', 'post-smtp' ) );
print ' <input type="button" id="togglePasswordField" value="Show Password" class="button button-secondary" style="visibility:hidden" />';
}
@@ -471,14 +471,14 @@ class PostmanSmtpModuleTransport extends PostmanAbstractZendModuleTransport impl
* Get the settings option array and print one of its values
*/
public function oauth_client_id_callback() {
- printf( '<input type="text" onClick="this.setSelectionRange(0, this.value.length)" id="oauth_client_id" name="postman_options[oauth_client_id]" value="%s" size="60" class="required" placeholder="%s"/>', null !== $this->options->getClientId() ? esc_attr( $this->options->getClientId() ) : '', __( 'Required', Postman::TEXT_DOMAIN ) );
+ printf( '<input type="text" onClick="this.setSelectionRange(0, this.value.length)" id="oauth_client_id" name="postman_options[oauth_client_id]" value="%s" size="60" class="required" placeholder="%s"/>', null !== $this->options->getClientId() ? esc_attr( $this->options->getClientId() ) : '', __( 'Required', 'post-smtp' ) );
}
/**
* Get the settings option array and print one of its values
*/
public function oauth_client_secret_callback() {
- printf( '<input type="text" onClick="this.setSelectionRange(0, this.value.length)" autocomplete="off" id="oauth_client_secret" name="postman_options[oauth_client_secret]" value="%s" size="60" class="required" placeholder="%s"/>', null !== $this->options->getClientSecret() ? esc_attr( $this->options->getClientSecret() ) : '', __( 'Required', Postman::TEXT_DOMAIN ) );
+ printf( '<input type="text" onClick="this.setSelectionRange(0, this.value.length)" autocomplete="off" id="oauth_client_secret" name="postman_options[oauth_client_secret]" value="%s" size="60" class="required" placeholder="%s"/>', null !== $this->options->getClientSecret() ? esc_attr( $this->options->getClientSecret() ) : '', __( 'Required', 'post-smtp' ) );
}
/**
@@ -507,7 +507,7 @@ class PostmanSmtpModuleTransport extends PostmanAbstractZendModuleTransport impl
$oauthScribe = $transport->getScribe();
return $oauthScribe->getCallbackDomain();
} catch ( Exception $e ) {
- return __( 'Error computing your domain root - please enter it manually', Postman::TEXT_DOMAIN );
+ return __( 'Error computing your domain root - please enter it manually', 'post-smtp' );
}
}
@@ -526,28 +526,28 @@ class PostmanSmtpModuleTransport extends PostmanAbstractZendModuleTransport impl
*/
public function sender_email_callback() {
$inputValue = (null !== $this->options->getEnvelopeSender() ? esc_attr( $this->options->getEnvelopeSender() ) : '');
- $requiredLabel = __( 'Required', Postman::TEXT_DOMAIN );
- $envelopeFromMessage = __( 'This address, like the <b>return address</b> printed on an envelope, identifies the account owner to the SMTP server.', Postman::TEXT_DOMAIN );
- $spfMessage = sprintf( __( 'For reliable delivery, this domain must specify an <a target="_blank" href="%s">SPF record</a> permitting the use of the SMTP server named above.', Postman::TEXT_DOMAIN ), 'https://www.mail-tester.com/spf/' );
+ $requiredLabel = __( 'Required', 'post-smtp' );
+ $envelopeFromMessage = __( 'This address, like the <b>return address</b> printed on an envelope, identifies the account owner to the SMTP server.', 'post-smtp' );
+ $spfMessage = sprintf( __( 'For reliable delivery, this domain must specify an <a target="_blank" href="%s">SPF record</a> permitting the use of the SMTP server named above.', 'post-smtp' ), 'https://www.mail-tester.com/spf/' );
printf( '<input type="email" id="input_envelope_sender_email" name="postman_options[envelope_sender]" value="%s" size="40" class="required" placeholder="%s"/> <br/><span class="postman_input_description">%s %s</span>', $inputValue, $requiredLabel, $envelopeFromMessage, $spfMessage );
}
/**
*/
public function printWizardMailServerHostnameStep() {
- printf( '<legend>%s</legend>', _x( 'Which host will relay the mail?', 'Wizard Step Title', Postman::TEXT_DOMAIN ) );
- printf( '<p>%s</p>', __( 'This is the Outgoing (SMTP) Mail Server, or Mail Submission Agent (MSA), which Postman delegates mail delivery to. This server is specific to your email account, and if you don\'t know what to use, ask your email service provider.', Postman::TEXT_DOMAIN ) );
- printf( '<p>%s</p>', __( 'Note that many WordPress hosts, such as GoDaddy, Bluehost and Dreamhost, require that you use their mail accounts with their mail servers, and prevent you from using others.', Postman::TEXT_DOMAIN ) );
- printf( '<label for="hostname">%s</label>', __( 'Outgoing Mail Server Hostname', Postman::TEXT_DOMAIN ) );
+ printf( '<legend>%s</legend>', _x( 'Which host will relay the mail?', 'Wizard Step Title', 'post-smtp' ) );
+ printf( '<p>%s</p>', __( 'This is the Outgoing (SMTP) Mail Server, or Mail Submission Agent (MSA), which Postman delegates mail delivery to. This server is specific to your email account, and if you don\'t know what to use, ask your email service provider.', 'post-smtp' ) );
+ printf( '<p>%s</p>', __( 'Note that many WordPress hosts, such as GoDaddy, Bluehost and Dreamhost, require that you use their mail accounts with their mail servers, and prevent you from using others.', 'post-smtp' ) );
+ printf( '<label for="hostname">%s</label>', __( 'Outgoing Mail Server Hostname', 'post-smtp' ) );
print $this->hostname_callback();
printf( '<p class="ajax-loader" style="display:none"><img src="%s"/></p>', plugins_url( 'post-smtp/style/ajax-loader.gif' ) );
- $warning = __( 'Warning', Postman::TEXT_DOMAIN );
+ $warning = __( 'Warning', 'post-smtp' );
/* Translators: Where (%s) is the name of the web host */
- $nonGodaddyDomainMessage = sprintf( __( 'Your email address <b>requires</b> access to a remote SMTP server blocked by %s.', Postman::TEXT_DOMAIN ), 'GoDaddy' );
- $nonGodaddyDomainMessage .= sprintf( ' %s', __( 'If you have access to cPanel, enable the Remote Mail Exchanger.', Postman::TEXT_DOMAIN ) );
+ $nonGodaddyDomainMessage = sprintf( __( 'Your email address <b>requires</b> access to a remote SMTP server blocked by %s.', 'post-smtp' ), 'GoDaddy' );
+ $nonGodaddyDomainMessage .= sprintf( ' %s', __( 'If you have access to cPanel, enable the Remote Mail Exchanger.', 'post-smtp' ) );
printf( '<p id="godaddy_block"><span style="background-color:yellow"><b>%s</b>: %s</span></p>', $warning, $nonGodaddyDomainMessage );
/* Translators: Where (%1$s) is the SPF-info URL and (%2$s) is the name of the web host */
- $godaddyCustomDomainMessage = sprintf( __( 'If you own this domain, make sure it has an <a href="%1$s">SPF record authorizing %2$s</a> as a relay, or you will have delivery problems.', Postman::TEXT_DOMAIN ), 'http://www.mail-tester.com/spf/godaddy', 'GoDaddy' );
+ $godaddyCustomDomainMessage = sprintf( __( 'If you own this domain, make sure it has an <a href="%1$s">SPF record authorizing %2$s</a> as a relay, or you will have delivery problems.', 'post-smtp' ), 'http://www.mail-tester.com/spf/godaddy', 'GoDaddy' );
printf( '<p id="godaddy_spf_required"><span style="background-color:yellow"><b>%s</b>: %s</span></p>', $warning, $godaddyCustomDomainMessage );
}
@@ -575,12 +575,12 @@ class PostmanSmtpModuleTransport extends PostmanAbstractZendModuleTransport impl
print '</section>';
print '<section class="wizard-auth-basic">';
- printf( '<p class="port-explanation-ssl">%s</p>', __( 'Enter the account credentials.', Postman::TEXT_DOMAIN ) );
- printf( '<label for="username">%s</label>', __( 'Username', Postman::TEXT_DOMAIN ) );
+ printf( '<p class="port-explanation-ssl">%s</p>', __( 'Enter the account credentials.', 'post-smtp' ) );
+ printf( '<label for="username">%s</label>', __( 'Username', 'post-smtp' ) );
print '<br />';
print $this->basic_auth_username_callback();
print '<br />';
- printf( '<label for="password">%s</label>', __( 'Password', Postman::TEXT_DOMAIN ) );
+ printf( '<label for="password">%s</label>', __( 'Password', 'post-smtp' ) );
print '<br />';
print $this->basic_auth_password_callback();
print '</section>';
diff --git a/Postman/Postman-Mail/PostmanTransportRegistry.php b/Postman/Postman-Mail/PostmanTransportRegistry.php
index e86f1f4..ed212ab 100644
--- a/Postman/Postman-Mail/PostmanTransportRegistry.php
+++ b/Postman/Postman-Mail/PostmanTransportRegistry.php
@@ -231,18 +231,18 @@ class PostmanTransportRegistry {
if ( PostmanOptions::getInstance()->getRunMode() != PostmanOptions::RUN_MODE_PRODUCTION ) {
return array(
'error' => true,
- 'message' => __( 'Postman is in <em>non-Production</em> mode and is dumping all emails.', Postman::TEXT_DOMAIN ),
+ 'message' => __( 'Postman is in <em>non-Production</em> mode and is dumping all emails.', 'post-smtp' ),
);
} else {
return array(
'error' => false,
- 'message' => __( 'Postman is configured.', Postman::TEXT_DOMAIN ),
+ 'message' => __( 'Postman is configured.', 'post-smtp' ),
);
}
} else {
return array(
'error' => true,
- 'message' => __( 'Postman is <em>not</em> configured and is mimicking out-of-the-box WordPress email delivery.', Postman::TEXT_DOMAIN ),
+ 'message' => __( 'Postman is <em>not</em> configured and is mimicking out-of-the-box WordPress email delivery.', 'post-smtp' ),
);
}
}
diff --git a/Postman/Postman-Mail/PostmanWooCommerce.php b/Postman/Postman-Mail/PostmanWooCommerce.php
index a6a2e82..feee32e 100644
--- a/Postman/Postman-Mail/PostmanWooCommerce.php
+++ b/Postman/Postman-Mail/PostmanWooCommerce.php
@@ -28,7 +28,7 @@ if ( ! class_exists( 'PostmanWoocommerce' ) ) {
return array(
- array( 'title' => __( 'Email notifications', Postman::TEXT_DOMAIN ), 'desc' => __( 'Email notifications sent from WooCommerce are listed below. Click on an email to configure it.', Postman::TEXT_DOMAIN ), 'type' => 'title', 'id' => 'email_notification_settings' ),
+ array( 'title' => __( 'Email notifications', 'post-smtp' ), 'desc' => __( 'Email notifications sent from WooCommerce are listed below. Click on an email to configure it.', 'post-smtp' ), 'type' => 'title', 'id' => 'email_notification_settings' ),
array( 'type' => 'email_notification' ),
@@ -36,11 +36,11 @@ if ( ! class_exists( 'PostmanWoocommerce' ) ) {
array( 'type' => 'sectionend', 'id' => 'email_recipient_options' ),
- array( 'title' => __( 'Email sender options', Postman::TEXT_DOMAIN ), 'type' => 'title', 'desc' => '', 'id' => 'email_options' ),
+ array( 'title' => __( 'Email sender options', 'post-smtp' ), 'type' => 'title', 'desc' => '', 'id' => 'email_options' ),
array(
- 'title' => __( '"From" name', Postman::TEXT_DOMAIN ),
- 'desc' => __( 'How the sender name appears in outgoing WooCommerce emails.', Postman::TEXT_DOMAIN ),
+ 'title' => __( '"From" name', 'post-smtp' ),
+ 'desc' => __( 'How the sender name appears in outgoing WooCommerce emails.', 'post-smtp' ),
'id' => 'woocommerce_email_from_name',
'type' => 'text',
'css' => 'min-width:300px;',
@@ -50,8 +50,8 @@ if ( ! class_exists( 'PostmanWoocommerce' ) ) {
),
array(
- 'title' => __( '"From" address', Postman::TEXT_DOMAIN ),
- 'desc' => __( 'This is overided by the account configured on Post SMTP plugin configuration.', Postman::TEXT_DOMAIN ),
+ 'title' => __( '"From" address', 'post-smtp' ),
+ 'desc' => __( 'This is overided by the account configured on Post SMTP plugin configuration.', 'post-smtp' ),
'id' => 'woocommerce_email_from_address',
'type' => 'email',
'custom_attributes' => array(
@@ -66,26 +66,26 @@ if ( ! class_exists( 'PostmanWoocommerce' ) ) {
array( 'type' => 'sectionend', 'id' => 'email_options' ),
- array( 'title' => __( 'Email template', Postman::TEXT_DOMAIN ), 'type' => 'title', 'desc' => sprintf( __( 'This section lets you customize the WooCommerce emails. <a href="%s" target="_blank">Click here to preview your email template</a>.', Postman::TEXT_DOMAIN ), wp_nonce_url( admin_url( '?preview_woocommerce_mail=true' ), 'preview-mail' ) ), 'id' => 'email_template_options' ),
+ array( 'title' => __( 'Email template', 'post-smtp' ), 'type' => 'title', 'desc' => sprintf( __( 'This section lets you customize the WooCommerce emails. <a href="%s" target="_blank">Click here to preview your email template</a>.', 'post-smtp' ), wp_nonce_url( admin_url( '?preview_woocommerce_mail=true' ), 'preview-mail' ) ), 'id' => 'email_template_options' ),
array(
- 'title' => __( 'Header image', Postman::TEXT_DOMAIN ),
- 'desc' => __( 'URL to an image you want to show in the email header. Upload images using the media uploader (Admin > Media).', Postman::TEXT_DOMAIN ),
+ 'title' => __( 'Header image', 'post-smtp' ),
+ 'desc' => __( 'URL to an image you want to show in the email header. Upload images using the media uploader (Admin > Media).', 'post-smtp' ),
'id' => 'woocommerce_email_header_image',
'type' => 'text',
'css' => 'min-width:300px;',
- 'placeholder' => __( 'N/A', Postman::TEXT_DOMAIN ),
+ 'placeholder' => __( 'N/A', 'post-smtp' ),
'default' => '',
'autoload' => false,
'desc_tip' => true,
),
array(
- 'title' => __( 'Footer text', Postman::TEXT_DOMAIN ),
- 'desc' => __( 'The text to appear in the footer of WooCommerce emails.', Postman::TEXT_DOMAIN ),
+ 'title' => __( 'Footer text', 'post-smtp' ),
+ 'desc' => __( 'The text to appear in the footer of WooCommerce emails.', 'post-smtp' ),
'id' => 'woocommerce_email_footer_text',
'css' => 'width:300px; height: 75px;',
- 'placeholder' => __( 'N/A', Postman::TEXT_DOMAIN ),
+ 'placeholder' => __( 'N/A', 'post-smtp' ),
'type' => 'textarea',
/* translators: %s: site name */
'default' => get_bloginfo( 'name', 'display' ),
@@ -94,9 +94,9 @@ if ( ! class_exists( 'PostmanWoocommerce' ) ) {
),
array(
- 'title' => __( 'Base color', Postman::TEXT_DOMAIN ),
+ 'title' => __( 'Base color', 'post-smtp' ),
/* translators: %s: default color */
- 'desc' => sprintf( __( 'The base color for WooCommerce email templates. Default %s.', Postman::TEXT_DOMAIN ), '<code>#96588a</code>' ),
+ 'desc' => sprintf( __( 'The base color for WooCommerce email templates. Default %s.', 'post-smtp' ), '<code>#96588a</code>' ),
'id' => 'woocommerce_email_base_color',
'type' => 'color',
'css' => 'width:6em;',
@@ -106,9 +106,9 @@ if ( ! class_exists( 'PostmanWoocommerce' ) ) {
),
array(
- 'title' => __( 'Background color', Postman::TEXT_DOMAIN ),
+ 'title' => __( 'Background color', 'post-smtp' ),
/* translators: %s: default color */
- 'desc' => sprintf( __( 'The background color for WooCommerce email templates. Default %s.', Postman::TEXT_DOMAIN ), '<code>#f7f7f7</code>' ),
+ 'desc' => sprintf( __( 'The background color for WooCommerce email templates. Default %s.', 'post-smtp' ), '<code>#f7f7f7</code>' ),
'id' => 'woocommerce_email_background_color',
'type' => 'color',
'css' => 'width:6em;',
@@ -118,9 +118,9 @@ if ( ! class_exists( 'PostmanWoocommerce' ) ) {
),
array(
- 'title' => __( 'Body background color', Postman::TEXT_DOMAIN ),
+ 'title' => __( 'Body background color', 'post-smtp' ),
/* translators: %s: default color */
- 'desc' => sprintf( __( 'The main body background color. Default %s.', Postman::TEXT_DOMAIN ), '<code>#ffffff</code>' ),
+ 'desc' => sprintf( __( 'The main body background color. Default %s.', 'post-smtp' ), '<code>#ffffff</code>' ),
'id' => 'woocommerce_email_body_background_color',
'type' => 'color',
'css' => 'width:6em;',
@@ -130,9 +130,9 @@ if ( ! class_exists( 'PostmanWoocommerce' ) ) {
),
array(
- 'title' => __( 'Body text color', Postman::TEXT_DOMAIN ),
+ 'title' => __( 'Body text color', 'post-smtp' ),
/* translators: %s: default color */
- 'desc' => sprintf( __( 'The main body text color. Default %s.', Postman::TEXT_DOMAIN ), '<code>#3c3c3c</code>' ),
+ 'desc' => sprintf( __( 'The main body text color. Default %s.', 'post-smtp' ), '<code>#3c3c3c</code>' ),
'id' => 'woocommerce_email_text_color',
'type' => 'color',
'css' => 'width:6em;',
diff --git a/Postman/Postman-Mail/PostmanZendMailEngine.php b/Postman/Postman-Mail/PostmanZendMailEngine.php
index 8d69811..a2079f2 100644
--- a/Postman/Postman-Mail/PostmanZendMailEngine.php
+++ b/Postman/Postman-Mail/PostmanZendMailEngine.php
@@ -204,7 +204,7 @@ if ( ! class_exists( 'PostmanZendMailEngine' ) ) {
$message = $e->getMessage();
if ( $e->getCode() == 334 ) {
// replace the unusable Google message with a better one in the case of code 334
- $message = sprintf( __( 'Communication Error [334] - make sure the Envelope From email is the same account used to create the Client ID.', Postman::TEXT_DOMAIN ) );
+ $message = sprintf( __( 'Communication Error [334] - make sure the Envelope From email is the same account used to create the Client ID.', 'post-smtp' ) );
}
// create a new exception
$newException = new Exception( $message, $e->getCode() );