converted text domain to string instead of constant

This commit is contained in:
Jonathan Labreuille
2016-09-30 09:58:26 +02:00
parent 42202f676a
commit 7fbf84db1f
57 changed files with 365 additions and 366 deletions

View File

@@ -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 (' .

View File

@@ -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);

View 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 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
)