diff --git a/lib/API/API.php b/lib/API/API.php
index 6f1f36df48..a0d30faa52 100644
--- a/lib/API/API.php
+++ b/lib/API/API.php
@@ -30,7 +30,7 @@ class API {
if($this->checkToken() === false) {
$error_response = new ErrorResponse(
array(
- Error::UNAUTHORIZED => __('You need to specify a valid API token.', MAILPOET)
+ Error::UNAUTHORIZED => __('You need to specify a valid API token.', 'mailpoet')
),
array(),
Response::STATUS_UNAUTHORIZED
@@ -41,7 +41,7 @@ class API {
if($this->checkPermissions() === false) {
$error_response = new ErrorResponse(
array(
- Error::FORBIDDEN => __('You do not have the required permissions.', MAILPOET)
+ Error::FORBIDDEN => __('You do not have the required permissions.', 'mailpoet')
),
array(),
Response::STATUS_FORBIDDEN
@@ -56,7 +56,7 @@ class API {
if($this->checkToken() === false) {
$error_response = new ErrorResponse(
array(
- Error::UNAUTHORIZED => __('You need to specify a valid API token.', MAILPOET)
+ Error::UNAUTHORIZED => __('You need to specify a valid API token.', 'mailpoet')
),
array(),
Response::STATUS_UNAUTHORIZED
diff --git a/lib/API/Endpoint.php b/lib/API/Endpoint.php
index 4d3dd4c7c9..a1196f53ca 100644
--- a/lib/API/Endpoint.php
+++ b/lib/API/Endpoint.php
@@ -16,7 +16,7 @@ abstract class Endpoint {
) {
if(empty($errors)) {
$errors = array(
- Error::UNKNOWN => __('An unknown error occurred.', MAILPOET)
+ Error::UNKNOWN => __('An unknown error occurred.', 'mailpoet')
);
}
return new ErrorResponse($errors, $meta, $status);
@@ -25,7 +25,7 @@ abstract class Endpoint {
function badRequest($errors = array(), $meta = array()) {
if(empty($errors)) {
$errors = array(
- Error::BAD_REQUEST => __('Invalid request parameters.', MAILPOET)
+ Error::BAD_REQUEST => __('Invalid request parameters.', 'mailpoet')
);
}
return new ErrorResponse($errors, $meta, Response::STATUS_BAD_REQUEST);
diff --git a/lib/API/Endpoints/CustomFields.php b/lib/API/Endpoints/CustomFields.php
index c7e731f4ca..72ca32deff 100644
--- a/lib/API/Endpoints/CustomFields.php
+++ b/lib/API/Endpoints/CustomFields.php
@@ -21,7 +21,7 @@ class CustomFields extends APIEndpoint {
$custom_field = CustomField::findOne($id);
if($custom_field === false) {
return $this->errorResponse(array(
- APIError::NOT_FOUND => __('This custom field does not exist.', MAILPOET)
+ APIError::NOT_FOUND => __('This custom field does not exist.', 'mailpoet')
));
} else {
$custom_field->delete();
@@ -48,7 +48,7 @@ class CustomFields extends APIEndpoint {
$custom_field = CustomField::findOne($id);
if($custom_field === false) {
return $this->errorResponse(array(
- APIError::NOT_FOUND => __('This custom field does not exist.', MAILPOET)
+ APIError::NOT_FOUND => __('This custom field does not exist.', 'mailpoet')
));
} else {
return $this->successResponse($custom_field->asArray());
diff --git a/lib/API/Endpoints/Forms.php b/lib/API/Endpoints/Forms.php
index 025e62fa1c..74c53044bf 100644
--- a/lib/API/Endpoints/Forms.php
+++ b/lib/API/Endpoints/Forms.php
@@ -17,7 +17,7 @@ class Forms extends APIEndpoint {
$form = Form::findOne($id);
if($form === false) {
return $this->errorResponse(array(
- APIError::NOT_FOUND => __('This form does not exist.', MAILPOET)
+ APIError::NOT_FOUND => __('This form does not exist.', 'mailpoet')
));
} else {
return $this->successResponse($form->asArray());
@@ -57,31 +57,31 @@ class Forms extends APIEndpoint {
function create() {
// create new form
$form_data = array(
- 'name' => __('New form', MAILPOET),
+ 'name' => __('New form', 'mailpoet'),
'body' => array(
array(
'id' => 'email',
- 'name' => __('Email', MAILPOET),
+ 'name' => __('Email', 'mailpoet'),
'type' => 'text',
'static' => true,
'params' => array(
- 'label' => __('Email', MAILPOET),
+ 'label' => __('Email', 'mailpoet'),
'required' => true
)
),
array(
'id' => 'submit',
- 'name' => __('Submit', MAILPOET),
+ 'name' => __('Submit', 'mailpoet'),
'type' => 'submit',
'static' => true,
'params' => array(
- 'label' => __('Subscribe!', MAILPOET)
+ 'label' => __('Subscribe!', 'mailpoet')
)
)
),
'settings' => array(
'on_success' => 'message',
- 'success_message' => __('Check your inbox or spam folder to confirm your subscription.', MAILPOET),
+ 'success_message' => __('Check your inbox or spam folder to confirm your subscription.', 'mailpoet'),
'segments' => null,
'segments_selected_by' => 'admin'
)
@@ -124,7 +124,7 @@ class Forms extends APIEndpoint {
$form = Form::findOne($id);
if($form === false) {
return $this->errorResponse(array(
- APIError::NOT_FOUND => __('This form does not exist.', MAILPOET)
+ APIError::NOT_FOUND => __('This form does not exist.', 'mailpoet')
));
} else {
$exports = Util\Export::getAll($form->asArray());
@@ -136,7 +136,7 @@ class Forms extends APIEndpoint {
$id = (isset($data['id']) ? (int)$data['id'] : false);
$form_id = (isset($data['id']) ? (int)$data['id'] : 0);
- $name = (isset($data['name']) ? $data['name'] : __('New form', MAILPOET));
+ $name = (isset($data['name']) ? $data['name'] : __('New form', 'mailpoet'));
$body = (isset($data['body']) ? $data['body'] : array());
$settings = (isset($data['settings']) ? $data['settings'] : array());
$styles = (isset($data['styles']) ? $data['styles'] : '');
@@ -206,7 +206,7 @@ class Forms extends APIEndpoint {
$form = Form::findOne($id);
if($form === false) {
return $this->errorResponse(array(
- APIError::NOT_FOUND => __('This form does not exist.', MAILPOET)
+ APIError::NOT_FOUND => __('This form does not exist.', 'mailpoet')
));
} else {
$form->restore();
@@ -222,7 +222,7 @@ class Forms extends APIEndpoint {
$form = Form::findOne($id);
if($form === false) {
return $this->errorResponse(array(
- APIError::NOT_FOUND => __('This form does not exist.', MAILPOET)
+ APIError::NOT_FOUND => __('This form does not exist.', 'mailpoet')
));
} else {
$form->trash();
@@ -238,7 +238,7 @@ class Forms extends APIEndpoint {
$form = Form::findOne($id);
if($form === false) {
return $this->errorResponse(array(
- APIError::NOT_FOUND => __('This form does not exist.', MAILPOET)
+ APIError::NOT_FOUND => __('This form does not exist.', 'mailpoet')
));
} else {
$form->delete();
@@ -252,11 +252,11 @@ class Forms extends APIEndpoint {
if($form === false) {
return $this->errorResponse(array(
- APIError::NOT_FOUND => __('This form does not exist.', MAILPOET)
+ APIError::NOT_FOUND => __('This form does not exist.', 'mailpoet')
));
} else {
$data = array(
- 'name' => sprintf(__('Copy of %s', MAILPOET), $form->name)
+ 'name' => sprintf(__('Copy of %s', 'mailpoet'), $form->name)
);
$duplicate = $form->duplicate($data);
$errors = $duplicate->getErrors();
diff --git a/lib/API/Endpoints/Mailer.php b/lib/API/Endpoints/Mailer.php
index b6b92949f8..a920a4e4f2 100644
--- a/lib/API/Endpoints/Mailer.php
+++ b/lib/API/Endpoints/Mailer.php
@@ -22,7 +22,7 @@ class Mailer extends APIEndpoint {
if($result === false) {
return $this->errorResponse(array(
- APIError::BAD_REQUEST => __("The email could not be sent. Please check your settings.", MAILPOET)
+ APIError::BAD_REQUEST => __("The email could not be sent. Please check your settings.", 'mailpoet')
));
} else {
return $this->successResponse(null);
diff --git a/lib/API/Endpoints/NewsletterTemplates.php b/lib/API/Endpoints/NewsletterTemplates.php
index aabb28de47..556eea3328 100644
--- a/lib/API/Endpoints/NewsletterTemplates.php
+++ b/lib/API/Endpoints/NewsletterTemplates.php
@@ -13,7 +13,7 @@ class NewsletterTemplates extends APIEndpoint {
$template = NewsletterTemplate::findOne($id);
if($template === false) {
return $this->errorResponse(array(
- APIError::NOT_FOUND => __('This template does not exist.', MAILPOET)
+ APIError::NOT_FOUND => __('This template does not exist.', 'mailpoet')
));
} else {
return $this->successResponse(
@@ -49,7 +49,7 @@ class NewsletterTemplates extends APIEndpoint {
$template = NewsletterTemplate::findOne($id);
if($template === false) {
return $this->errorResponse(array(
- APIError::NOT_FOUND => __('This template does not exist.', MAILPOET)
+ APIError::NOT_FOUND => __('This template does not exist.', 'mailpoet')
));
} else {
$template->delete();
diff --git a/lib/API/Endpoints/Newsletters.php b/lib/API/Endpoints/Newsletters.php
index 89bb13dca0..1aa234a146 100644
--- a/lib/API/Endpoints/Newsletters.php
+++ b/lib/API/Endpoints/Newsletters.php
@@ -27,7 +27,7 @@ class Newsletters extends APIEndpoint {
$newsletter = Newsletter::findOne($id);
if($newsletter === false) {
return $this->errorResponse(array(
- APIError::NOT_FOUND => __('This newsletter does not exist.', MAILPOET)
+ APIError::NOT_FOUND => __('This newsletter does not exist.', 'mailpoet')
));
} else {
return $this->successResponse(
@@ -101,7 +101,7 @@ class Newsletters extends APIEndpoint {
if(!$status) {
return $this->badRequest(array(
- APIError::BAD_REQUEST => __('You need to specify a status.', MAILPOET)
+ APIError::BAD_REQUEST => __('You need to specify a status.', 'mailpoet')
));
}
@@ -110,7 +110,7 @@ class Newsletters extends APIEndpoint {
if($newsletter === false) {
return $this->errorResponse(array(
- APIError::NOT_FOUND => __('This newsletter does not exist.', MAILPOET)
+ APIError::NOT_FOUND => __('This newsletter does not exist.', 'mailpoet')
));
}
@@ -131,7 +131,7 @@ class Newsletters extends APIEndpoint {
$newsletter = Newsletter::findOne($id);
if($newsletter === false) {
return $this->errorResponse(array(
- APIError::NOT_FOUND => __('This newsletter does not exist.', MAILPOET)
+ APIError::NOT_FOUND => __('This newsletter does not exist.', 'mailpoet')
));
} else {
$newsletter->restore();
@@ -147,7 +147,7 @@ class Newsletters extends APIEndpoint {
$newsletter = Newsletter::findOne($id);
if($newsletter === false) {
return $this->errorResponse(array(
- APIError::NOT_FOUND => __('This newsletter does not exist.', MAILPOET)
+ APIError::NOT_FOUND => __('This newsletter does not exist.', 'mailpoet')
));
} else {
$newsletter->trash();
@@ -163,7 +163,7 @@ class Newsletters extends APIEndpoint {
$newsletter = Newsletter::findOne($id);
if($newsletter === false) {
return $this->errorResponse(array(
- APIError::NOT_FOUND => __('This newsletter does not exist.', MAILPOET)
+ APIError::NOT_FOUND => __('This newsletter does not exist.', 'mailpoet')
));
} else {
$newsletter->delete();
@@ -177,11 +177,11 @@ class Newsletters extends APIEndpoint {
if($newsletter === false) {
return $this->errorResponse(array(
- APIError::NOT_FOUND => __('This newsletter does not exist.', MAILPOET)
+ APIError::NOT_FOUND => __('This newsletter does not exist.', 'mailpoet')
));
} else {
$data = array(
- 'subject' => sprintf(__('Copy of %s', MAILPOET), $newsletter->subject)
+ 'subject' => sprintf(__('Copy of %s', 'mailpoet'), $newsletter->subject)
);
$duplicate = $newsletter->duplicate($data);
$errors = $duplicate->getErrors();
@@ -200,7 +200,7 @@ class Newsletters extends APIEndpoint {
function showPreview($data = array()) {
if(empty($data['body'])) {
return $this->badRequest(array(
- APIError::BAD_REQUEST => __('Newsletter data is missing.', MAILPOET)
+ APIError::BAD_REQUEST => __('Newsletter data is missing.', 'mailpoet')
));
}
@@ -209,7 +209,7 @@ class Newsletters extends APIEndpoint {
if($newsletter === false) {
return $this->errorResponse(array(
- APIError::NOT_FOUND => __('This newsletter does not exist.', MAILPOET)
+ APIError::NOT_FOUND => __('This newsletter does not exist.', 'mailpoet')
));
} else {
$newsletter->body = $data['body'];
@@ -229,7 +229,7 @@ class Newsletters extends APIEndpoint {
function sendPreview($data = array()) {
if(empty($data['subscriber'])) {
return $this->badRequest(array(
- APIError::BAD_REQUEST => __('Please specify receiver information.', MAILPOET)
+ APIError::BAD_REQUEST => __('Please specify receiver information.', 'mailpoet')
));
}
@@ -238,7 +238,7 @@ class Newsletters extends APIEndpoint {
if($newsletter === false) {
return $this->errorResponse(array(
- APIError::NOT_FOUND => __('This newsletter does not exist.', MAILPOET)
+ APIError::NOT_FOUND => __('This newsletter does not exist.', 'mailpoet')
));
} else {
$newsletter = $newsletter->asArray();
diff --git a/lib/API/Endpoints/Segments.php b/lib/API/Endpoints/Segments.php
index 6fcff419b8..5e541c85a3 100644
--- a/lib/API/Endpoints/Segments.php
+++ b/lib/API/Endpoints/Segments.php
@@ -17,7 +17,7 @@ class Segments extends APIEndpoint {
$segment = Segment::findOne($id);
if($segment === false) {
return $this->errorResponse(array(
- APIError::NOT_FOUND => __('This list does not exist.', MAILPOET)
+ APIError::NOT_FOUND => __('This list does not exist.', 'mailpoet')
));
} else {
return $this->successResponse($segment->asArray());
@@ -68,7 +68,7 @@ class Segments extends APIEndpoint {
$segment = Segment::findOne($id);
if($segment === false) {
return $this->errorResponse(array(
- APIError::NOT_FOUND => __('This list does not exist.', MAILPOET)
+ APIError::NOT_FOUND => __('This list does not exist.', 'mailpoet')
));
} else {
$segment->restore();
@@ -84,7 +84,7 @@ class Segments extends APIEndpoint {
$segment = Segment::findOne($id);
if($segment === false) {
return $this->errorResponse(array(
- APIError::NOT_FOUND => __('This list does not exist.', MAILPOET)
+ APIError::NOT_FOUND => __('This list does not exist.', 'mailpoet')
));
} else {
$segment->trash();
@@ -100,7 +100,7 @@ class Segments extends APIEndpoint {
$segment = Segment::findOne($id);
if($segment === false) {
return $this->errorResponse(array(
- APIError::NOT_FOUND => __('This list does not exist.', MAILPOET)
+ APIError::NOT_FOUND => __('This list does not exist.', 'mailpoet')
));
} else {
$segment->delete();
@@ -114,11 +114,11 @@ class Segments extends APIEndpoint {
if($segment === false) {
return $this->errorResponse(array(
- APIError::NOT_FOUND => __('This list does not exist.', MAILPOET)
+ APIError::NOT_FOUND => __('This list does not exist.', 'mailpoet')
));
} else {
$data = array(
- 'name' => sprintf(__('Copy of %s', MAILPOET), $segment->name)
+ 'name' => sprintf(__('Copy of %s', 'mailpoet'), $segment->name)
);
$duplicate = $segment->duplicate($data);
$errors = $duplicate->getErrors();
diff --git a/lib/API/Endpoints/SendingQueue.php b/lib/API/Endpoints/SendingQueue.php
index 1f242fcddc..6239fc13ef 100644
--- a/lib/API/Endpoints/SendingQueue.php
+++ b/lib/API/Endpoints/SendingQueue.php
@@ -29,7 +29,7 @@ class SendingQueue extends APIEndpoint {
if($newsletter === false) {
return $this->errorResponse(array(
- APIError::NOT_FOUND => __('This newsletter does not exist.', MAILPOET)
+ APIError::NOT_FOUND => __('This newsletter does not exist.', 'mailpoet')
));
}
@@ -49,7 +49,7 @@ class SendingQueue extends APIEndpoint {
if(!empty($queue)) {
return $this->errorResponse(array(
- APIError::NOT_FOUND => __('This newsletter is already being sent.', MAILPOET)
+ APIError::NOT_FOUND => __('This newsletter is already being sent.', 'mailpoet')
));
}
@@ -83,7 +83,7 @@ class SendingQueue extends APIEndpoint {
$subscribers = array_unique($subscribers);
if(!count($subscribers)) {
return $this->errorResponse(array(
- APIError::UNKNOWN => __('There are no subscribers in that list!', MAILPOET)
+ APIError::UNKNOWN => __('There are no subscribers in that list!', 'mailpoet')
));
}
$queue->status = null;
@@ -119,14 +119,14 @@ class SendingQueue extends APIEndpoint {
if($newsletter === false) {
return $this->errorResponse(array(
- APIError::NOT_FOUND => __('This newsletter does not exist.', MAILPOET)
+ APIError::NOT_FOUND => __('This newsletter does not exist.', 'mailpoet')
));
} else {
$queue = $newsletter->getQueue();
if($queue === false) {
return $this->errorResponse(array(
- APIError::UNKNOWN => __('This newsletter has not been sent yet.', MAILPOET)
+ APIError::UNKNOWN => __('This newsletter has not been sent yet.', 'mailpoet')
));
} else {
$queue->pause();
@@ -145,14 +145,14 @@ class SendingQueue extends APIEndpoint {
$newsletter = Newsletter::findOne($newsletter_id);
if($newsletter === false) {
return $this->errorResponse(array(
- APIError::NOT_FOUND => __('This newsletter does not exist.', MAILPOET)
+ APIError::NOT_FOUND => __('This newsletter does not exist.', 'mailpoet')
));
} else {
$queue = $newsletter->getQueue();
if($queue === false) {
return $this->errorResponse(array(
- APIError::UNKNOWN => __('This newsletter has not been sent yet.', MAILPOET)
+ APIError::UNKNOWN => __('This newsletter has not been sent yet.', 'mailpoet')
));
} else {
$queue->resume();
diff --git a/lib/API/Endpoints/Settings.php b/lib/API/Endpoints/Settings.php
index 4ea19728fc..46a6a635db 100644
--- a/lib/API/Endpoints/Settings.php
+++ b/lib/API/Endpoints/Settings.php
@@ -15,7 +15,7 @@ class Settings extends APIEndpoint {
if(empty($settings)) {
return $this->badRequest(array(
APIError::BAD_REQUEST =>
- __("You have not specified any settings to be saved.", MAILPOET)
+ __("You have not specified any settings to be saved.", 'mailpoet')
));
} else {
foreach($settings as $name => $value) {
diff --git a/lib/API/Endpoints/Subscribers.php b/lib/API/Endpoints/Subscribers.php
index 03949d5e06..e205cc4a89 100644
--- a/lib/API/Endpoints/Subscribers.php
+++ b/lib/API/Endpoints/Subscribers.php
@@ -20,7 +20,7 @@ class Subscribers extends APIEndpoint {
$subscriber = Subscriber::findOne($id);
if($subscriber === false) {
return $this->errorResponse(array(
- APIError::NOT_FOUND => __('This subscriber does not exist.', MAILPOET)
+ APIError::NOT_FOUND => __('This subscriber does not exist.', 'mailpoet')
));
} else {
return $this->successResponse(
@@ -67,7 +67,7 @@ class Subscribers extends APIEndpoint {
if(empty($segment_ids)) {
return $this->badRequest(array(
- APIError::BAD_REQUEST => __('Please select a list', MAILPOET)
+ APIError::BAD_REQUEST => __('Please select a list', 'mailpoet')
));
}
@@ -118,7 +118,7 @@ class Subscribers extends APIEndpoint {
$subscriber = Subscriber::findOne($id);
if($subscriber === false) {
return $this->errorResponse(array(
- APIError::NOT_FOUND => __('This subscriber does not exist.', MAILPOET)
+ APIError::NOT_FOUND => __('This subscriber does not exist.', 'mailpoet')
));
} else {
$subscriber->restore();
@@ -134,7 +134,7 @@ class Subscribers extends APIEndpoint {
$subscriber = Subscriber::findOne($id);
if($subscriber === false) {
return $this->errorResponse(array(
- APIError::NOT_FOUND => __('This subscriber does not exist.', MAILPOET)
+ APIError::NOT_FOUND => __('This subscriber does not exist.', 'mailpoet')
));
} else {
$subscriber->trash();
@@ -150,7 +150,7 @@ class Subscribers extends APIEndpoint {
$subscriber = Subscriber::findOne($id);
if($subscriber === false) {
return $this->errorResponse(array(
- APIError::NOT_FOUND => __('This subscriber does not exist.', MAILPOET)
+ APIError::NOT_FOUND => __('This subscriber does not exist.', 'mailpoet')
));
} else {
$subscriber->delete();
diff --git a/lib/Config/Hooks.php b/lib/Config/Hooks.php
index 716fe9e132..d6ddeaa889 100644
--- a/lib/Config/Hooks.php
+++ b/lib/Config/Hooks.php
@@ -148,7 +148,7 @@ class Hooks {
function appendImageSize($sizes) {
return array_merge($sizes, array(
- 'mailpoet_newsletter_max' => __('MailPoet Newsletter', MAILPOET)
+ 'mailpoet_newsletter_max' => __('MailPoet Newsletter', 'mailpoet')
));
}
diff --git a/lib/Config/Menu.php b/lib/Config/Menu.php
index a05cd4527e..e9283e68b6 100644
--- a/lib/Config/Menu.php
+++ b/lib/Config/Menu.php
@@ -59,8 +59,8 @@ class Menu {
$newsletters_page = add_submenu_page(
$main_page_slug,
- $this->setPageTitle(__('Newsletters', MAILPOET)),
- __('Newsletters', MAILPOET),
+ $this->setPageTitle(__('Newsletters', 'mailpoet')),
+ __('Newsletters', 'mailpoet'),
'manage_options',
$main_page_slug,
array($this, 'newsletters')
@@ -79,8 +79,8 @@ class Menu {
$forms_page = add_submenu_page(
$main_page_slug,
- $this->setPageTitle(__('Forms', MAILPOET)),
- __('Forms', MAILPOET),
+ $this->setPageTitle(__('Forms', 'mailpoet')),
+ __('Forms', 'mailpoet'),
'manage_options',
'mailpoet-forms',
array($this, 'forms')
@@ -98,8 +98,8 @@ class Menu {
$subscribers_page = add_submenu_page(
$main_page_slug,
- $this->setPageTitle(__('Subscribers', MAILPOET)),
- __('Subscribers', MAILPOET),
+ $this->setPageTitle(__('Subscribers', 'mailpoet')),
+ __('Subscribers', 'mailpoet'),
'manage_options',
'mailpoet-subscribers',
array($this, 'subscribers')
@@ -117,8 +117,8 @@ class Menu {
$segments_page = add_submenu_page(
$main_page_slug,
- $this->setPageTitle(__('Lists', MAILPOET)),
- __('Lists', MAILPOET),
+ $this->setPageTitle(__('Lists', 'mailpoet')),
+ __('Lists', 'mailpoet'),
'manage_options',
'mailpoet-segments',
array($this, 'segments')
@@ -137,16 +137,16 @@ class Menu {
add_submenu_page(
$main_page_slug,
- $this->setPageTitle( __('Settings', MAILPOET)),
- __('Settings', MAILPOET),
+ $this->setPageTitle( __('Settings', 'mailpoet')),
+ __('Settings', 'mailpoet'),
'manage_options',
'mailpoet-settings',
array($this, 'settings')
);
add_submenu_page(
'admin.php?page=mailpoet-subscribers',
- $this->setPageTitle( __('Import', MAILPOET)),
- __('Import', MAILPOET),
+ $this->setPageTitle( __('Import', 'mailpoet')),
+ __('Import', 'mailpoet'),
'manage_options',
'mailpoet-import',
array($this, 'import')
@@ -154,8 +154,8 @@ class Menu {
add_submenu_page(
true,
- $this->setPageTitle(__('Export', MAILPOET)),
- __('Export', MAILPOET),
+ $this->setPageTitle(__('Export', 'mailpoet')),
+ __('Export', 'mailpoet'),
'manage_options',
'mailpoet-export',
array($this, 'export')
@@ -163,8 +163,8 @@ class Menu {
add_submenu_page(
true,
- $this->setPageTitle(__('Welcome', MAILPOET)),
- __('Welcome', MAILPOET),
+ $this->setPageTitle(__('Welcome', 'mailpoet')),
+ __('Welcome', 'mailpoet'),
'manage_options',
'mailpoet-welcome',
array($this, 'welcome')
@@ -172,8 +172,8 @@ class Menu {
add_submenu_page(
true,
- $this->setPageTitle(__('Update', MAILPOET)),
- __('Update', MAILPOET),
+ $this->setPageTitle(__('Update', 'mailpoet')),
+ __('Update', 'mailpoet'),
'manage_options',
'mailpoet-update',
array($this, 'update')
@@ -181,8 +181,8 @@ class Menu {
add_submenu_page(
true,
- $this->setPageTitle(__('Form Editor', MAILPOET)),
- __('Form Editor', MAILPOET),
+ $this->setPageTitle(__('Form Editor', 'mailpoet')),
+ __('Form Editor', 'mailpoet'),
'manage_options',
'mailpoet-form-editor',
array($this, 'formEditor')
@@ -190,8 +190,8 @@ class Menu {
add_submenu_page(
true,
- $this->setPageTitle(__('Newsletter', MAILPOET)),
- __('Newsletter Editor', MAILPOET),
+ $this->setPageTitle(__('Newsletter', 'mailpoet')),
+ __('Newsletter Editor', 'mailpoet'),
'manage_options',
'mailpoet-newsletter-editor',
array($this, 'newletterEditor')
@@ -355,7 +355,7 @@ class Menu {
$data['segments'] = Segment::getSegmentsWithSubscriberCount($type = false);
$data['settings'] = Setting::getAll();
$data['roles'] = $wp_roles->get_names();
- $data['roles']['mailpoet_all'] = __('In any WordPress role', MAILPOET);
+ $data['roles']['mailpoet_all'] = __('In any WordPress role', 'mailpoet');
$date_time = new DateTime();
$data['current_date'] = $date_time->getCurrentDate(DateTime::DEFAULT_DATE_FORMAT);
@@ -430,7 +430,7 @@ class Menu {
function setPageTitle($title) {
return sprintf(
'%s - %s',
- __('MailPoet', MAILPOET),
+ __('MailPoet', 'mailpoet'),
$title
);
}
diff --git a/lib/Config/Populator.php b/lib/Config/Populator.php
index 1c1cc0dec2..639af11e98 100644
--- a/lib/Config/Populator.php
+++ b/lib/Config/Populator.php
@@ -131,9 +131,9 @@ class Populator {
if(Segment::where('type', 'default')->count() === 0) {
$default_segment = Segment::create();
$default_segment->hydrate(array(
- 'name' => __('My First List', MAILPOET),
+ 'name' => __('My First List', 'mailpoet'),
'description' =>
- __('This list is automatically created when you install MailPoet', MAILPOET)
+ __('This list is automatically created when you install MailPoet', 'mailpoet')
));
$default_segment->save();
}
diff --git a/lib/Config/PopulatorData/Templates/FranksRoastHouseTemplate.php b/lib/Config/PopulatorData/Templates/FranksRoastHouseTemplate.php
index 2400c4be5d..1b8da1ce18 100644
--- a/lib/Config/PopulatorData/Templates/FranksRoastHouseTemplate.php
+++ b/lib/Config/PopulatorData/Templates/FranksRoastHouseTemplate.php
@@ -13,8 +13,8 @@ class FranksRoastHouseTemplate {
function get() {
return array(
- 'name' => __("Frank's Roast House", MAILPOET),
- 'description' => __("Think of this as your sandbox. Play around with this example newsletter to see what MailPoet can do for you.", MAILPOET),
+ 'name' => __("Frank's Roast House", 'mailpoet'),
+ 'description' => __("Think of this as your sandbox. Play around with this example newsletter to see what MailPoet can do for you.", 'mailpoet'),
'readonly' => 0,
'thumbnail' => $this->getThumbnail(),
'body' => json_encode($this->getBody()),
@@ -46,7 +46,7 @@ class FranksRoastHouseTemplate {
"blocks" => array(
array(
"type" => "header",
- "text" => __("Open this email in your web browser. ", MAILPOET),
+ "text" => __("Open this email in your web browser. ", 'mailpoet'),
"styles" => array(
"block" => array(
"backgroundColor" => "#ccc6c6"
@@ -67,7 +67,7 @@ class FranksRoastHouseTemplate {
"type" => "image",
"link" => "http://www.example.com",
"src" => $this->template_image_url . "/header-v2.jpg",
- "alt" => __("Frank's Café", MAILPOET),
+ "alt" => __("Frank's Café", 'mailpoet'),
"fullWidth" => true,
"width" => "600px",
"height" => "220px",
@@ -88,13 +88,13 @@ class FranksRoastHouseTemplate {
),
array(
"type" => "text",
- "text" => __("
Hi there [subscriber:firstname | default:coffee drinker]
\n
\nSit back and enjoy your favorite roast as you read this week's newsletter.
", MAILPOET)
+ "text" => __("Hi there [subscriber:firstname | default:coffee drinker]
\n
\nSit back and enjoy your favorite roast as you read this week's newsletter.
", 'mailpoet')
),
array(
"type" => "image",
"link" => "http://example.org",
"src" => $this->template_image_url . "/coffee-grain.jpg",
- "alt" => __('Coffee grain', MAILPOET),
+ "alt" => __('Coffee grain', 'mailpoet'),
"fullWidth" => false,
"width" => "1599px",
"height" => "777px",
@@ -106,7 +106,7 @@ class FranksRoastHouseTemplate {
),
array(
"type" => "text",
- "text" => __("--- Guest Coffee Roaster: Brew Bros. --- \n
\nVisit our Center Avenue store to try the latest guest coffee from Brew Bros, a local coffee roaster. This young duo started only two years ago, but have quickly gained popularity through pop-up shops, local events, and collaborations with food trucks.
\n
\n\nTasting notes: A rich, caramel flavor with subtle hints of molasses. The perfect wake-up morning espresso!
\n ", MAILPOET)
+ "text" => __("--- Guest Coffee Roaster: Brew Bros. --- \n
\nVisit our Center Avenue store to try the latest guest coffee from Brew Bros, a local coffee roaster. This young duo started only two years ago, but have quickly gained popularity through pop-up shops, local events, and collaborations with food trucks.
\n
\n\nTasting notes: A rich, caramel flavor with subtle hints of molasses. The perfect wake-up morning espresso!
\n ", 'mailpoet')
)
)
)
@@ -132,13 +132,13 @@ class FranksRoastHouseTemplate {
"blocks" => array(
array(
"type" => "text",
- "text" => __("Sandwich Competition ", MAILPOET)
+ "text" => __("Sandwich Competition ", 'mailpoet')
),
array(
"type" => "image",
"link" => "http://example.org",
"src" => $this->template_image_url . "/sandwich.jpg",
- "alt" => __('Sandwich', MAILPOET),
+ "alt" => __('Sandwich', 'mailpoet'),
"fullWidth" => false,
"width" => "640px",
"height" => "344px",
@@ -150,7 +150,7 @@ class FranksRoastHouseTemplate {
),
array(
"type" => "text",
- "text" => __("Have an idea for the Next Great Sandwich? Tell us! We're offering free lunch for a month if you can invent an awesome new sandwich for our menu.
\n
\n
\nSimply tweet your ideas to @franksroasthouse and use #sandwichcomp and we'll let you know if you're a winner.
", MAILPOET)
+ "text" => __("Have an idea for the Next Great Sandwich? Tell us! We're offering free lunch for a month if you can invent an awesome new sandwich for our menu.
\n
\n
\nSimply tweet your ideas to @franksroasthouse and use #sandwichcomp and we'll let you know if you're a winner.
", 'mailpoet')
),
array(
"type" => "button",
@@ -175,7 +175,7 @@ class FranksRoastHouseTemplate {
),
array(
"type" => "text",
- "text" => __("Follow Us ", MAILPOET)
+ "text" => __("Follow Us ", 'mailpoet')
),
array(
"type" => "social",
@@ -232,13 +232,13 @@ class FranksRoastHouseTemplate {
"blocks" => array(
array(
"type" => "text",
- "text" => __("New Store Opening! ", MAILPOET)
+ "text" => __("New Store Opening! ", 'mailpoet')
),
array(
"type" => "image",
"link" => "http://example.org",
"src" => $this->template_image_url . "/map-v2.jpg",
- "alt" => __('Map', MAILPOET),
+ "alt" => __('Map', 'mailpoet'),
"fullWidth" => false,
"width" => "636px",
"height" => "342px",
@@ -250,11 +250,11 @@ class FranksRoastHouseTemplate {
),
array(
"type" => "text",
- "text" => __("Watch out Broad Street, we're coming to you very soon!
\n
\nKeep an eye on your inbox, as we'll have some special offers for our email subscribers plus an exclusive launch party invite!
", MAILPOET)
+ "text" => __("Watch out Broad Street, we're coming to you very soon!
\n
\nKeep an eye on your inbox, as we'll have some special offers for our email subscribers plus an exclusive launch party invite!
", 'mailpoet')
),
array(
"type" => "text",
- "text" => __("New and Improved Hours! \n
\nFrank's is now open even later, so you can get your caffeine fix all day (and night) long! Here's our new opening hours:
\n
\n\nMonday - Thursday: 6am - 12am \nFriday - Saturday: 6am - 1:30am \nSunday: 7:30am - 11pm \n ", MAILPOET)
+ "text" => __("New and Improved Hours! \n
\nFrank's is now open even later, so you can get your caffeine fix all day (and night) long! Here's our new opening hours:
\n
\n\nMonday - Thursday: 6am - 12am \nFriday - Saturday: 6am - 1:30am \nSunday: 7:30am - 11pm \n ", 'mailpoet')
)
)
)
@@ -280,7 +280,7 @@ class FranksRoastHouseTemplate {
"blocks" => array(
array(
"type" => "footer",
- "text" => __("Unsubscribe | Manage subscription 12345 MailPoet Drive, EmailVille, 76543
", MAILPOET),
+ "text" => __("Unsubscribe | Manage subscription 12345 MailPoet Drive, EmailVille, 76543
", 'mailpoet'),
"styles" => array(
"block" => array(
"backgroundColor" => "#a9a7a7"
diff --git a/lib/Config/PopulatorData/Templates/NewsletterBlank121Column.php b/lib/Config/PopulatorData/Templates/NewsletterBlank121Column.php
index eca7cb282c..8621d25b3a 100644
--- a/lib/Config/PopulatorData/Templates/NewsletterBlank121Column.php
+++ b/lib/Config/PopulatorData/Templates/NewsletterBlank121Column.php
@@ -13,8 +13,8 @@ class NewsletterBlank121Column {
function get() {
return array(
- 'name' => __("Newsletter: Blank 1:2:1 Column", MAILPOET),
- 'description' => __("A blank Newsletter template with a 1:2:1 column layout.", MAILPOET),
+ 'name' => __("Newsletter: Blank 1:2:1 Column", 'mailpoet'),
+ 'description' => __("A blank Newsletter template with a 1:2:1 column layout.", 'mailpoet'),
'readonly' => 1,
'thumbnail' => $this->getThumbnail(),
'body' => json_encode($this->getBody()),
@@ -52,7 +52,7 @@ class NewsletterBlank121Column {
"blocks" => array(
array(
"type" => "header",
- "text" => __("Display problems? Open this email in your web browser ", MAILPOET),
+ "text" => __("Display problems? Open this email in your web browser ", 'mailpoet'),
"styles" => array(
"block" => array(
"backgroundColor" => "transparent"
@@ -104,7 +104,7 @@ class NewsletterBlank121Column {
"type" => "image",
"link" => "",
"src" => $this->template_image_url . "/fake-logo.png",
- "alt" => __("Fake logo", MAILPOET),
+ "alt" => __("Fake logo", 'mailpoet'),
"fullWidth" => false,
"width" => "598px",
"height" => "71px",
@@ -116,7 +116,7 @@ class NewsletterBlank121Column {
),
array(
"type" => "text",
- "text" => __("Let's Get Started! \nIt's time to design your newsletter! On the right sidebar, you'll find four menu items that will help you customize your newsletter:
\n\nContent \nLayout \nStyles \nPreview \n ", MAILPOET)
+ "text" => __("Let's Get Started! \nIt's time to design your newsletter! On the right sidebar, you'll find four menu items that will help you customize your newsletter:
\n\nContent \nLayout \nStyles \nPreview \n ", 'mailpoet')
),
array(
"type" => "divider",
@@ -154,11 +154,11 @@ class NewsletterBlank121Column {
"blocks" => array(
array(
"type" => "text",
- "text" => __("This template has... ", MAILPOET)
+ "text" => __("This template has... ", 'mailpoet')
),
array(
"type" => "text",
- "text" => __("In the right sidebar, you can add layout blocks to your email:
\n\n1 column \n2 columns \n3 columns \n ", MAILPOET)
+ "text" => __("In the right sidebar, you can add layout blocks to your email:
\n\n1 column \n2 columns \n3 columns \n ", 'mailpoet')
)
)
),
@@ -173,11 +173,11 @@ class NewsletterBlank121Column {
"blocks" => array(
array(
"type" => "text",
- "text" => __("... a 2-column layout. ", MAILPOET)
+ "text" => __("... a 2-column layout. ", 'mailpoet')
),
array(
"type" => "text",
- "text" => __("You can change a layout's background color by clicking on the settings icon on the right edge of the Designer. Simply hover over this area to see the Settings (gear) icon.
", MAILPOET)
+ "text" => __("You can change a layout's background color by clicking on the settings icon on the right edge of the Designer. Simply hover over this area to see the Settings (gear) icon.
", 'mailpoet')
)
)
)
@@ -237,7 +237,7 @@ class NewsletterBlank121Column {
"blocks" => array(
array(
"type" => "text",
- "text" => __("Let's end with a single column. \nIn the right sidebar, you can add these layout blocks to your email:
\n
\n\n1 column \n2 columns \n3 columns \n ", MAILPOET)
+ "text" => __("Let's end with a single column. \nIn the right sidebar, you can add these layout blocks to your email:
\n
\n\n1 column \n2 columns \n3 columns \n ", 'mailpoet')
)
)
)
@@ -311,7 +311,7 @@ class NewsletterBlank121Column {
),
array(
"type" => "footer",
- "text" => __("Unsubscribe | Manage your subscription Add your postal address here!
", MAILPOET),
+ "text" => __("Unsubscribe | Manage your subscription Add your postal address here!
", 'mailpoet'),
"styles" => array(
"block" => array(
"backgroundColor" => "transparent"
diff --git a/lib/Config/PopulatorData/Templates/NewsletterBlank12Column.php b/lib/Config/PopulatorData/Templates/NewsletterBlank12Column.php
index 5427e628e7..d52999df98 100644
--- a/lib/Config/PopulatorData/Templates/NewsletterBlank12Column.php
+++ b/lib/Config/PopulatorData/Templates/NewsletterBlank12Column.php
@@ -13,8 +13,8 @@ class NewsletterBlank12Column {
function get() {
return array(
- 'name' => __("Newsletter: Blank 1:2 Column", MAILPOET),
- 'description' => __("A blank Newsletter template with a 1:2 column layout.", MAILPOET),
+ 'name' => __("Newsletter: Blank 1:2 Column", 'mailpoet'),
+ 'description' => __("A blank Newsletter template with a 1:2 column layout.", 'mailpoet'),
'readonly' => 1,
'thumbnail' => $this->getThumbnail(),
'body' => json_encode($this->getBody()),
@@ -52,7 +52,7 @@ class NewsletterBlank12Column {
"blocks" => array(
array(
"type" => "header",
- "text" => __("Display problems? Open this email in your web browser ", MAILPOET),
+ "text" => __("Display problems? Open this email in your web browser ", 'mailpoet'),
"styles" => array(
"block" => array(
"backgroundColor" => "transparent"
@@ -104,7 +104,7 @@ class NewsletterBlank12Column {
"type" => "image",
"link" => "",
"src" => $this->template_image_url . "/fake-logo.png",
- "alt" => __("Fake Logo", MAILPOET),
+ "alt" => __("Fake Logo", 'mailpoet'),
"fullWidth" => false,
"width" => "598px",
"height" => "71px",
@@ -116,7 +116,7 @@ class NewsletterBlank12Column {
),
array(
"type" => "text",
- "text" => __("Let's Get Started! \n
\nIt's time to design your newsletter! In the right sidebar, you'll find 4 menu items that will help you customize your newsletter:
\n\nContent \nLayout \nStyles \nPreview \n ", MAILPOET)
+ "text" => __("Let's Get Started! \n
\nIt's time to design your newsletter! In the right sidebar, you'll find 4 menu items that will help you customize your newsletter:
\n\nContent \nLayout \nStyles \nPreview \n ", 'mailpoet')
),
array(
"type" => "divider",
@@ -154,11 +154,11 @@ class NewsletterBlank12Column {
"blocks" => array(
array(
"type" => "text",
- "text" => __("This template has... ", MAILPOET)
+ "text" => __("This template has... ", 'mailpoet')
),
array(
"type" => "text",
- "text" => __("In the right sidebar, you can add these layout blocks to your email:
\n\n1 column \n2 columns \n3 columns \n ", MAILPOET)
+ "text" => __("In the right sidebar, you can add these layout blocks to your email:
\n\n1 column \n2 columns \n3 columns \n ", 'mailpoet')
)
)
),
@@ -173,11 +173,11 @@ class NewsletterBlank12Column {
"blocks" => array(
array(
"type" => "text",
- "text" => __("... a 2-column layout. ", MAILPOET)
+ "text" => __("... a 2-column layout. ", 'mailpoet')
),
array(
"type" => "text",
- "text" => __("You can change a layout's background color by clicking on the settings icon on the right edge of the Designer. Simply hover over this area to see the Settings (gear) icon.
", MAILPOET)
+ "text" => __("You can change a layout's background color by clicking on the settings icon on the right edge of the Designer. Simply hover over this area to see the Settings (gear) icon.
", 'mailpoet')
)
)
)
@@ -251,7 +251,7 @@ class NewsletterBlank12Column {
),
array(
"type" => "footer",
- "text" => __("Unsubscribe | Manage your subscription Add your postal address here!
", MAILPOET),
+ "text" => __("Unsubscribe | Manage your subscription Add your postal address here!
", 'mailpoet'),
"styles" => array(
"block" => array(
"backgroundColor" => "transparent"
diff --git a/lib/Config/PopulatorData/Templates/NewsletterBlank13Column.php b/lib/Config/PopulatorData/Templates/NewsletterBlank13Column.php
index c9a5387173..6348e8be0a 100644
--- a/lib/Config/PopulatorData/Templates/NewsletterBlank13Column.php
+++ b/lib/Config/PopulatorData/Templates/NewsletterBlank13Column.php
@@ -13,8 +13,8 @@ class NewsletterBlank13Column {
function get() {
return array(
- 'name' => __("Newsletter: Blank 1:3 Column", MAILPOET),
- 'description' => __("A blank Newsletter template with a 1:3 column layout.", MAILPOET),
+ 'name' => __("Newsletter: Blank 1:3 Column", 'mailpoet'),
+ 'description' => __("A blank Newsletter template with a 1:3 column layout.", 'mailpoet'),
'readonly' => 1,
'thumbnail' => $this->getThumbnail(),
'body' => json_encode($this->getBody()),
@@ -52,7 +52,7 @@ class NewsletterBlank13Column {
"blocks" => array(
array(
"type" => "header",
- "text" => __("Display problems? Open this email in your web browser ", MAILPOET),
+ "text" => __("Display problems? Open this email in your web browser ", 'mailpoet'),
"styles" => array(
"block" => array(
"backgroundColor" => "transparent"
@@ -104,7 +104,7 @@ class NewsletterBlank13Column {
"type" => "image",
"link" => "",
"src" => $this->template_image_url . "/fake-logo.png",
- "alt" => __("Fake logo", MAILPOET),
+ "alt" => __("Fake logo", 'mailpoet'),
"fullWidth" => false,
"width" => "598px",
"height" => "71px",
@@ -116,7 +116,7 @@ class NewsletterBlank13Column {
),
array(
"type" => "text",
- "text" => __("Let's Get Started! \n
\nIt's time to design your newsletter! On the right sidebar, you'll find four menu items that will help you customize your newsletter:
\n\nContent \nLayout \nStyles \nPreview \n ", MAILPOET)
+ "text" => __("Let's Get Started! \n
\nIt's time to design your newsletter! On the right sidebar, you'll find four menu items that will help you customize your newsletter:
\n\nContent \nLayout \nStyles \nPreview \n ", 'mailpoet')
),
array(
"type" => "divider",
@@ -154,11 +154,11 @@ class NewsletterBlank13Column {
"blocks" => array(
array(
"type" => "text",
- "text" => __("This template... ", MAILPOET)
+ "text" => __("This template... ", 'mailpoet')
),
array(
"type" => "text",
- "text" => __("In the right sidebar, you can add layout blocks to your newsletter.
", MAILPOET)
+ "text" => __("In the right sidebar, you can add layout blocks to your newsletter.
", 'mailpoet')
)
)
),
@@ -173,11 +173,11 @@ class NewsletterBlank13Column {
"blocks" => array(
array(
"type" => "text",
- "text" => __("... has a... ", MAILPOET)
+ "text" => __("... has a... ", 'mailpoet')
),
array(
"type" => "text",
- "text" => __("You have the choice of:
\n\n1 column \n2 columns \n3 columns \n ", MAILPOET)
+ "text" => __("You have the choice of:
\n\n1 column \n2 columns \n3 columns \n ", 'mailpoet')
)
)
),
@@ -192,11 +192,11 @@ class NewsletterBlank13Column {
"blocks" => array(
array(
"type" => "text",
- "text" => __("3-column layout. ", MAILPOET)
+ "text" => __("3-column layout. ", 'mailpoet')
),
array(
"type" => "text",
- "text" => __("You can add as many layout blocks as you want!
", MAILPOET)
+ "text" => __("You can add as many layout blocks as you want!
", 'mailpoet')
),
array(
"type" => "text",
@@ -274,7 +274,7 @@ class NewsletterBlank13Column {
),
array(
"type" => "footer",
- "text" => __("Unsubscribe | Manage your subscription Add your postal address here!
", MAILPOET),
+ "text" => __("Unsubscribe | Manage your subscription Add your postal address here!
", 'mailpoet'),
"styles" => array(
"block" => array(
"backgroundColor" => "transparent"
diff --git a/lib/Config/PopulatorData/Templates/NewsletterBlank1Column.php b/lib/Config/PopulatorData/Templates/NewsletterBlank1Column.php
index 27649bbbcf..d957c2b4d1 100644
--- a/lib/Config/PopulatorData/Templates/NewsletterBlank1Column.php
+++ b/lib/Config/PopulatorData/Templates/NewsletterBlank1Column.php
@@ -13,8 +13,8 @@ class NewsletterBlank1Column {
function get() {
return array(
- 'name' => __("Newsletter: Blank 1 Column", MAILPOET),
- 'description' => __("A blank Newsletter template with a 1 column layout.", MAILPOET),
+ 'name' => __("Newsletter: Blank 1 Column", 'mailpoet'),
+ 'description' => __("A blank Newsletter template with a 1 column layout.", 'mailpoet'),
'readonly' => 1,
'thumbnail' => $this->getThumbnail(),
'body' => json_encode($this->getBody()),
@@ -52,7 +52,7 @@ class NewsletterBlank1Column {
"blocks" => array(
array(
"type" => "header",
- "text" => __("Display problems? Open this email in your web browser ", MAILPOET),
+ "text" => __("Display problems? Open this email in your web browser ", 'mailpoet'),
"styles" => array(
"block" => array(
"backgroundColor" => "transparent"
@@ -104,7 +104,7 @@ class NewsletterBlank1Column {
"type" => "image",
"link" => "",
"src" => $this->template_image_url . "/fake-logo.png",
- "alt" => __("Fake logo", MAILPOET),
+ "alt" => __("Fake logo", 'mailpoet'),
"fullWidth" => false,
"width" => "598px",
"height" => "71px",
@@ -116,7 +116,7 @@ class NewsletterBlank1Column {
),
array(
"type" => "text",
- "text" => __("Let's Get Started! \n
\nIt's time to design your newsletter! In the right sidebar, you'll find 4 menu items that will help you customize your newsletter:
\n\nContent \nLayout \nStyles \nPreview \n ", MAILPOET)
+ "text" => __("Let's Get Started! \n
\nIt's time to design your newsletter! In the right sidebar, you'll find 4 menu items that will help you customize your newsletter:
\n\nContent \nLayout \nStyles \nPreview \n ", 'mailpoet')
)
)
)
@@ -190,7 +190,7 @@ class NewsletterBlank1Column {
),
array(
"type" => "footer",
- "text" => __("Unsubscribe | Manage your subscription Add your postal address here!
", MAILPOET),
+ "text" => __("Unsubscribe | Manage your subscription Add your postal address here!
", 'mailpoet'),
"styles" => array(
"block" => array(
"backgroundColor" => "transparent"
diff --git a/lib/Config/PopulatorData/Templates/PostNotificationsBlank1Column.php b/lib/Config/PopulatorData/Templates/PostNotificationsBlank1Column.php
index 7f1fea64aa..25898f3baf 100644
--- a/lib/Config/PopulatorData/Templates/PostNotificationsBlank1Column.php
+++ b/lib/Config/PopulatorData/Templates/PostNotificationsBlank1Column.php
@@ -13,8 +13,8 @@ class PostNotificationsBlank1Column {
function get() {
return array(
- 'name' => __("Post Notifications: Blank 1 Column", MAILPOET),
- 'description' => __("A blank Post Notifications template with a 1 column layout.", MAILPOET),
+ 'name' => __("Post Notifications: Blank 1 Column", 'mailpoet'),
+ 'description' => __("A blank Post Notifications template with a 1 column layout.", 'mailpoet'),
'readonly' => 1,
'thumbnail' => $this->getThumbnail(),
'body' => json_encode($this->getBody()),
@@ -52,7 +52,7 @@ class PostNotificationsBlank1Column {
"blocks" => array(
array(
"type" => "header",
- "text" => __("Display problems? Open this email in your web browser ", MAILPOET),
+ "text" => __("Display problems? Open this email in your web browser ", 'mailpoet'),
"styles" => array(
"block" => array(
"backgroundColor" => "transparent"
@@ -116,7 +116,7 @@ class PostNotificationsBlank1Column {
),
array(
"type" => "text",
- "text" => __("Check Out Our New Blog Posts! \n
\nMailPoet can automatically send your new blog posts to your subscribers.
\n
\nBelow, you'll find three recent posts, which are displayed automatically, thanks to the Automatic Latest Content widget, which can be found on the right sidebar, under Content .
\n
\nTo edit the settings and styles of your post, simply click on a post below.
", MAILPOET)
+ "text" => __("Check Out Our New Blog Posts! \n
\nMailPoet can automatically send your new blog posts to your subscribers.
\n
\nBelow, you'll find three recent posts, which are displayed automatically, thanks to the Automatic Latest Content widget, which can be found on the right sidebar, under Content .
\n
\nTo edit the settings and styles of your post, simply click on a post below.
", 'mailpoet')
),
array(
"type" => "divider",
@@ -174,14 +174,14 @@ class PostNotificationsBlank1Column {
"imageFullWidth" => false,
"featuredImagePosition" => "belowTitle",
"showAuthor" => "no",
- "authorPrecededBy" => __("Author:", MAILPOET),
+ "authorPrecededBy" => __("Author:", 'mailpoet'),
"showCategories" => "no",
- "categoriesPrecededBy" => __("Categories:", MAILPOET),
+ "categoriesPrecededBy" => __("Categories:", 'mailpoet'),
"readMoreType" => "button",
"readMoreText" => "Read more",
"readMoreButton" => array(
"type" => "button",
- "text" => __("Read the post", MAILPOET),
+ "text" => __("Read the post", 'mailpoet'),
"url" => "[postLink]",
"styles" => array(
"block" => array(
@@ -298,7 +298,7 @@ class PostNotificationsBlank1Column {
),
array(
"type" => "footer",
- "text" => __("Unsubscribe | Manage your subscription Add your postal address here!
", MAILPOET),
+ "text" => __("Unsubscribe | Manage your subscription Add your postal address here!
", 'mailpoet'),
"styles" => array(
"block" => array(
"backgroundColor" => "transparent"
diff --git a/lib/Config/PopulatorData/Templates/Restaurant.php b/lib/Config/PopulatorData/Templates/Restaurant.php
index 55afa6446b..0a95943e8e 100644
--- a/lib/Config/PopulatorData/Templates/Restaurant.php
+++ b/lib/Config/PopulatorData/Templates/Restaurant.php
@@ -13,8 +13,8 @@ class Restaurant {
function get() {
return array(
- 'name' => __("Restaurant", MAILPOET),
- 'description' => __("What's fresh on the menu?", MAILPOET),
+ 'name' => __("Restaurant", 'mailpoet'),
+ 'description' => __("What's fresh on the menu?", 'mailpoet'),
'readonly' => 0,
'thumbnail' => $this->getThumbnail(),
'body' => json_encode($this->getBody()),
diff --git a/lib/Config/PopulatorData/Templates/SimpleText.php b/lib/Config/PopulatorData/Templates/SimpleText.php
index 320455436c..94b9c17683 100644
--- a/lib/Config/PopulatorData/Templates/SimpleText.php
+++ b/lib/Config/PopulatorData/Templates/SimpleText.php
@@ -13,8 +13,8 @@ class SimpleText {
function get() {
return array(
- 'name' => __("Simple Text", MAILPOET),
- 'description' => __("A simple plain text template - just like a regular email.", MAILPOET),
+ 'name' => __("Simple Text", 'mailpoet'),
+ 'description' => __("A simple plain text template - just like a regular email.", 'mailpoet'),
'readonly' => 1,
'thumbnail' => $this->getThumbnail(),
'body' => json_encode($this->getBody()),
@@ -63,7 +63,7 @@ class SimpleText {
"type" => "image",
"link" => "",
"src" => $this->template_image_url . "/fake-logo.png",
- "alt" => __("Fake logo", MAILPOET),
+ "alt" => __("Fake logo", 'mailpoet'),
"fullWidth" => false,
"width" => "598px",
"height" => "71px",
@@ -75,7 +75,7 @@ class SimpleText {
),
array(
"type" => "text",
- "text" => __("Hi [subscriber:firstname | default:subscriber],
\n
\nIn MailPoet, you can write emails in plain text, just like in a regular email. This can make your email newsletters more personal and attention-grabbing.
\n
\nIs this too simple? You can still style your text with basic formatting, like bold or italics.
\n
\nFinally, you can also add a call-to-action button between 2 blocks of text, like this:
", MAILPOET)
+ "text" => __("Hi [subscriber:firstname | default:subscriber],
\n
\nIn MailPoet, you can write emails in plain text, just like in a regular email. This can make your email newsletters more personal and attention-grabbing.
\n
\nIs this too simple? You can still style your text with basic formatting, like bold or italics.
\n
\nFinally, you can also add a call-to-action button between 2 blocks of text, like this:
", 'mailpoet')
)
)
)
@@ -110,7 +110,7 @@ class SimpleText {
),
array(
"type" => "button",
- "text" => __("It's time to take action!", MAILPOET),
+ "text" => __("It's time to take action!", 'mailpoet'),
"url" => "",
"styles" => array(
"block" => array(
@@ -131,11 +131,11 @@ class SimpleText {
),
array(
"type" => "text",
- "text" => __("Thanks for reading. See you soon!
\n
\nThe MailPoet Team
", MAILPOET)
+ "text" => __("Thanks for reading. See you soon!
\n
\nThe MailPoet Team
", 'mailpoet')
),
array(
"type" => "footer",
- "text" => __("Unsubscribe | Manage your subscription Add your postal address here!
", MAILPOET),
+ "text" => __("Unsubscribe | Manage your subscription Add your postal address here!
", 'mailpoet'),
"styles" => array(
"block" => array(
"backgroundColor" => "transparent"
diff --git a/lib/Config/PopulatorData/Templates/StoreDiscount.php b/lib/Config/PopulatorData/Templates/StoreDiscount.php
index b8ac0f4583..17ba34a3e9 100644
--- a/lib/Config/PopulatorData/Templates/StoreDiscount.php
+++ b/lib/Config/PopulatorData/Templates/StoreDiscount.php
@@ -13,8 +13,8 @@ class StoreDiscount {
function get() {
return array(
- 'name' => __("Store Discount", MAILPOET),
- 'description' => __("Store discount email with coupon and shopping suggestions", MAILPOET),
+ 'name' => __("Store Discount", 'mailpoet'),
+ 'description' => __("Store discount email with coupon and shopping suggestions", 'mailpoet'),
'readonly' => 0,
'thumbnail' => $this->getThumbnail(),
'body' => json_encode($this->getBody()),
@@ -59,7 +59,7 @@ class StoreDiscount {
"type" => "image",
"link" => "",
"src" => $this->template_image_url . "/bicycle-header3.png",
- "alt" => __("bicycle-header3", MAILPOET),
+ "alt" => __("bicycle-header3", 'mailpoet'),
"fullWidth" => false,
"width" => "423px",
"height" => "135px",
@@ -70,7 +70,7 @@ class StoreDiscount {
)
), array(
"type" => "text",
- "text" => __("
\nHi [subscriber:firstname | default:reader]
\n
\nFancy 15% off your next order? Use this coupon on all your favourite products from our store until Wednesday. Just enter the code on the payments page and your discount will applied.
", MAILPOET)
+ "text" => __("
\nHi [subscriber:firstname | default:reader]
\n
\nFancy 15% off your next order? Use this coupon on all your favourite products from our store until Wednesday. Just enter the code on the payments page and your discount will applied.
", 'mailpoet')
), array(
"type" => "spacer",
"styles" => array(
@@ -110,10 +110,10 @@ class StoreDiscount {
)
), array(
"type" => "text",
- "text" => __("Get 15% discount off your next order ", MAILPOET)
+ "text" => __("Get 15% discount off your next order ", 'mailpoet')
), array(
"type" => "text",
- "text" => __("USE CODE: WELOVEMAILPOET ", MAILPOET)
+ "text" => __("USE CODE: WELOVEMAILPOET ", 'mailpoet')
), array(
"type" => "divider",
"styles" => array(
@@ -153,7 +153,7 @@ class StoreDiscount {
)
), array(
"type" => "button",
- "text" => __("SHOP NOW", MAILPOET),
+ "text" => __("SHOP NOW", 'mailpoet'),
"url" => "",
"styles" => array(
"block" => array(
@@ -173,7 +173,7 @@ class StoreDiscount {
)
), array(
"type" => "text",
- "text" => __("Use your discount on these great products... ", MAILPOET)
+ "text" => __("Use your discount on these great products... ", 'mailpoet')
), array(
"type" => "spacer",
"styles" => array(
@@ -204,7 +204,7 @@ class StoreDiscount {
"type" => "image",
"link" => "",
"src" => $this->template_image_url . "/red-icycle.jpg",
- "alt" => __("red-icycle", MAILPOET),
+ "alt" => __("red-icycle", 'mailpoet'),
"fullWidth" => false,
"width" => "558px",
"height" => "399px",
@@ -215,10 +215,10 @@ class StoreDiscount {
)
), array(
"type" => "text",
- "text" => __("Lovely Red Bicycle \nWhat can we say? It's a totally awesome red bike, and it's the first of its kind in our collection. No sweat!
\n$289.99 ", MAILPOET)
+ "text" => __("Lovely Red Bicycle \nWhat can we say? It's a totally awesome red bike, and it's the first of its kind in our collection. No sweat!
\n$289.99 ", 'mailpoet')
), array(
"type" => "button",
- "text" => __("Buy", MAILPOET),
+ "text" => __("Buy", 'mailpoet'),
"url" => "",
"styles" => array(
"block" => array(
@@ -249,7 +249,7 @@ class StoreDiscount {
"type" => "image",
"link" => "",
"src" => $this->template_image_url . "/orange-bicycle.jpg",
- "alt" => __("orange-bicycle", MAILPOET),
+ "alt" => __("orange-bicycle", 'mailpoet'),
"fullWidth" => false,
"width" => "639px",
"height" => "457px",
@@ -260,10 +260,10 @@ class StoreDiscount {
)
), array(
"type" => "text",
- "text" => __("Little Orange Bicycle \nAnother product that's just as awesome but it's the second type, and more orange, with some blue. Cool beans!
\n$209.99 ", MAILPOET)
+ "text" => __("Little Orange Bicycle \nAnother product that's just as awesome but it's the second type, and more orange, with some blue. Cool beans!
\n$209.99 ", 'mailpoet')
), array(
"type" => "button",
- "text" => __("Buy", MAILPOET),
+ "text" => __("Buy", 'mailpoet'),
"url" => "",
"styles" => array(
"block" => array(
@@ -320,7 +320,7 @@ class StoreDiscount {
)
), array(
"type" => "text",
- "text" => __("Terms and Conditions:
\n\nMust be used by midnight EST December 15 2016. \nDiscount does not include shipping. \nCannot be used in conjunction with any other offer. \n ", MAILPOET)
+ "text" => __("Terms and Conditions:
\n\nMust be used by midnight EST December 15 2016. \nDiscount does not include shipping. \nCannot be used in conjunction with any other offer. \n ", 'mailpoet')
), array(
"type" => "social",
"iconSet" => "grey",
@@ -331,7 +331,7 @@ class StoreDiscount {
"image" => $this->social_icon_url . "/02-grey/Facebook.png",
"height" => "32px",
"width" => "32px",
- "text" => __("Facebook", MAILPOET)
+ "text" => __("Facebook", 'mailpoet')
), array(
"type" => "socialIcon",
"iconType" => "twitter",
@@ -339,11 +339,11 @@ class StoreDiscount {
"image" => $this->social_icon_url . "/02-grey/Twitter.png",
"height" => "32px",
"width" => "32px",
- "text" => __("Twitter", MAILPOET)
+ "text" => __("Twitter", 'mailpoet')
))
), array(
"type" => "footer",
- "text" => __("Unsubscribe | Manage subscription
\n1 Store Street, Shopville, CA 1345
", MAILPOET),
+ "text" => __("Unsubscribe | Manage subscription
\n1 Store Street, Shopville, CA 1345
", 'mailpoet'),
"styles" => array(
"block" => array(
"backgroundColor" => "transparent"
diff --git a/lib/Config/PopulatorData/Templates/TravelEmail.php b/lib/Config/PopulatorData/Templates/TravelEmail.php
index c738e48f5a..bd3501c8cc 100644
--- a/lib/Config/PopulatorData/Templates/TravelEmail.php
+++ b/lib/Config/PopulatorData/Templates/TravelEmail.php
@@ -13,8 +13,8 @@ class TravelEmail {
function get() {
return array(
- 'name' => __("Travel email", MAILPOET),
- 'description' => __("A little postcard from your trip", MAILPOET),
+ 'name' => __("Travel email", 'mailpoet'),
+ 'description' => __("A little postcard from your trip", 'mailpoet'),
'readonly' => 0,
'thumbnail' => $this->getThumbnail(),
'body' => json_encode($this->getBody()),
@@ -51,7 +51,7 @@ class TravelEmail {
"type" => "image",
"link" => "",
"src" => $this->template_image_url . "/header.png",
- "alt" => __("Travelling Tales with Jane & Steven", MAILPOET),
+ "alt" => __("Travelling Tales with Jane & Steven", 'mailpoet'),
"fullWidth" => true,
"width" => "660px",
"height" => "165px",
@@ -70,7 +70,7 @@ class TravelEmail {
)
), array(
"type" => "text",
- "text" => __("Hi [subscriber:firstname | default:reader]! \n
\nGreetings from New Zealand, we're here enjoying the sights and sounds (and bad smells!) of Rotarua. Yesterday we took advantage of the local amenities and visited the hot springs!
\nDon't forget to stay up-to-date via twitter!
", MAILPOET)
+ "text" => __("Hi [subscriber:firstname | default:reader]! \n
\nGreetings from New Zealand, we're here enjoying the sights and sounds (and bad smells!) of Rotarua. Yesterday we took advantage of the local amenities and visited the hot springs!
\nDon't forget to stay up-to-date via twitter!
", 'mailpoet')
), array(
"type" => "social",
"iconSet" => "circles",
@@ -81,11 +81,11 @@ class TravelEmail {
"image" => $this->social_icon_url . "/03-circles/Twitter.png",
"height" => "32px",
"width" => "32px",
- "text" => __("Twitter", MAILPOET)
+ "text" => __("Twitter", 'mailpoet')
))
), array(
"type" => "text",
- "text" => __("Photos from Rotarua ", MAILPOET)
+ "text" => __("Photos from Rotarua ", 'mailpoet')
), array(
"type" => "spacer",
"styles" => array(
@@ -116,7 +116,7 @@ class TravelEmail {
"type" => "image",
"link" => "",
"src" => $this->template_image_url . "/gallery1.jpg",
- "alt" => __("hot thermals", MAILPOET),
+ "alt" => __("hot thermals", 'mailpoet'),
"fullWidth" => false,
"width" => "640px",
"height" => "425px",
@@ -146,7 +146,7 @@ class TravelEmail {
"type" => "image",
"link" => "",
"src" => $this->template_image_url . "/gallery2.jpg",
- "alt" => __("The view from our campsite", MAILPOET),
+ "alt" => __("The view from our campsite", 'mailpoet'),
"fullWidth" => false,
"width" => "640px",
"height" => "425px",
@@ -185,7 +185,7 @@ class TravelEmail {
"type" => "image",
"link" => "",
"src" => $this->template_image_url . "/gallery3.jpg",
- "alt" => __("Red sky at night", MAILPOET),
+ "alt" => __("Red sky at night", 'mailpoet'),
"fullWidth" => false,
"width" => "640px",
"height" => "425px",
@@ -207,7 +207,7 @@ class TravelEmail {
"type" => "image",
"link" => "",
"src" => $this->template_image_url . "/gallery4.jpg",
- "alt" => __("Don't go chasing waterfalls", MAILPOET),
+ "alt" => __("Don't go chasing waterfalls", 'mailpoet'),
"fullWidth" => false,
"width" => "640px",
"height" => "425px",
@@ -244,7 +244,7 @@ class TravelEmail {
)
), array(
"type" => "button",
- "text" => __("View NZ Photo Gallery", MAILPOET),
+ "text" => __("View NZ Photo Gallery", 'mailpoet'),
"url" => "",
"styles" => array(
"block" => array(
@@ -293,7 +293,7 @@ class TravelEmail {
)
), array(
"type" => "text",
- "text" => __("Here's our top recommendations in Rotarua ", MAILPOET)
+ "text" => __("Here's our top recommendations in Rotarua ", 'mailpoet')
), array(
"type" => "spacer",
"styles" => array(
@@ -324,7 +324,7 @@ class TravelEmail {
"type" => "image",
"link" => "",
"src" => $this->template_image_url . "/glow-worms.jpg",
- "alt" => __("Glow worms, Waitomo Caves", MAILPOET),
+ "alt" => __("Glow worms, Waitomo Caves", 'mailpoet'),
"fullWidth" => true,
"width" => "640px",
"height" => "428px",
@@ -335,7 +335,7 @@ class TravelEmail {
)
), array(
"type" => "text",
- "text" => __("Waitomo Glow Worm Caves
", MAILPOET)
+ "text" => __("Waitomo Glow Worm Caves
", 'mailpoet')
))
), array(
"type" => "container",
@@ -349,7 +349,7 @@ class TravelEmail {
"type" => "image",
"link" => "",
"src" => $this->template_image_url . "/luge.jpg",
- "alt" => __("luge", MAILPOET),
+ "alt" => __("luge", 'mailpoet'),
"fullWidth" => false,
"width" => "375px",
"height" => "500px",
@@ -360,7 +360,7 @@ class TravelEmail {
)
), array(
"type" => "text",
- "text" => __("Luge!
", MAILPOET)
+ "text" => __("Luge!
", 'mailpoet')
))
), array(
"type" => "container",
@@ -374,7 +374,7 @@ class TravelEmail {
"type" => "image",
"link" => "",
"src" => $this->template_image_url . "/holiday-park.jpg",
- "alt" => __("holiday-park", MAILPOET),
+ "alt" => __("holiday-park", 'mailpoet'),
"fullWidth" => true,
"width" => "640px",
"height" => "425px",
@@ -385,7 +385,7 @@ class TravelEmail {
)
), array(
"type" => "text",
- "text" => __("Roturua Thermal Holiday Park
", MAILPOET)
+ "text" => __("Roturua Thermal Holiday Park
", 'mailpoet')
))
))
), array(
@@ -414,7 +414,7 @@ class TravelEmail {
)
), array(
"type" => "text",
- "text" => __("Tomorrow we're heading towards Taupo where we'll visit the 'Craters of the moon' and go prawn fishing! Hopefully the weather will stay good.
\n
\nKeep on travellin'
\nJane & Steven
", MAILPOET)
+ "text" => __("Tomorrow we're heading towards Taupo where we'll visit the 'Craters of the moon' and go prawn fishing! Hopefully the weather will stay good.
\n
\nKeep on travellin'
\nJane & Steven
", 'mailpoet')
))
))
), array(
@@ -464,7 +464,7 @@ class TravelEmail {
)
), array(
"type" => "footer",
- "text" => __("Unsubscribe | Manage subscription
", MAILPOET),
+ "text" => __("Unsubscribe | Manage subscription
", 'mailpoet'),
"styles" => array(
"block" => array(
"backgroundColor" => "transparent"
diff --git a/lib/Config/PopulatorData/Templates/WelcomeBlank12Column.php b/lib/Config/PopulatorData/Templates/WelcomeBlank12Column.php
index bfd033ff33..a9a6ec794c 100644
--- a/lib/Config/PopulatorData/Templates/WelcomeBlank12Column.php
+++ b/lib/Config/PopulatorData/Templates/WelcomeBlank12Column.php
@@ -13,8 +13,8 @@ class WelcomeBlank12Column {
function get() {
return array(
- 'name' => __("Welcome Email: Blank 1:2 Column", MAILPOET),
- 'description' => __("A blank Welcome Email template with a 1:2 column layout.", MAILPOET),
+ 'name' => __("Welcome Email: Blank 1:2 Column", 'mailpoet'),
+ 'description' => __("A blank Welcome Email template with a 1:2 column layout.", 'mailpoet'),
'readonly' => 1,
'thumbnail' => $this->getThumbnail(),
'body' => json_encode($this->getBody()),
@@ -52,7 +52,7 @@ class WelcomeBlank12Column {
"blocks" => array(
array(
"type" => "header",
- "text" => __("Display problems? Open this email in your web browser ", MAILPOET),
+ "text" => __("Display problems? Open this email in your web browser ", 'mailpoet'),
"styles" => array(
"block" => array(
"backgroundColor" => "transparent"
@@ -104,7 +104,7 @@ class WelcomeBlank12Column {
"type" => "image",
"link" => "",
"src" => $this->template_image_url . "/fake-logo.png",
- "alt" => __("Fake logo", MAILPOET),
+ "alt" => __("Fake logo", 'mailpoet'),
"fullWidth" => false,
"width" => "598px",
"height" => "71px",
@@ -116,7 +116,7 @@ class WelcomeBlank12Column {
),
array(
"type" => "text",
- "text" => __("Hi, new subscriber! \n
\n[subscriber:firstname | default:Subscriber],
\n
\nYou recently joined our list and we'd like to give you a warm welcome!
", MAILPOET)
+ "text" => __("Hi, new subscriber! \n
\n[subscriber:firstname | default:Subscriber],
\n
\nYou recently joined our list and we'd like to give you a warm welcome!
", 'mailpoet')
),
array(
"type" => "divider",
@@ -163,11 +163,11 @@ class WelcomeBlank12Column {
"blocks" => array(
array(
"type" => "text",
- "text" => __("Our Most Popular Posts ", MAILPOET)
+ "text" => __("Our Most Popular Posts ", 'mailpoet')
),
array(
"type" => "text",
- "text" => __("", MAILPOET)
+ "text" => __("", 'mailpoet')
)
)
),
@@ -182,15 +182,15 @@ class WelcomeBlank12Column {
"blocks" => array(
array(
"type" => "text",
- "text" => __("What's Next? ", MAILPOET)
+ "text" => __("What's Next? ", 'mailpoet')
),
array(
"type" => "text",
- "text" => __("Add a single button to your newsletter in order to have one clear call-to-action, which will increase your click rates.
", MAILPOET)
+ "text" => __("Add a single button to your newsletter in order to have one clear call-to-action, which will increase your click rates.
", 'mailpoet')
),
array(
"type" => "button",
- "text" => __("Read up!", MAILPOET),
+ "text" => __("Read up!", 'mailpoet'),
"url" => "",
"styles" => array(
"block" => array(
@@ -281,7 +281,7 @@ class WelcomeBlank12Column {
),
array(
"type" => "footer",
- "text" => __("Unsubscribe | Manage your subscription Add your postal address here!
", MAILPOET),
+ "text" => __("Unsubscribe | Manage your subscription Add your postal address here!
", 'mailpoet'),
"styles" => array(
"block" => array(
"backgroundColor" => "transparent"
diff --git a/lib/Config/PopulatorData/Templates/WelcomeBlank1Column.php b/lib/Config/PopulatorData/Templates/WelcomeBlank1Column.php
index 0887161d4b..36ee5f55ad 100644
--- a/lib/Config/PopulatorData/Templates/WelcomeBlank1Column.php
+++ b/lib/Config/PopulatorData/Templates/WelcomeBlank1Column.php
@@ -13,8 +13,8 @@ class WelcomeBlank1Column {
function get() {
return array(
- 'name' => __("Welcome Email: Blank 1 Column", MAILPOET),
- 'description' => __("A blank Welcome Email template with a 1 column layout.", MAILPOET),
+ 'name' => __("Welcome Email: Blank 1 Column", 'mailpoet'),
+ 'description' => __("A blank Welcome Email template with a 1 column layout.", 'mailpoet'),
'readonly' => 1,
'thumbnail' => $this->getThumbnail(),
'body' => json_encode($this->getBody()),
@@ -52,7 +52,7 @@ class WelcomeBlank1Column {
"blocks" => array(
array(
"type" => "header",
- "text" => __("Display problems? Open this email in your web browser ", MAILPOET),
+ "text" => __("Display problems? Open this email in your web browser ", 'mailpoet'),
"styles" => array(
"block" => array(
"backgroundColor" => "transparent"
@@ -104,7 +104,7 @@ class WelcomeBlank1Column {
"type" => "image",
"link" => "",
"src" => $this->template_image_url . "/fake-logo.png",
- "alt" => __("Fake logo", MAILPOET),
+ "alt" => __("Fake logo", 'mailpoet'),
"fullWidth" => false,
"width" => "598px",
"height" => "71px",
@@ -116,7 +116,7 @@ class WelcomeBlank1Column {
),
array(
"type" => "text",
- "text" => __("Hi, new subscriber! \n
\n[subscriber:firstname | default:Subscriber],
\n
\nYou recently joined our list and we'd like to give you a warm welcome!
\n
\nWant to get to know us better? Check out some of our most popular articles:
\n\nThe Importance of Focus When Writing \nHow to Write a Great Subject Line \nJust Sit Down and Write – Advice on Motivation from Ernest Hemingway \n ", MAILPOET)
+ "text" => __("Hi, new subscriber! \n
\n[subscriber:firstname | default:Subscriber],
\n
\nYou recently joined our list and we'd like to give you a warm welcome!
\n
\nWant to get to know us better? Check out some of our most popular articles:
\n\nThe Importance of Focus When Writing \nHow to Write a Great Subject Line \nJust Sit Down and Write – Advice on Motivation from Ernest Hemingway \n ", 'mailpoet')
)
)
)
@@ -190,7 +190,7 @@ class WelcomeBlank1Column {
),
array(
"type" => "footer",
- "text" => __("Unsubscribe | Manage your subscription Add your postal address here!
", MAILPOET),
+ "text" => __("Unsubscribe | Manage your subscription Add your postal address here!
", 'mailpoet'),
"styles" => array(
"block" => array(
"backgroundColor" => "transparent"
diff --git a/lib/Config/Shortcodes.php b/lib/Config/Shortcodes.php
index 2155f9b412..c556027c7b 100644
--- a/lib/Config/Shortcodes.php
+++ b/lib/Config/Shortcodes.php
@@ -81,7 +81,7 @@ class Shortcodes {
if(empty($newsletters)) {
return apply_filters(
'mailpoet_archive_no_newsletters',
- __('Oops! There are no newsletters to display.', MAILPOET)
+ __('Oops! There are no newsletters to display.', 'mailpoet')
);
} else {
$title = apply_filters('mailpoet_archive_title', '');
@@ -116,7 +116,7 @@ class Shortcodes {
$preview_url = NewsletterUrl::getViewInBrowserUrl($newsletter);
return ''
+ .esc_attr(__('Preview in a new tab', 'mailpoet')).'">'
.esc_attr($newsletter->subject).
' ';
}
diff --git a/lib/Cron/CronHelper.php b/lib/Cron/CronHelper.php
index 0f7462b634..a45785aea1 100644
--- a/lib/Cron/CronHelper.php
+++ b/lib/Cron/CronHelper.php
@@ -80,13 +80,13 @@ class CronHelper {
$fp = @fsockopen($parsed_url['host'], $port, $errno, $errstr, 1);
if($fp) return sprintf('%s://%s', $parsed_url['scheme'], $parsed_url['host']);
// 4. throw an error if all connection attempts failed
- throw new \Exception(__('Site URL is unreachable.', MAILPOET));
+ throw new \Exception(__('Site URL is unreachable.', 'mailpoet'));
}
static function enforceExecutionLimit($timer) {
$elapsed_time = microtime(true) - $timer;
if($elapsed_time >= self::DAEMON_EXECUTION_LIMIT) {
- throw new \Exception(__('Maximum execution time has been reached.', MAILPOET));
+ throw new \Exception(__('Maximum execution time has been reached.', 'mailpoet'));
}
}
}
\ No newline at end of file
diff --git a/lib/Cron/Daemon.php b/lib/Cron/Daemon.php
index 2064f39bf1..186d7ca5b6 100644
--- a/lib/Cron/Daemon.php
+++ b/lib/Cron/Daemon.php
@@ -24,10 +24,10 @@ class Daemon {
function run() {
ignore_user_abort(true);
if(!$this->request_data) {
- $error = __('Invalid or missing request data.', MAILPOET);
+ $error = __('Invalid or missing request data.', 'mailpoet');
} else {
if(!$this->daemon) {
- $error = __('Daemon does not exist.', MAILPOET);
+ $error = __('Daemon does not exist.', 'mailpoet');
} else {
if(!isset($this->request_data['token']) ||
$this->request_data['token'] !== $this->daemon['token']
diff --git a/lib/Form/Block/Base.php b/lib/Form/Block/Base.php
index 7631f92892..3f0b68df9b 100644
--- a/lib/Form/Block/Base.php
+++ b/lib/Form/Block/Base.php
@@ -7,7 +7,7 @@ abstract class Base {
if($block['id'] === 'email') {
$rules['required'] = true;
- $rules['error-message'] = __('Please specify a valid email address', MAILPOET);
+ $rules['error-message'] = __('Please specify a valid email address', 'mailpoet');
}
if($block['id'] === 'segments') {
@@ -15,7 +15,7 @@ abstract class Base {
$rules['mincheck'] = 1;
$rules['group'] = $block['id'];
$rules['errors-container'] = '.mailpoet_error_'.$block['id'];
- $rules['required-message'] = __('Please select a list', MAILPOET);
+ $rules['required-message'] = __('Please select a list', 'mailpoet');
}
if(!empty($block['params']['required'])) {
@@ -25,7 +25,7 @@ abstract class Base {
if(!empty($block['params']['validate'])) {
if($block['params']['validate'] === 'phone') {
$rules['pattern'] = "^[\d\+\-\.\(\)\/\s]*$";
- $rules['error-message'] = __('Please specify a valid phone number', MAILPOET);
+ $rules['error-message'] = __('Please specify a valid phone number', 'mailpoet');
} else {
$rules['type'] = $block['params']['validate'];
}
@@ -34,7 +34,7 @@ abstract class Base {
if(in_array($block['type'], array('radio', 'checkbox'))) {
$rules['group'] = 'custom_field_'.$block['id'];
$rules['errors-container'] = '.mailpoet_error_'.$block['id'];
- $rules['required-message'] = __('Please select at least one option', MAILPOET);
+ $rules['required-message'] = __('Please select at least one option', 'mailpoet');
}
if($block['type'] === 'date') {
diff --git a/lib/Form/Block/Date.php b/lib/Form/Block/Date.php
index b73a108f1a..69deb17905 100644
--- a/lib/Form/Block/Date.php
+++ b/lib/Form/Block/Date.php
@@ -70,27 +70,27 @@ class Date extends Base {
$block['selected'] = $day;
$html .= ' __('Please select a day', MAILPOET)
+ 'required-message' => __('Please select a day', 'mailpoet')
));
- $html .= 'name="'.$field_name.'[day]" placeholder="'.__('Day', MAILPOET).'">';
+ $html .= 'name="'.$field_name.'[day]" placeholder="'.__('Day', 'mailpoet').'">';
$html .= static::getDays($block);
$html .= ' ';
} else if($date_selector === 'MM') {
$block['selected'] = $month;
$html .= ' __('Please select a month', MAILPOET)
+ 'required-message' => __('Please select a month', 'mailpoet')
));
- $html .= 'name="'.$field_name.'[month]" placeholder="'.__('Month', MAILPOET).'">';
+ $html .= 'name="'.$field_name.'[month]" placeholder="'.__('Month', 'mailpoet').'">';
$html .= static::getMonths($block);
$html .= ' ';
} else if($date_selector === 'YYYY') {
$block['selected'] = $year;
$html .= ' __('Please select a year', MAILPOET)
+ 'required-message' => __('Please select a year', 'mailpoet')
));
- $html .= 'name="'.$field_name.'[year]" placeholder="'.__('Year', MAILPOET).'">';
+ $html .= 'name="'.$field_name.'[year]" placeholder="'.__('Year', 'mailpoet').'">';
$html .= static::getYears($block);
$html .= ' ';
}
@@ -103,10 +103,10 @@ class Date extends Base {
static function getDateTypes() {
return array(
- 'year_month_day' => __('Year, month, day', MAILPOET),
- 'year_month' => __('Year, month', MAILPOET),
- 'month' => __('Month (January, February,...)', MAILPOET),
- 'year' => __('Year', MAILPOET)
+ 'year_month_day' => __('Year, month, day', 'mailpoet'),
+ 'year_month' => __('Year, month', 'mailpoet'),
+ 'month' => __('Month (January, February,...)', 'mailpoet'),
+ 'year' => __('Year', 'mailpoet')
);
}
@@ -119,9 +119,9 @@ class Date extends Base {
);
}
static function getMonthNames() {
- return array(__('January', MAILPOET), __('February', MAILPOET), __('March', MAILPOET), __('April', MAILPOET),
- __('May', MAILPOET), __('June', MAILPOET), __('July', MAILPOET), __('August', MAILPOET), __('September', MAILPOET),
- __('October', MAILPOET), __('November', MAILPOET), __('December', MAILPOET)
+ return array(__('January', 'mailpoet'), __('February', 'mailpoet'), __('March', 'mailpoet'), __('April', 'mailpoet'),
+ __('May', 'mailpoet'), __('June', 'mailpoet'), __('July', 'mailpoet'), __('August', 'mailpoet'), __('September', 'mailpoet'),
+ __('October', 'mailpoet'), __('November', 'mailpoet'), __('December', 'mailpoet')
);
}
@@ -138,7 +138,7 @@ class Date extends Base {
$html = '';
// empty value label
- $html .= ''.__('Month', MAILPOET).' ';
+ $html .= ''.__('Month', 'mailpoet').' ';
for($i = 1; $i < 13; $i++) {
$is_selected = ($i === $block['selected']) ? 'selected="selected"' : '';
@@ -168,7 +168,7 @@ class Date extends Base {
$html = '';
// empty value label
- $html .= ''.__('Year', MAILPOET).' ';
+ $html .= ''.__('Year', 'mailpoet').' ';
// return years as an array
for($i = (int)$block['to']; $i > (int)($block['from'] - 1); $i--) {
@@ -194,7 +194,7 @@ class Date extends Base {
$html = '';
// empty value label
- $html .= ''.__('Day', MAILPOET).' ';
+ $html .= ''.__('Day', 'mailpoet').' ';
// return days as an array
for($i = 1; $i < 32; $i++) {
diff --git a/lib/Form/Widget.php b/lib/Form/Widget.php
index 9f421e14b9..4b1ff7af69 100644
--- a/lib/Form/Widget.php
+++ b/lib/Form/Widget.php
@@ -15,9 +15,9 @@ class Widget extends \WP_Widget {
function __construct () {
return parent::__construct(
'mailpoet_form',
- __('MailPoet Form', MAILPOET),
+ __('MailPoet Form', 'mailpoet'),
array(
- 'description' => __('Add a newsletter subscription form', MAILPOET)
+ 'description' => __('Add a newsletter subscription form', 'mailpoet')
)
);
}
@@ -40,7 +40,7 @@ class Widget extends \WP_Widget {
$instance = wp_parse_args(
(array)$instance,
array(
- 'title' => __("Subscribe to Our Newsletter", MAILPOET)
+ 'title' => __("Subscribe to Our Newsletter", 'mailpoet')
)
);
diff --git a/lib/Mailer/Mailer.php b/lib/Mailer/Mailer.php
index 305806c5df..119a1b17e0 100644
--- a/lib/Mailer/Mailer.php
+++ b/lib/Mailer/Mailer.php
@@ -93,7 +93,7 @@ class Mailer {
);
break;
default:
- throw new \Exception(__('Mailing method does not exist', MAILPOET));
+ throw new \Exception(__('Mailing method does not exist', 'mailpoet'));
}
return $mailer_instance;
}
@@ -101,7 +101,7 @@ class Mailer {
static function getMailerConfig($mailer = false) {
if(!$mailer) {
$mailer = Setting::getValue(self::MAILER_CONFIG_SETTING_NAME);
- if(!$mailer || !isset($mailer['method'])) throw new \Exception(__('Mailer is not configured', MAILPOET));
+ if(!$mailer || !isset($mailer['method'])) throw new \Exception(__('Mailer is not configured', 'mailpoet'));
}
if(empty($mailer['frequency'])) {
$default_settings = Setting::getDefaults();
@@ -118,7 +118,7 @@ class Mailer {
function getSenderNameAndAddress($sender = false) {
if(empty($sender)) {
$sender = Setting::getValue('sender', array());
- if(empty($sender['address'])) throw new \Exception(__('Sender name and email are not configured', MAILPOET));
+ if(empty($sender['address'])) throw new \Exception(__('Sender name and email are not configured', 'mailpoet'));
}
return array(
'from_name' => $sender['name'],
diff --git a/lib/Mailer/MailerLog.php b/lib/Mailer/MailerLog.php
index 35ccdfc32e..4ca145979e 100644
--- a/lib/Mailer/MailerLog.php
+++ b/lib/Mailer/MailerLog.php
@@ -54,7 +54,7 @@ class MailerLog {
static function enforceSendingLimit() {
if(self::isSendingLimitReached()) {
- throw new \Exception(__('Sending frequency limit has been reached.', MAILPOET));
+ throw new \Exception(__('Sending frequency limit has been reached.', 'mailpoet'));
}
}
}
\ No newline at end of file
diff --git a/lib/Models/CustomField.php b/lib/Models/CustomField.php
index 3fa346800a..aca078dff1 100644
--- a/lib/Models/CustomField.php
+++ b/lib/Models/CustomField.php
@@ -11,10 +11,10 @@ class CustomField extends Model {
function __construct() {
parent::__construct();
$this->addValidations('name', array(
- 'required' => __('Please specify a name', MAILPOET)
+ 'required' => __('Please specify a name', 'mailpoet')
));
$this->addValidations('type', array(
- 'required' => __('Please specify a type', MAILPOET)
+ 'required' => __('Please specify a type', 'mailpoet')
));
}
diff --git a/lib/Models/Form.php b/lib/Models/Form.php
index df26fffcb6..156857c06e 100644
--- a/lib/Models/Form.php
+++ b/lib/Models/Form.php
@@ -10,7 +10,7 @@ class Form extends Model {
parent::__construct();
$this->addValidations('name', array(
- 'required' => __('Please specify a name', MAILPOET)
+ 'required' => __('Please specify a name', 'mailpoet')
));
}
@@ -47,12 +47,12 @@ class Form extends Model {
return array(
array(
'name' => 'all',
- 'label' => __('All', MAILPOET),
+ 'label' => __('All', 'mailpoet'),
'count' => Form::getPublished()->count()
),
array(
'name' => 'trash',
- 'label' => __('Trash', MAILPOET),
+ 'label' => __('Trash', 'mailpoet'),
'count' => Form::getTrashed()->count()
)
);
diff --git a/lib/Models/Model.php b/lib/Models/Model.php
index e615c66458..23b0ee5b7f 100644
--- a/lib/Models/Model.php
+++ b/lib/Models/Model.php
@@ -50,7 +50,7 @@ class Model extends \Sudzy\ValidModel {
$column = $matches[1];
$this->setError(
sprintf(
- __('Another record already exists. Please specify a different "%1$s".', MAILPOET),
+ __('Another record already exists. Please specify a different "%1$s".', 'mailpoet'),
$column
)
);
diff --git a/lib/Models/Newsletter.php b/lib/Models/Newsletter.php
index 4d41f19a4d..795765086b 100644
--- a/lib/Models/Newsletter.php
+++ b/lib/Models/Newsletter.php
@@ -23,7 +23,7 @@ class Newsletter extends Model {
function __construct() {
parent::__construct();
$this->addValidations('type', array(
- 'required' => __('Please specify a type', MAILPOET)
+ 'required' => __('Please specify a type', 'mailpoet')
));
}
@@ -309,7 +309,7 @@ class Newsletter extends Model {
$segments = Segment::orderByAsc('name')->findMany();
$segment_list = array();
$segment_list[] = array(
- 'label' => __('All Lists', MAILPOET),
+ 'label' => __('All Lists', 'mailpoet'),
'value' => ''
);
@@ -408,7 +408,7 @@ class Newsletter extends Model {
$groups = array(
array(
'name' => 'all',
- 'label' => __('All', MAILPOET),
+ 'label' => __('All', 'mailpoet'),
'count' => Newsletter::getPublished()
->filter('filterType', $type)
->count()
@@ -420,7 +420,7 @@ class Newsletter extends Model {
$groups = array_merge($groups, array(
array(
'name' => self::STATUS_DRAFT,
- 'label' => __('Draft', MAILPOET),
+ 'label' => __('Draft', 'mailpoet'),
'count' => Newsletter::getPublished()
->filter('filterType', $type)
->filter('filterStatus', self::STATUS_DRAFT)
@@ -428,7 +428,7 @@ class Newsletter extends Model {
),
array(
'name' => self::STATUS_SCHEDULED,
- 'label' => __('Scheduled', MAILPOET),
+ 'label' => __('Scheduled', 'mailpoet'),
'count' => Newsletter::getPublished()
->filter('filterType', $type)
->filter('filterStatus', self::STATUS_SCHEDULED)
@@ -436,7 +436,7 @@ class Newsletter extends Model {
),
array(
'name' => self::STATUS_SENDING,
- 'label' => __('Sending', MAILPOET),
+ 'label' => __('Sending', 'mailpoet'),
'count' => Newsletter::getPublished()
->filter('filterType', $type)
->filter('filterStatus', self::STATUS_SENDING)
@@ -444,7 +444,7 @@ class Newsletter extends Model {
),
array(
'name' => self::STATUS_SENT,
- 'label' => __('Sent', MAILPOET),
+ 'label' => __('Sent', 'mailpoet'),
'count' => Newsletter::getPublished()
->filter('filterType', $type)
->filter('filterStatus', self::STATUS_SENT)
@@ -458,7 +458,7 @@ class Newsletter extends Model {
$groups = array_merge($groups, array(
array(
'name' => self::STATUS_ACTIVE,
- 'label' => __('Active', MAILPOET),
+ 'label' => __('Active', 'mailpoet'),
'count' => Newsletter::getPublished()
->filter('filterType', $type)
->filter('filterStatus', self::STATUS_ACTIVE)
@@ -466,7 +466,7 @@ class Newsletter extends Model {
),
array(
'name' => self::STATUS_DRAFT,
- 'label' => __('Not active', MAILPOET),
+ 'label' => __('Not active', 'mailpoet'),
'count' => Newsletter::getPublished()
->filter('filterType', $type)
->filter('filterStatus', self::STATUS_DRAFT)
@@ -478,7 +478,7 @@ class Newsletter extends Model {
$groups[] = array(
'name' => 'trash',
- 'label' => __('Trash', MAILPOET),
+ 'label' => __('Trash', 'mailpoet'),
'count' => Newsletter::getTrashed()
->filter('filterType', $type)
->count()
diff --git a/lib/Models/NewsletterOptionField.php b/lib/Models/NewsletterOptionField.php
index 7b989aac1b..60beb7e819 100644
--- a/lib/Models/NewsletterOptionField.php
+++ b/lib/Models/NewsletterOptionField.php
@@ -9,10 +9,10 @@ class NewsletterOptionField extends Model {
function __construct() {
parent::__construct();
$this->addValidations('name', array(
- 'required' => __('Please specify a name', MAILPOET)
+ 'required' => __('Please specify a name', 'mailpoet')
));
$this->addValidations('newsletter_type', array(
- 'required' => __('Please specify a newsletter type', MAILPOET)
+ 'required' => __('Please specify a newsletter type', 'mailpoet')
));
}
diff --git a/lib/Models/NewsletterTemplate.php b/lib/Models/NewsletterTemplate.php
index 6cc7bba559..167940eefd 100644
--- a/lib/Models/NewsletterTemplate.php
+++ b/lib/Models/NewsletterTemplate.php
@@ -10,10 +10,10 @@ class NewsletterTemplate extends Model {
parent::__construct();
$this->addValidations('name', array(
- 'required' => __('Please specify a name', MAILPOET)
+ 'required' => __('Please specify a name', 'mailpoet')
));
$this->addValidations('body', array(
- 'required' => __('The template body cannot be empty', MAILPOET)
+ 'required' => __('The template body cannot be empty', 'mailpoet')
));
}
diff --git a/lib/Models/Segment.php b/lib/Models/Segment.php
index 2cad4e948e..d8fa78b1cd 100644
--- a/lib/Models/Segment.php
+++ b/lib/Models/Segment.php
@@ -10,7 +10,7 @@ class Segment extends Model {
parent::__construct();
$this->addValidations('name', array(
- 'required' => __('Please specify a name', MAILPOET)
+ 'required' => __('Please specify a name', 'mailpoet')
));
}
@@ -100,9 +100,9 @@ class Segment extends Model {
// create the wp users segment
$wp_segment = Segment::create();
$wp_segment->hydrate(array(
- 'name' => __('WordPress Users', MAILPOET),
+ 'name' => __('WordPress Users', 'mailpoet'),
'description' =>
- __('This lists containts all of your WordPress users', MAILPOET),
+ __('This lists containts all of your WordPress users', 'mailpoet'),
'type' => 'wp_users'
));
$wp_segment->save();
@@ -119,12 +119,12 @@ class Segment extends Model {
return array(
array(
'name' => 'all',
- 'label' => __('All', MAILPOET),
+ 'label' => __('All', 'mailpoet'),
'count' => Segment::getPublished()->count()
),
array(
'name' => 'trash',
- 'label' => __('Trash', MAILPOET),
+ 'label' => __('Trash', 'mailpoet'),
'count' => Segment::getTrashed()->count()
)
);
@@ -176,7 +176,7 @@ class Segment extends Model {
'AND relation.status = "' . Subscriber::STATUS_SUBSCRIBED . '" ' .
'GROUP BY segments.id) ' .
'UNION ALL ' .
- '(SELECT 0 as id, "' . __('Not in a List', MAILPOET) . '" as name, COUNT(*) as subscribers ' .
+ '(SELECT 0 as id, "' . __('Not in a List', 'mailpoet') . '" as name, COUNT(*) as subscribers ' .
'FROM ' . MP_SUBSCRIBERS_TABLE . ' subscribers ' .
'LEFT JOIN ' . MP_SUBSCRIBER_SEGMENT_TABLE . ' relation on relation.subscriber_id = subscribers.id ' .
(($withConfirmedSubscribers) ?
diff --git a/lib/Models/Setting.php b/lib/Models/Setting.php
index 7c65f34988..f7371727db 100644
--- a/lib/Models/Setting.php
+++ b/lib/Models/Setting.php
@@ -19,7 +19,7 @@ class Setting extends Model {
parent::__construct();
$this->addValidations('name', array(
- 'required' => __('Please specify a name', MAILPOET)
+ 'required' => __('Please specify a name', 'mailpoet')
));
}
@@ -45,8 +45,8 @@ class Setting extends Model {
),
'signup_confirmation' => array(
'enabled' => true,
- 'subject' => sprintf(__('Confirm your subscription to %1$s', MAILPOET), get_option('blogname')),
- 'body' => __("Hello!\n\nHurray! You've subscribed to our site.\n\nPlease confirm your subscription to the list(s): [lists_to_confirm] by clicking the link below: \n\n[activation_link]Click here to confirm your subscription.[/activation_link]\n\nThank you,\n\nThe Team", MAILPOET)
+ 'subject' => sprintf(__('Confirm your subscription to %1$s', 'mailpoet'), get_option('blogname')),
+ 'body' => __("Hello!\n\nHurray! You've subscribed to our site.\n\nPlease confirm your subscription to the list(s): [lists_to_confirm] by clicking the link below: \n\n[activation_link]Click here to confirm your subscription.[/activation_link]\n\nThank you,\n\nThe Team", 'mailpoet')
),
'tracking' => array(
'enabled' => true
diff --git a/lib/Models/Subscriber.php b/lib/Models/Subscriber.php
index 3d9059b022..f7b88b23d9 100644
--- a/lib/Models/Subscriber.php
+++ b/lib/Models/Subscriber.php
@@ -18,8 +18,8 @@ class Subscriber extends Model {
parent::__construct();
$this->addValidations('email', array(
- 'required' => __('Please enter your email address', MAILPOET),
- 'isEmail' => __('Your email address is invalid!', MAILPOET)
+ 'required' => __('Please enter your email address', 'mailpoet'),
+ 'isEmail' => __('Your email address is invalid!', 'mailpoet')
));
}
@@ -214,13 +214,13 @@ class Subscriber extends Model {
$segments = Segment::orderByAsc('name')->findMany();
$segment_list = array();
$segment_list[] = array(
- 'label' => __('All Lists', MAILPOET),
+ 'label' => __('All Lists', 'mailpoet'),
'value' => ''
);
$subscribers_without_segment = self::filter('withoutSegments')->count();
$subscribers_without_segment_label = sprintf(
- __('Subscribers without a list (%s)', MAILPOET),
+ __('Subscribers without a list (%s)', 'mailpoet'),
number_format($subscribers_without_segment)
);
@@ -276,27 +276,27 @@ class Subscriber extends Model {
return array(
array(
'name' => 'all',
- 'label' => __('All', MAILPOET),
+ 'label' => __('All', 'mailpoet'),
'count' => self::getPublished()->count()
),
array(
'name' => self::STATUS_SUBSCRIBED,
- 'label' => __('Subscribed', MAILPOET),
+ 'label' => __('Subscribed', 'mailpoet'),
'count' => self::filter(self::STATUS_SUBSCRIBED)->count()
),
array(
'name' => self::STATUS_UNCONFIRMED,
- 'label' => __('Unconfirmed', MAILPOET),
+ 'label' => __('Unconfirmed', 'mailpoet'),
'count' => self::filter(self::STATUS_UNCONFIRMED)->count()
),
array(
'name' => self::STATUS_UNSUBSCRIBED,
- 'label' => __('Unsubscribed', MAILPOET),
+ 'label' => __('Unsubscribed', 'mailpoet'),
'count' => self::filter(self::STATUS_UNSUBSCRIBED)->count()
),
array(
'name' => 'trash',
- 'label' => __('Trash', MAILPOET),
+ 'label' => __('Trash', 'mailpoet'),
'count' => self::getTrashed()->count()
)
);
diff --git a/lib/Newsletter/Editor/PostContentManager.php b/lib/Newsletter/Editor/PostContentManager.php
index b5bd826dce..82e618e99c 100644
--- a/lib/Newsletter/Editor/PostContentManager.php
+++ b/lib/Newsletter/Editor/PostContentManager.php
@@ -77,7 +77,7 @@ class PostContentManager {
// remove embedded video and replace with links
$content = preg_replace(
'#<\/iframe>#',
- ''.__('Click here to view media.', MAILPOET).' ',
+ ''.__('Click here to view media.', 'mailpoet').' ',
$content
);
diff --git a/lib/Newsletter/Shortcodes/Categories/Link.php b/lib/Newsletter/Shortcodes/Categories/Link.php
index 4aca8ab194..8968fe27c3 100644
--- a/lib/Newsletter/Shortcodes/Categories/Link.php
+++ b/lib/Newsletter/Shortcodes/Categories/Link.php
@@ -24,7 +24,7 @@ class Link {
return sprintf(
'%s ',
$url,
- __('Unsubscribe', MAILPOET)
+ __('Unsubscribe', 'mailpoet')
);
case 'subscription_unsubscribe_url':
@@ -43,7 +43,7 @@ class Link {
return sprintf(
'%s ',
$url,
- __('Manage subscription', MAILPOET)
+ __('Manage subscription', 'mailpoet')
);
case 'subscription_manage_url':
@@ -60,7 +60,7 @@ class Link {
return sprintf(
'%s ',
$url,
- __('View in your browser', MAILPOET)
+ __('View in your browser', 'mailpoet')
);
case 'newsletter_view_in_browser_url':
diff --git a/lib/Newsletter/Shortcodes/ShortcodesHelper.php b/lib/Newsletter/Shortcodes/ShortcodesHelper.php
index 461f155aee..7f8b92a825 100644
--- a/lib/Newsletter/Shortcodes/ShortcodesHelper.php
+++ b/lib/Newsletter/Shortcodes/ShortcodesHelper.php
@@ -7,93 +7,93 @@ class ShortcodesHelper {
static function getShortcodes() {
$shortcodes = array(
- __('Subscriber', MAILPOET) => array(
+ __('Subscriber', 'mailpoet') => array(
array(
- 'text' => __('First Name', MAILPOET),
+ 'text' => __('First Name', 'mailpoet'),
'shortcode' => 'subscriber:firstname | default:reader',
),
array(
- 'text' => __('Last Name', MAILPOET),
+ 'text' => __('Last Name', 'mailpoet'),
'shortcode' => 'subscriber:lastname | default:reader',
),
array(
- 'text' => __('Email Address', MAILPOET),
+ 'text' => __('Email Address', 'mailpoet'),
'shortcode' => 'subscriber:email',
),
array(
- 'text' => __('WordPress User Display Name', MAILPOET),
+ 'text' => __('WordPress User Display Name', 'mailpoet'),
'shortcode' => 'subscriber:displayname | default:member',
),
array(
- 'text' => __('Total Number of Subscribers', MAILPOET),
+ 'text' => __('Total Number of Subscribers', 'mailpoet'),
'shortcode' => 'subscriber:count',
)
),
- __('Newsletter', MAILPOET) => array(
+ __('Newsletter', 'mailpoet') => array(
array(
- 'text' => __('Newsletter Subject', MAILPOET),
+ 'text' => __('Newsletter Subject', 'mailpoet'),
'shortcode' => 'newsletter:subject',
)
),
- __('Post Notifications', MAILPOET) => array(
+ __('Post Notifications', 'mailpoet') => array(
array(
- 'text' => __('Total Number of Posts or Pages', MAILPOET),
+ 'text' => __('Total Number of Posts or Pages', 'mailpoet'),
'shortcode' => 'newsletter:total',
),
array(
- 'text' => __('Most Recent Post Title', MAILPOET),
+ 'text' => __('Most Recent Post Title', 'mailpoet'),
'shortcode' => 'newsletter:post_title',
),
array(
- 'text' => __('Issue Number', MAILPOET),
+ 'text' => __('Issue Number', 'mailpoet'),
'shortcode' => 'newsletter:number',
)
),
- __('Date', MAILPOET) => array(
+ __('Date', 'mailpoet') => array(
array(
- 'text' => __('Current day of the month number', MAILPOET),
+ 'text' => __('Current day of the month number', 'mailpoet'),
'shortcode' => 'date:d',
),
array(
- 'text' => __('Current day of the month in ordinal form, i.e. 2nd, 3rd, 4th, etc.', MAILPOET),
+ 'text' => __('Current day of the month in ordinal form, i.e. 2nd, 3rd, 4th, etc.', 'mailpoet'),
'shortcode' => 'date:dordinal',
),
array(
- 'text' => __('Full name of current day', MAILPOET),
+ 'text' => __('Full name of current day', 'mailpoet'),
'shortcode' => 'date:dtext',
),
array(
- 'text' => __('Current month number', MAILPOET),
+ 'text' => __('Current month number', 'mailpoet'),
'shortcode' => 'date:m',
),
array(
- 'text' => __('Full name of current month', MAILPOET),
+ 'text' => __('Full name of current month', 'mailpoet'),
'shortcode' => 'date:mtext',
),
array(
- 'text' => __('Year', MAILPOET),
+ 'text' => __('Year', 'mailpoet'),
'shortcode' => 'date:y',
)
),
- __('Links', MAILPOET) => array(
+ __('Links', 'mailpoet') => array(
array(
- 'text' => __('Unsubscribe link', MAILPOET),
+ 'text' => __('Unsubscribe link', 'mailpoet'),
'shortcode' => 'link:subscription_unsubscribe',
),
array(
- 'text' => __('Edit subscription page link', MAILPOET),
+ 'text' => __('Edit subscription page link', 'mailpoet'),
'shortcode' => 'link:subscription_manage',
),
array(
- 'text' => __('View in browser link', MAILPOET),
+ 'text' => __('View in browser link', 'mailpoet'),
'shortcode' => 'link:newsletter_view_in_browser',
)
)
);
$custom_fields = self::getCustomFields();
if($custom_fields) {
- $shortcodes[__('Subscriber', MAILPOET)] = array_merge(
- $shortcodes[__('Subscriber', MAILPOET)],
+ $shortcodes[__('Subscriber', 'mailpoet')] = array_merge(
+ $shortcodes[__('Subscriber', 'mailpoet')],
$custom_fields
);
}
diff --git a/lib/Router/Router.php b/lib/Router/Router.php
index 6845f2fb35..769039f662 100644
--- a/lib/Router/Router.php
+++ b/lib/Router/Router.php
@@ -31,11 +31,11 @@ class Router {
$endpoint_class = __NAMESPACE__ . "\\Endpoints\\" . ucfirst($this->endpoint);
if(!$this->api_request) return;
if(!$this->endpoint || !class_exists($endpoint_class)) {
- return $this->terminateRequest(self::RESPONSE_ERROR, __('Invalid router endpoint.', MAILPOET));
+ return $this->terminateRequest(self::RESPONSE_ERROR, __('Invalid router endpoint.', 'mailpoet'));
}
$endpoint = new $endpoint_class($this->data);
if(!method_exists($endpoint, $this->action) || !in_array($this->action, $endpoint->allowed_actions)) {
- return $this->terminateRequest(self::RESPONSE_ERROR, __('Invalid router endpoint action.', MAILPOET));
+ return $this->terminateRequest(self::RESPONSE_ERROR, __('Invalid router endpoint action.', 'mailpoet'));
}
return call_user_func(
array(
diff --git a/lib/Settings/Pages.php b/lib/Settings/Pages.php
index c6981e2c74..9628159a6f 100644
--- a/lib/Settings/Pages.php
+++ b/lib/Settings/Pages.php
@@ -9,8 +9,8 @@ class Pages {
function init() {
register_post_type('mailpoet_page', array(
'labels' => array(
- 'name' => __('MailPoet Page', MAILPOET),
- 'singular_name' => __('MailPoet Page', MAILPOET)
+ 'name' => __('MailPoet Page', 'mailpoet'),
+ 'singular_name' => __('MailPoet Page', 'mailpoet')
),
'public' => true,
'has_archive' => false,
@@ -34,7 +34,7 @@ class Pages {
'post_type' => 'mailpoet_page',
'post_author' => 1,
'post_content' => '[mailpoet_page]',
- 'post_title' => __('MailPoet Page', MAILPOET),
+ 'post_title' => __('MailPoet Page', 'mailpoet'),
'post_name' => 'subscriptions'
));
flush_rewrite_rules();
diff --git a/lib/Subscribers/ImportExport/Export/Export.php b/lib/Subscribers/ImportExport/Export/Export.php
index 6e25522909..b2da493576 100644
--- a/lib/Subscribers/ImportExport/Export/Export.php
+++ b/lib/Subscribers/ImportExport/Export/Export.php
@@ -46,10 +46,10 @@ class Export {
function process() {
try {
if(is_writable($this->export_path) === false) {
- throw new \Exception(__("Couldn't save export file on the server", MAILPOET));
+ throw new \Exception(__("Couldn't save export file on the server", 'mailpoet'));
}
if(!extension_loaded('zip')) {
- throw new \Exception(__('Export requires a ZIP extension to be installed on the host', MAILPOET));
+ throw new \Exception(__('Export requires a ZIP extension to be installed on the host', 'mailpoet'));
}
$processed_subscribers = call_user_func(
array(
@@ -78,7 +78,7 @@ class Export {
// Excel to automatically recognize the encoding
fwrite($CSV_file, chr(0xEF) . chr(0xBB) . chr(0xBF));
if($this->group_by_segment_option) {
- $formatted_subscriber_fields[] = __('List', MAILPOET);
+ $formatted_subscriber_fields[] = __('List', 'mailpoet');
}
fwrite(
$CSV_file,
@@ -166,7 +166,7 @@ class Export {
return $XLSX_writer->writeSheetRow(
($this->group_by_segment_option) ?
ucwords($segment) :
- __('All Lists', MAILPOET),
+ __('All Lists', 'mailpoet'),
$data
);
}
@@ -199,7 +199,7 @@ class Export {
->selectExpr(
'MAX(CASE WHEN ' . Segment::$_table . '.name IS NOT NULL ' .
'THEN ' . Segment::$_table . '.name ' .
- 'ELSE "' . __('Not In Segment', MAILPOET) . '" END) as segment_name'
+ 'ELSE "' . __('Not In Segment', 'mailpoet') . '" END) as segment_name'
)
->whereRaw(
SubscriberSegment::$_table . '.segment_id IN (' .
diff --git a/lib/Subscribers/ImportExport/Import/MailChimp.php b/lib/Subscribers/ImportExport/Import/MailChimp.php
index d76508550d..8ca865626e 100644
--- a/lib/Subscribers/ImportExport/Import/MailChimp.php
+++ b/lib/Subscribers/ImportExport/Import/MailChimp.php
@@ -122,22 +122,22 @@ class MailChimp {
function throwException($error) {
switch($error) {
case 'API':
- $errorMessage = __('Invalid API Key.', MAILPOET);
+ $errorMessage = __('Invalid API Key.', 'mailpoet');
break;
case 'connection':
- $errorMessage = __('Could not connect to your MailChimp account.', MAILPOET);
+ $errorMessage = __('Could not connect to your MailChimp account.', 'mailpoet');
break;
case 'headers':
- $errorMessage = __('The selected lists do not have matching columns (headers).', MAILPOET);
+ $errorMessage = __('The selected lists do not have matching columns (headers).', 'mailpoet');
break;
case 'size':
- $errorMessage = __('The information received from MailChimp is too large for processing. Please limit the number of lists!', MAILPOET);
+ $errorMessage = __('The information received from MailChimp is too large for processing. Please limit the number of lists!', 'mailpoet');
break;
case 'subscribers':
- $errorMessage = __('Did not find any active subscribers.', MAILPOET);
+ $errorMessage = __('Did not find any active subscribers.', 'mailpoet');
break;
case 'lists':
- $errorMessage = __('Did not find any valid lists.', MAILPOET);
+ $errorMessage = __('Did not find any valid lists.', 'mailpoet');
break;
}
throw new \Exception($errorMessage);
diff --git a/lib/Subscribers/ImportExport/ImportExportFactory.php b/lib/Subscribers/ImportExport/ImportExportFactory.php
index 8fe1ef13b3..7320e12b9d 100644
--- a/lib/Subscribers/ImportExport/ImportExportFactory.php
+++ b/lib/Subscribers/ImportExport/ImportExportFactory.php
@@ -17,7 +17,7 @@ class ImportExportFactory {
Segment::getSegmentsWithSubscriberCount() :
Segment::getSegmentsForExport($with_confirmed_subscribers);
return array_map(function($segment) {
- if(!$segment['name']) $segment['name'] = __('Not In List', MAILPOET);
+ if(!$segment['name']) $segment['name'] = __('Not In List', 'mailpoet');
if(!$segment['id']) $segment['id'] = 0;
return array(
'id' => $segment['id'],
@@ -29,10 +29,10 @@ class ImportExportFactory {
function getSubscriberFields() {
return array(
- 'email' => __('Email', MAILPOET),
- 'first_name' => __('First name', MAILPOET),
- 'last_name' => __('Last name', MAILPOET),
- 'status' => __('Status', MAILPOET)
+ 'email' => __('Email', 'mailpoet'),
+ 'first_name' => __('First name', 'mailpoet'),
+ 'last_name' => __('Last name', 'mailpoet'),
+ 'status' => __('Status', 'mailpoet')
// TODO: add additional fields from MP2
);
}
@@ -71,36 +71,36 @@ class ImportExportFactory {
array(
array(
'id' => 'ignore',
- 'name' => __('Ignore field...', MAILPOET),
+ 'name' => __('Ignore field...', 'mailpoet'),
),
array(
'id' => 'create',
- 'name' => __('Create new field...', MAILPOET)
+ 'name' => __('Create new field...', 'mailpoet')
),
) :
array(
array(
'id' => 'select',
- 'name' => __('Select all...', MAILPOET),
+ 'name' => __('Select all...', 'mailpoet'),
),
array(
'id' => 'deselect',
- 'name' => __('Deselect all...', MAILPOET)
+ 'name' => __('Deselect all...', 'mailpoet')
),
);
$select2Fields = array(
array(
- 'name' => __('Actions', MAILPOET),
+ 'name' => __('Actions', 'mailpoet'),
'children' => $actions
),
array(
- 'name' => __('System fields', MAILPOET),
+ 'name' => __('System fields', 'mailpoet'),
'children' => $this->formatSubscriberFields($subscriber_fields)
)
);
if($subscriber_custom_fields) {
array_push($select2Fields, array(
- 'name' => __('User fields', MAILPOET),
+ 'name' => __('User fields', 'mailpoet'),
'children' => $this->formatSubscriberCustomFields(
$subscriber_custom_fields
)
diff --git a/lib/Subscription/Comment.php b/lib/Subscription/Comment.php
index 81b1fbc18c..99193d52da 100644
--- a/lib/Subscription/Comment.php
+++ b/lib/Subscription/Comment.php
@@ -20,7 +20,7 @@ class Comment {
static function getSubscriptionField() {
$label = Setting::getValue(
'subscribe.on_comment.label',
- __('Yes, please add me to your mailing list', MAILPOET)
+ __('Yes, please add me to your mailing list', 'mailpoet')
);
return '';
@@ -361,7 +361,7 @@ class Pages {
private function getUnsubscribeContent() {
$content = '';
if($this->isPreview() || $this->subscriber !== false) {
- $content .= ''.__('Accidentally unsubscribed?', MAILPOET).' ';
+ $content .= ''.__('Accidentally unsubscribed?', 'mailpoet').' ';
$content .= '[mailpoet_manage]';
$content .= '
';
}
@@ -373,7 +373,7 @@ class Pages {
$text = (
isset($params['text'])
? $params['text']
- : __('Manage your subscription', MAILPOET)
+ : __('Manage your subscription', 'mailpoet')
);
return '
diff --git a/lib/Twig/Functions.php b/lib/Twig/Functions.php
index dd509beac4..a64e165518 100644
--- a/lib/Twig/Functions.php
+++ b/lib/Twig/Functions.php
@@ -76,10 +76,10 @@ class Functions extends \Twig_Extension {
$label = null;
$labels = array(
- 'minute' => __('every minute', MAILPOET),
- 'minutes' => __('every %1$d minutes', MAILPOET),
- 'hour' => __('every hour', MAILPOET),
- 'hours' => __('every %1$d hours', MAILPOET)
+ 'minute' => __('every minute', 'mailpoet'),
+ 'minutes' => __('every %1$d minutes', 'mailpoet'),
+ 'hour' => __('every hour', 'mailpoet'),
+ 'hours' => __('every %1$d hours', 'mailpoet')
);
if($value >= 60) {
diff --git a/lib/WP/Notice.php b/lib/WP/Notice.php
index c39164fe4e..88108fc52a 100644
--- a/lib/WP/Notice.php
+++ b/lib/WP/Notice.php
@@ -19,7 +19,7 @@ class Notice {
static function displayError($message) {
$message = sprintf(
"%s %s",
- __('MailPoet Error:', MAILPOET),
+ __('MailPoet Error:', 'mailpoet'),
$message
);
self::createNotice(self::TYPE_ERROR, $message);
diff --git a/mailpoet.php b/mailpoet.php
index da118a7aac..4bc48af0a5 100644
--- a/mailpoet.php
+++ b/mailpoet.php
@@ -22,7 +22,6 @@ use \MailPoet\Config\Initializer;
require 'vendor/autoload.php';
-define('MAILPOET', 'mailpoet');
define('MAILPOET_VERSION', '0.0.46');
$initializer = new Initializer(array(