Finish changing segments to lists and columns to fields
This commit is contained in:
@@ -218,7 +218,7 @@ class Subscriber extends Model {
|
|||||||
|
|
||||||
$subscribers_without_segment = self::filter('withoutSegments')->count();
|
$subscribers_without_segment = self::filter('withoutSegments')->count();
|
||||||
$subscribers_without_segment_label = sprintf(
|
$subscribers_without_segment_label = sprintf(
|
||||||
__('Subscribers without a segment (%s)'),
|
__('Subscribers without a list (%s)'),
|
||||||
number_format($subscribers_without_segment)
|
number_format($subscribers_without_segment)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@@ -84,7 +84,7 @@ class Export {
|
|||||||
// Excel to automatically recognize the encoding
|
// Excel to automatically recognize the encoding
|
||||||
fwrite($CSV_file, chr(0xEF) . chr(0xBB) . chr(0xBF));
|
fwrite($CSV_file, chr(0xEF) . chr(0xBB) . chr(0xBF));
|
||||||
if($this->group_by_segment_option) {
|
if($this->group_by_segment_option) {
|
||||||
$formatted_subscriber_fields[] = __('Segment');
|
$formatted_subscriber_fields[] = __('List');
|
||||||
}
|
}
|
||||||
fwrite(
|
fwrite(
|
||||||
$CSV_file,
|
$CSV_file,
|
||||||
|
@@ -17,7 +17,7 @@ class ImportExportFactory {
|
|||||||
Segment::getSegmentsWithSubscriberCount() :
|
Segment::getSegmentsWithSubscriberCount() :
|
||||||
Segment::getSegmentsForExport($with_confirmed_subscribers);
|
Segment::getSegmentsForExport($with_confirmed_subscribers);
|
||||||
return array_map(function($segment) {
|
return array_map(function($segment) {
|
||||||
if(!$segment['name']) $segment['name'] = __('Not In Segment');
|
if(!$segment['name']) $segment['name'] = __('Not In List');
|
||||||
if(!$segment['id']) $segment['id'] = 0;
|
if(!$segment['id']) $segment['id'] = 0;
|
||||||
return array(
|
return array(
|
||||||
'id' => $segment['id'],
|
'id' => $segment['id'],
|
||||||
@@ -70,11 +70,11 @@ class ImportExportFactory {
|
|||||||
array(
|
array(
|
||||||
array(
|
array(
|
||||||
'id' => 'ignore',
|
'id' => 'ignore',
|
||||||
'name' => __('Ignore column...'),
|
'name' => __('Ignore field...'),
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'id' => 'create',
|
'id' => 'create',
|
||||||
'name' => __('Create new column...')
|
'name' => __('Create new field...')
|
||||||
),
|
),
|
||||||
) :
|
) :
|
||||||
array(
|
array(
|
||||||
@@ -93,13 +93,13 @@ class ImportExportFactory {
|
|||||||
'children' => $actions
|
'children' => $actions
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'name' => __('System columns'),
|
'name' => __('System fields'),
|
||||||
'children' => $this->formatSubscriberFields($subscriber_fields)
|
'children' => $this->formatSubscriberFields($subscriber_fields)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
if($subscriber_custom_fields) {
|
if($subscriber_custom_fields) {
|
||||||
array_push($select2Fields, array(
|
array_push($select2Fields, array(
|
||||||
'name' => __('User columns'),
|
'name' => __('User fields'),
|
||||||
'children' => $this->formatSubscriberCustomFields(
|
'children' => $this->formatSubscriberCustomFields(
|
||||||
$subscriber_custom_fields
|
$subscriber_custom_fields
|
||||||
)
|
)
|
||||||
|
@@ -168,16 +168,16 @@ class ImportExportFactoryTest extends MailPoetTest {
|
|||||||
'children' => array(
|
'children' => array(
|
||||||
array(
|
array(
|
||||||
'id' => 'ignore',
|
'id' => 'ignore',
|
||||||
'name' => 'Ignore column...',
|
'name' => 'Ignore field...',
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'id' => 'create',
|
'id' => 'create',
|
||||||
'name' => 'Create new column...'
|
'name' => 'Create new field...'
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'name' => 'System columns',
|
'name' => 'System fields',
|
||||||
'children' => $ImportExportFactory->formatSubscriberFields(
|
'children' => $ImportExportFactory->formatSubscriberFields(
|
||||||
$ImportExportFactory->getSubscriberFields()
|
$ImportExportFactory->getSubscriberFields()
|
||||||
)
|
)
|
||||||
@@ -187,7 +187,7 @@ class ImportExportFactoryTest extends MailPoetTest {
|
|||||||
$select2FieldsWithoutCustomFields,
|
$select2FieldsWithoutCustomFields,
|
||||||
array(
|
array(
|
||||||
array(
|
array(
|
||||||
'name' => __('User columns'),
|
'name' => __('User fields'),
|
||||||
'children' => $ImportExportFactory->formatSubscriberCustomFields(
|
'children' => $ImportExportFactory->formatSubscriberCustomFields(
|
||||||
$ImportExportFactory->getSubscriberCustomFields()
|
$ImportExportFactory->getSubscriberCustomFields()
|
||||||
)
|
)
|
||||||
@@ -222,7 +222,7 @@ class ImportExportFactoryTest extends MailPoetTest {
|
|||||||
)
|
)
|
||||||
),
|
),
|
||||||
array(
|
array(
|
||||||
'name' => 'System columns',
|
'name' => 'System fields',
|
||||||
'children' => $ImportExportFactory->formatSubscriberFields(
|
'children' => $ImportExportFactory->formatSubscriberFields(
|
||||||
$ImportExportFactory->getSubscriberFields()
|
$ImportExportFactory->getSubscriberFields()
|
||||||
)
|
)
|
||||||
@@ -232,7 +232,7 @@ class ImportExportFactoryTest extends MailPoetTest {
|
|||||||
$select2FieldsWithoutCustomFields,
|
$select2FieldsWithoutCustomFields,
|
||||||
array(
|
array(
|
||||||
array(
|
array(
|
||||||
'name' => __('User columns'),
|
'name' => __('User fields'),
|
||||||
'children' => $ImportExportFactory->formatSubscriberCustomFields(
|
'children' => $ImportExportFactory->formatSubscriberCustomFields(
|
||||||
$ImportExportFactory->getSubscriberCustomFields()
|
$ImportExportFactory->getSubscriberCustomFields()
|
||||||
)
|
)
|
||||||
@@ -258,7 +258,7 @@ class ImportExportFactoryTest extends MailPoetTest {
|
|||||||
// email, first_name, last_name, status + 1 custom field
|
// email, first_name, last_name, status + 1 custom field
|
||||||
expect(count(json_decode($importMenu['subscriberFields'], true)))
|
expect(count(json_decode($importMenu['subscriberFields'], true)))
|
||||||
->equals(5);
|
->equals(5);
|
||||||
// action, system columns, user columns
|
// action, system fields, user fields
|
||||||
expect(count(json_decode($importMenu['subscriberFieldsSelect2'], true)))
|
expect(count(json_decode($importMenu['subscriberFieldsSelect2'], true)))
|
||||||
->equals(3);
|
->equals(3);
|
||||||
expect($importMenu['maxPostSize'])->equals(ini_get('post_max_size'));
|
expect($importMenu['maxPostSize'])->equals(ini_get('post_max_size'));
|
||||||
@@ -272,7 +272,7 @@ class ImportExportFactoryTest extends MailPoetTest {
|
|||||||
$exportMenu = $export->bootstrap();
|
$exportMenu = $export->bootstrap();
|
||||||
expect(count(json_decode($exportMenu['segments'], true)))
|
expect(count(json_decode($exportMenu['segments'], true)))
|
||||||
->equals(2);
|
->equals(2);
|
||||||
// action, system columns, user columns
|
// action, system fields, user fields
|
||||||
expect(count(json_decode($exportMenu['subscriberFieldsSelect2'], true)))
|
expect(count(json_decode($exportMenu['subscriberFieldsSelect2'], true)))
|
||||||
->equals(3);
|
->equals(3);
|
||||||
}
|
}
|
||||||
|
@@ -48,10 +48,10 @@
|
|||||||
'segmentSelectionRequired': __('Please select at least one list'),
|
'segmentSelectionRequired': __('Please select at least one list'),
|
||||||
'addNewList': __('Add new list'),
|
'addNewList': __('Add new list'),
|
||||||
'addNewColumuserColumnsn': __('Add new list'),
|
'addNewColumuserColumnsn': __('Add new list'),
|
||||||
'userColumns': __('User columns'),
|
'userColumns': __('User fields'),
|
||||||
'selectedValueAlreadyMatched': __('The selected value is already matched to another column'),
|
'selectedValueAlreadyMatched': __('The selected value is already matched to another field'),
|
||||||
'confirmCorrespondingColumn': __('Confirm that this column corresponds to the selected field'),
|
'confirmCorrespondingColumn': __('Confirm that this field corresponds to the selected field'),
|
||||||
'columnContainInvalidElement': __('One of the columns contains an invalid email. Please fix it before continuing'),
|
'columnContainInvalidElement': __('One of the fields contains an invalid email. Please fix it before continuing'),
|
||||||
'january': __('January'),
|
'january': __('January'),
|
||||||
'february': __('February'),
|
'february': __('February'),
|
||||||
'march': __('March'),
|
'march': __('March'),
|
||||||
@@ -64,15 +64,15 @@
|
|||||||
'october': __('October'),
|
'october': __('October'),
|
||||||
'november': __('November'),
|
'november': __('November'),
|
||||||
'december': __('December'),
|
'december': __('December'),
|
||||||
'noDateFieldMatch': __("Do not match as a 'date field' if most of the rows for that column return the same error"),
|
'noDateFieldMatch': __("Do not match as a 'date field' if most of the rows for that field return the same error"),
|
||||||
'emptyDate': __('Date cannot be empty'),
|
'emptyDate': __('Date cannot be empty'),
|
||||||
'verifyDateMatch': __('Verify that the date in blue matches the original date'),
|
'verifyDateMatch': __('Verify that the date in blue matches the original date'),
|
||||||
'pm': __('PM'),
|
'pm': __('PM'),
|
||||||
'am': __('AM'),
|
'am': __('AM'),
|
||||||
'dateMatchError': __('Error matching date'),
|
'dateMatchError': __('Error matching date'),
|
||||||
'columnContainsInvalidDate': __('One of the columns contains an invalid date. Please fix it before continuing'),
|
'columnContainsInvalidDate': __('One of the fields contains an invalid date. Please fix it before continuing'),
|
||||||
'listCreateError': __('Error adding a new list:'),
|
'listCreateError': __('Error adding a new list:'),
|
||||||
'columnContainsInvalidElement': __('One of the columns contains an invalid email. Please fix before continuing'),
|
'columnContainsInvalidElement': __('One of the fields contains an invalid email. Please fix before continuing'),
|
||||||
'customFieldCreateError': __('Custom field could not be created'),
|
'customFieldCreateError': __('Custom field could not be created'),
|
||||||
'subscribersCreated': __('%1$s subscribers added to %2$s.'),
|
'subscribersCreated': __('%1$s subscribers added to %2$s.'),
|
||||||
'subscribersUpdated': __('%1$s existing subscribers were updated and added to %2$s')
|
'subscribersUpdated': __('%1$s existing subscribers were updated and added to %2$s')
|
||||||
|
Reference in New Issue
Block a user