Merge pull request #627 from mailpoet/translations

Translations
This commit is contained in:
Tautvidas Sipavičius
2016-10-05 12:26:03 +03:00
committed by GitHub
61 changed files with 375 additions and 4536 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"));
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'));
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');
$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'),
__('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') . '" 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.');
$errorMessage = __('Invalid API Key.', 'mailpoet');
break;
case 'connection':
$errorMessage = __('Could not connect to your MailChimp account.');
$errorMessage = __('Could not connect to your MailChimp account.', 'mailpoet');
break;
case 'headers':
$errorMessage = __('The selected lists do not have matching columns (headers).');
$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!');
$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.');
$errorMessage = __('Did not find any active subscribers.', 'mailpoet');
break;
case 'lists':
$errorMessage = __('Did not find any valid lists.');
$errorMessage = __('Did not find any valid lists.', 'mailpoet');
break;
}
throw new \Exception($errorMessage);

View File

@ -17,7 +17,7 @@ class ImportExportFactory {
Segment::getSegmentsForImport() :
Segment::getSegmentsForExport($with_confirmed_subscribers);
return array_map(function($segment) {
if(!$segment['name']) $segment['name'] = __('Not In List');
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'),
'first_name' => __('First name'),
'last_name' => __('Last name'),
'status' => __('Status')
'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...'),
'name' => __('Ignore field...', 'mailpoet'),
),
array(
'id' => 'create',
'name' => __('Create new field...')
'name' => __('Create new field...', 'mailpoet')
),
) :
array(
array(
'id' => 'select',
'name' => __('Select all...'),
'name' => __('Select all...', 'mailpoet'),
),
array(
'id' => 'deselect',
'name' => __('Deselect all...')
'name' => __('Deselect all...', 'mailpoet')
),
);
$select2Fields = array(
array(
'name' => __('Actions'),
'name' => __('Actions', 'mailpoet'),
'children' => $actions
),
array(
'name' => __('System fields'),
'name' => __('System fields', 'mailpoet'),
'children' => $this->formatSubscriberFields($subscriber_fields)
)
);
if($subscriber_custom_fields) {
array_push($select2Fields, array(
'name' => __('User fields'),
'name' => __('User fields', 'mailpoet'),
'children' => $this->formatSubscriberCustomFields(
$subscriber_custom_fields
)