diff --git a/lib/API/MP/v1/API.php b/lib/API/MP/v1/API.php index 7810808518..abe4c16de3 100644 --- a/lib/API/MP/v1/API.php +++ b/lib/API/MP/v1/API.php @@ -84,7 +84,7 @@ class API { // throw exception when none of the segments exist $found_segments = Segment::whereIn('id', $segments_ids)->findMany(); if (!$found_segments) { - $exception = WPFunctions::get()->n('This list does not exist.', 'These lists do not exist.', count($segments_ids), 'mailpoet'); + $exception = WPFunctions::get()->_n('This list does not exist.', 'These lists do not exist.', count($segments_ids), 'mailpoet'); throw new \Exception($exception); } @@ -104,7 +104,7 @@ class API { if (count($found_segments_ids) !== count($segments_ids)) { $missing_ids = array_values(array_diff($segments_ids, $found_segments_ids)); $exception = sprintf( - WPFunctions::get()->n('List with ID %s does not exist.', 'Lists with IDs %s do not exist.', count($missing_ids), 'mailpoet'), + WPFunctions::get()->_n('List with ID %s does not exist.', 'Lists with IDs %s do not exist.', count($missing_ids), 'mailpoet'), implode(', ', $missing_ids) ); throw new \Exception(sprintf($exception, implode(', ', $missing_ids))); @@ -152,7 +152,7 @@ class API { // throw exception when none of the segments exist $found_segments = Segment::whereIn('id', $segments_ids)->findMany(); if (!$found_segments) { - $exception = WPFunctions::get()->n('This list does not exist.', 'These lists do not exist.', count($segments_ids), 'mailpoet'); + $exception = WPFunctions::get()->_n('This list does not exist.', 'These lists do not exist.', count($segments_ids), 'mailpoet'); throw new \Exception($exception); } @@ -172,7 +172,7 @@ class API { if (count($found_segments_ids) !== count($segments_ids)) { $missing_ids = array_values(array_diff($segments_ids, $found_segments_ids)); $exception = sprintf( - WPFunctions::get()->n('List with ID %s does not exist.', 'Lists with IDs %s do not exist.', count($missing_ids), 'mailpoet'), + WPFunctions::get()->_n('List with ID %s does not exist.', 'Lists with IDs %s do not exist.', count($missing_ids), 'mailpoet'), implode(', ', $missing_ids) ); throw new \Exception($exception); diff --git a/lib/Config/Menu.php b/lib/Config/Menu.php index e01810eeaa..ec00fe98c6 100644 --- a/lib/Config/Menu.php +++ b/lib/Config/Menu.php @@ -156,7 +156,7 @@ class Menu { // add limit per page to screen options $this->wp->addAction('load-' . $newsletters_page, function() { $this->wp->addScreenOption('per_page', [ - 'label' => $this->wp->x( + 'label' => $this->wp->_x( 'Number of newsletters per page', 'newsletters per page (screen options)', 'mailpoet' @@ -194,7 +194,7 @@ class Menu { // add limit per page to screen options $this->wp->addAction('load-' . $forms_page, function() { $this->wp->addScreenOption('per_page', [ - 'label' => $this->wp->x( + 'label' => $this->wp->_x( 'Number of forms per page', 'forms per page (screen options)', 'mailpoet' @@ -232,7 +232,7 @@ class Menu { // add limit per page to screen options $this->wp->addAction('load-' . $subscribers_page, function() { $this->wp->addScreenOption('per_page', [ - 'label' => $this->wp->x( + 'label' => $this->wp->_x( 'Number of subscribers per page', 'subscribers per page (screen options)', 'mailpoet' @@ -283,7 +283,7 @@ class Menu { // add limit per page to screen options $this->wp->addAction('load-' . $segments_page, function() { $this->wp->addScreenOption('per_page', [ - 'label' => $this->wp->x( + 'label' => $this->wp->_x( 'Number of segments per page', 'segments per page (screen options)', 'mailpoet' diff --git a/lib/Config/Populator.php b/lib/Config/Populator.php index d9fce62b71..d838ae3f46 100644 --- a/lib/Config/Populator.php +++ b/lib/Config/Populator.php @@ -243,7 +243,7 @@ class Populator { if (empty($woocommerce_optin_on_checkout)) { $this->settings->set('woocommerce.optin_on_checkout', [ 'enabled' => empty($settings_db_version), // enable on new installs only - 'message' => WPFunctions::get()->x('Yes, I would like to be added to your mailing list', "default email opt-in message displayed on checkout page for ecommerce websites"), + 'message' => WPFunctions::get()->_x('Yes, I would like to be added to your mailing list', "default email opt-in message displayed on checkout page for ecommerce websites"), ]); } diff --git a/lib/Config/PopulatorData/DefaultForm.php b/lib/Config/PopulatorData/DefaultForm.php index 39fee3431d..11139b3ac1 100644 --- a/lib/Config/PopulatorData/DefaultForm.php +++ b/lib/Config/PopulatorData/DefaultForm.php @@ -10,32 +10,32 @@ use MailPoet\WP\Functions as WPFunctions; class DefaultForm { public function getName() { - return WPFunctions::get()->x('A GDPR friendly form', 'default name of form (GDPR friendly) to capture emails', 'mailpoet'); + return WPFunctions::get()->_x('A GDPR friendly form', 'default name of form (GDPR friendly) to capture emails', 'mailpoet'); } public function getBody() { return [ [ 'type' => 'text', - 'name' => WPFunctions::get()->x('First name', 'Form label', 'mailpoet'), + 'name' => WPFunctions::get()->_x('First name', 'Form label', 'mailpoet'), 'id' => 'first_name', 'unique' => '1', 'static' => '0', - 'params' => ['label' => WPFunctions::get()->x('First name', 'Form label', 'mailpoet')], + 'params' => ['label' => WPFunctions::get()->_x('First name', 'Form label', 'mailpoet')], 'position' => '1', ], [ 'type' => 'text', - 'name' => WPFunctions::get()->x('Email', 'Form label', 'mailpoet'), + 'name' => WPFunctions::get()->_x('Email', 'Form label', 'mailpoet'), 'id' => 'email', 'unique' => '0', 'static' => '1', - 'params' => ['label' => WPFunctions::get()->x('Email', 'Form label', 'mailpoet'), 'required' => 'true'], + 'params' => ['label' => WPFunctions::get()->_x('Email', 'Form label', 'mailpoet'), 'required' => 'true'], 'position' => '2', ], [ 'type' => 'html', - 'name' => WPFunctions::get()->x('Custom text or HTML', 'Form label', 'mailpoet'), + 'name' => WPFunctions::get()->_x('Custom text or HTML', 'Form label', 'mailpoet'), 'id' => 'html', 'unique' => '0', 'static' => '0', @@ -47,11 +47,11 @@ class DefaultForm { ], [ 'type' => 'submit', - 'name' => WPFunctions::get()->x('Submit', 'Form label', 'mailpoet'), + 'name' => WPFunctions::get()->_x('Submit', 'Form label', 'mailpoet'), 'id' => 'submit', 'unique' => '0', 'static' => '1', - 'params' => ['label' => WPFunctions::get()->x('Subscribe!', 'Form label', 'mailpoet')], + 'params' => ['label' => WPFunctions::get()->_x('Subscribe!', 'Form label', 'mailpoet')], 'position' => '4', ], ]; diff --git a/lib/Form/Widget.php b/lib/Form/Widget.php index 54127b5189..7d0031fc87 100644 --- a/lib/Form/Widget.php +++ b/lib/Form/Widget.php @@ -200,7 +200,7 @@ EOL; // get forms list $forms = Form::getPublished()->orderByAsc('name')->findArray(); ?>

- +

- e('Create a new form', 'mailpoet'); ?> + _e('Create a new form', 'mailpoet'); ?>