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_label = sprintf(
|
||||
__('Subscribers without a segment (%s)'),
|
||||
__('Subscribers without a list (%s)'),
|
||||
number_format($subscribers_without_segment)
|
||||
);
|
||||
|
||||
|
@@ -84,7 +84,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[] = __('Segment');
|
||||
$formatted_subscriber_fields[] = __('List');
|
||||
}
|
||||
fwrite(
|
||||
$CSV_file,
|
||||
|
@@ -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 Segment');
|
||||
if(!$segment['name']) $segment['name'] = __('Not In List');
|
||||
if(!$segment['id']) $segment['id'] = 0;
|
||||
return array(
|
||||
'id' => $segment['id'],
|
||||
@@ -70,11 +70,11 @@ class ImportExportFactory {
|
||||
array(
|
||||
array(
|
||||
'id' => 'ignore',
|
||||
'name' => __('Ignore column...'),
|
||||
'name' => __('Ignore field...'),
|
||||
),
|
||||
array(
|
||||
'id' => 'create',
|
||||
'name' => __('Create new column...')
|
||||
'name' => __('Create new field...')
|
||||
),
|
||||
) :
|
||||
array(
|
||||
@@ -93,13 +93,13 @@ class ImportExportFactory {
|
||||
'children' => $actions
|
||||
),
|
||||
array(
|
||||
'name' => __('System columns'),
|
||||
'name' => __('System fields'),
|
||||
'children' => $this->formatSubscriberFields($subscriber_fields)
|
||||
)
|
||||
);
|
||||
if($subscriber_custom_fields) {
|
||||
array_push($select2Fields, array(
|
||||
'name' => __('User columns'),
|
||||
'name' => __('User fields'),
|
||||
'children' => $this->formatSubscriberCustomFields(
|
||||
$subscriber_custom_fields
|
||||
)
|
||||
|
@@ -168,16 +168,16 @@ class ImportExportFactoryTest extends MailPoetTest {
|
||||
'children' => array(
|
||||
array(
|
||||
'id' => 'ignore',
|
||||
'name' => 'Ignore column...',
|
||||
'name' => 'Ignore field...',
|
||||
),
|
||||
array(
|
||||
'id' => 'create',
|
||||
'name' => 'Create new column...'
|
||||
'name' => 'Create new field...'
|
||||
),
|
||||
)
|
||||
),
|
||||
array(
|
||||
'name' => 'System columns',
|
||||
'name' => 'System fields',
|
||||
'children' => $ImportExportFactory->formatSubscriberFields(
|
||||
$ImportExportFactory->getSubscriberFields()
|
||||
)
|
||||
@@ -187,7 +187,7 @@ class ImportExportFactoryTest extends MailPoetTest {
|
||||
$select2FieldsWithoutCustomFields,
|
||||
array(
|
||||
array(
|
||||
'name' => __('User columns'),
|
||||
'name' => __('User fields'),
|
||||
'children' => $ImportExportFactory->formatSubscriberCustomFields(
|
||||
$ImportExportFactory->getSubscriberCustomFields()
|
||||
)
|
||||
@@ -222,7 +222,7 @@ class ImportExportFactoryTest extends MailPoetTest {
|
||||
)
|
||||
),
|
||||
array(
|
||||
'name' => 'System columns',
|
||||
'name' => 'System fields',
|
||||
'children' => $ImportExportFactory->formatSubscriberFields(
|
||||
$ImportExportFactory->getSubscriberFields()
|
||||
)
|
||||
@@ -232,7 +232,7 @@ class ImportExportFactoryTest extends MailPoetTest {
|
||||
$select2FieldsWithoutCustomFields,
|
||||
array(
|
||||
array(
|
||||
'name' => __('User columns'),
|
||||
'name' => __('User fields'),
|
||||
'children' => $ImportExportFactory->formatSubscriberCustomFields(
|
||||
$ImportExportFactory->getSubscriberCustomFields()
|
||||
)
|
||||
@@ -258,7 +258,7 @@ class ImportExportFactoryTest extends MailPoetTest {
|
||||
// email, first_name, last_name, status + 1 custom field
|
||||
expect(count(json_decode($importMenu['subscriberFields'], true)))
|
||||
->equals(5);
|
||||
// action, system columns, user columns
|
||||
// action, system fields, user fields
|
||||
expect(count(json_decode($importMenu['subscriberFieldsSelect2'], true)))
|
||||
->equals(3);
|
||||
expect($importMenu['maxPostSize'])->equals(ini_get('post_max_size'));
|
||||
@@ -272,7 +272,7 @@ class ImportExportFactoryTest extends MailPoetTest {
|
||||
$exportMenu = $export->bootstrap();
|
||||
expect(count(json_decode($exportMenu['segments'], true)))
|
||||
->equals(2);
|
||||
// action, system columns, user columns
|
||||
// action, system fields, user fields
|
||||
expect(count(json_decode($exportMenu['subscriberFieldsSelect2'], true)))
|
||||
->equals(3);
|
||||
}
|
||||
@@ -283,4 +283,4 @@ class ImportExportFactoryTest extends MailPoetTest {
|
||||
SubscriberSegment::deleteMany();
|
||||
CustomField::deleteMany();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -48,10 +48,10 @@
|
||||
'segmentSelectionRequired': __('Please select at least one list'),
|
||||
'addNewList': __('Add new list'),
|
||||
'addNewColumuserColumnsn': __('Add new list'),
|
||||
'userColumns': __('User columns'),
|
||||
'selectedValueAlreadyMatched': __('The selected value is already matched to another column'),
|
||||
'confirmCorrespondingColumn': __('Confirm that this column corresponds to the selected field'),
|
||||
'columnContainInvalidElement': __('One of the columns contains an invalid email. Please fix it before continuing'),
|
||||
'userColumns': __('User fields'),
|
||||
'selectedValueAlreadyMatched': __('The selected value is already matched to another field'),
|
||||
'confirmCorrespondingColumn': __('Confirm that this field corresponds to the selected field'),
|
||||
'columnContainInvalidElement': __('One of the fields contains an invalid email. Please fix it before continuing'),
|
||||
'january': __('January'),
|
||||
'february': __('February'),
|
||||
'march': __('March'),
|
||||
@@ -64,15 +64,15 @@
|
||||
'october': __('October'),
|
||||
'november': __('November'),
|
||||
'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'),
|
||||
'verifyDateMatch': __('Verify that the date in blue matches the original date'),
|
||||
'pm': __('PM'),
|
||||
'am': __('AM'),
|
||||
'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:'),
|
||||
'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'),
|
||||
'subscribersCreated': __('%1$s subscribers added to %2$s.'),
|
||||
'subscribersUpdated': __('%1$s existing subscribers were updated and added to %2$s')
|
||||
|
Reference in New Issue
Block a user