Rename 'not in a list' option

[MAILPOET-3462]
This commit is contained in:
wxa
2021-03-09 17:02:03 +03:00
committed by Veljko V
parent 2f6a223c4f
commit 19dd9180bd
3 changed files with 6 additions and 6 deletions

View File

@ -266,7 +266,7 @@ class Segment extends Model {
'AND subscribers.deleted_at IS NULL ' .
'GROUP BY segments.id) ' .
'UNION ALL ' .
'(SELECT 0 as id, "' . WPFunctions::get()->__('Not in a List', 'mailpoet') . '" as name, COUNT(*) as subscribers ' .
'(SELECT 0 as id, "' . WPFunctions::get()->__('Subscribers without 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 ' .
'WHERE relation.subscriber_id is NULL ' .

View File

@ -54,7 +54,7 @@ class SegmentsSimpleListRepository {
$segments[] = [
'id' => '0',
'type' => SegmentEntity::TYPE_WITHOUT_LIST,
'name' => __('Not in a List', 'mailpoet'),
'name' => __('Subscribers without a list', 'mailpoet'),
'subscribers' => $this->segmentsSubscriberRepository->getSubscribersWithoutSegmentCount(),
];
return $segments;

View File

@ -263,10 +263,10 @@ class SegmentTest extends \MailPoetTest {
}
}
$segments = Segment::getSegmentsForExport();
expect($segments[0]['name'])->equals('Not in a List');
expect($segments[0]['subscribers'])->equals(3);
expect($segments[1]['name'])->equals($this->segmentData['name']);
expect($segments[1]['subscribers'])->equals(1);
expect($segments[1]['name'])->equals('Subscribers without a list');
expect($segments[1]['subscribers'])->equals(3);
expect($segments[0]['name'])->equals($this->segmentData['name']);
expect($segments[0]['subscribers'])->equals(1);
}
public function _after() {