Translate cron, forms, newsletters, segments and subscribers
This commit is contained in:
@@ -54,22 +54,22 @@ define(
|
||||
},
|
||||
render: function() {
|
||||
if(this.state.status === 'loading') {
|
||||
return(<div>Loading daemon status...</div>);
|
||||
return(<div>{MailPoet.I18n.t('loadingDaemonStatus')}</div>);
|
||||
}
|
||||
switch(this.state.status) {
|
||||
case 'started':
|
||||
return(
|
||||
<div>
|
||||
Cron daemon is running.
|
||||
{MailPoet.I18n.t('cronDaemonIsRunning')}
|
||||
<br/>
|
||||
<br/>
|
||||
It was started
|
||||
<strong> {this.state.timeSinceStart} </strong> and last executed
|
||||
<strong> {this.state.timeSinceUpdate} </strong> for a total of
|
||||
<strong> {this.state.counter} </strong> times (once every 30 seconds, unless it was interrupted and restarted).
|
||||
{MailPoet.I18n.t('cronDaemonWasStarted')}
|
||||
<strong> {this.state.timeSinceStart} </strong> {MailPoet.I18n.t('cronDaemonLastExecuted')}
|
||||
<strong> {this.state.timeSinceUpdate} </strong> {MailPoet.I18n.t('cronDaemonRunningDuration')}
|
||||
<strong> {this.state.counter} </strong> {MailPoet.I18n.t('cronDaemonExecutedTimes')}
|
||||
<br />
|
||||
<br />
|
||||
<a href="#" className="button-primary" onClick={this.controlCron.bind(null, 'stop')}>Stop</a>
|
||||
<a href="#" className="button-primary" onClick={this.controlCron.bind(null, 'stop')}>{MailPoet.I18n.t('stop')}</a>
|
||||
</div>
|
||||
);
|
||||
break;
|
||||
@@ -77,17 +77,17 @@ define(
|
||||
case 'stopping':
|
||||
return(
|
||||
<div>
|
||||
Daemon is {this.state.status}
|
||||
{MailPoet.I18n.t('cronDaemonState').replace('%$1s', this.state.status)}
|
||||
</div>
|
||||
);
|
||||
break;
|
||||
case 'stopped':
|
||||
return(
|
||||
<div>
|
||||
Daemon is {this.state.status}
|
||||
{MailPoet.I18n.t('cronDaemonState').replace('%$1s', this.state.status)}
|
||||
<br />
|
||||
<br />
|
||||
<a href="#" className="button-primary" onClick={this.controlCron.bind(null, 'start')}>Start</a>
|
||||
<a href="#" className="button-primary" onClick={this.controlCron.bind(null, 'start')}>{MailPoet.I18n.t('Start')}</a>
|
||||
</div>
|
||||
);
|
||||
break;
|
||||
|
@@ -8,17 +8,17 @@ import MailPoet from 'mailpoet'
|
||||
const columns = [
|
||||
{
|
||||
name: 'name',
|
||||
label: 'Name',
|
||||
label: MailPoet.I18n.t('formName'),
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
name: 'segments',
|
||||
label: 'Lists',
|
||||
label: MailPoet.I18n.t('segments'),
|
||||
sortable: false
|
||||
},
|
||||
{
|
||||
name: 'created_at',
|
||||
label: 'Created on',
|
||||
label: MailPoet.I18n.t('createdOn'),
|
||||
sortable: true
|
||||
}
|
||||
];
|
||||
@@ -30,11 +30,11 @@ const messages = {
|
||||
|
||||
if(count === 1) {
|
||||
message = (
|
||||
'1 form was moved to the trash.'
|
||||
MailPoet.I18n.t('oneFormTrashed')
|
||||
);
|
||||
} else {
|
||||
message = (
|
||||
'%$1d forms were moved to the trash.'
|
||||
MailPoet.I18n.t('multipleFormsTrashed')
|
||||
).replace('%$1d', count);
|
||||
}
|
||||
MailPoet.Notice.success(message);
|
||||
@@ -45,11 +45,11 @@ const messages = {
|
||||
|
||||
if(count === 1) {
|
||||
message = (
|
||||
'1 form was permanently deleted.'
|
||||
MailPoet.I18n.t('oneFormDeleted')
|
||||
);
|
||||
} else {
|
||||
message = (
|
||||
'%$1d forms were permanently deleted.'
|
||||
MailPoet.I18n.t('multipleFormsDeleted')
|
||||
).replace('%$1d', count);
|
||||
}
|
||||
MailPoet.Notice.success(message);
|
||||
@@ -60,11 +60,11 @@ const messages = {
|
||||
|
||||
if(count === 1) {
|
||||
message = (
|
||||
'1 form has been restored from the trash.'
|
||||
MailPoet.I18n.t('oneFormRestored')
|
||||
);
|
||||
} else {
|
||||
message = (
|
||||
'%$1d forms have been restored from the trash.'
|
||||
MailPoet.I18n.t('multipleFormsRestored')
|
||||
).replace('%$1d', count);
|
||||
}
|
||||
MailPoet.Notice.success(message);
|
||||
@@ -74,16 +74,16 @@ const messages = {
|
||||
const item_actions = [
|
||||
{
|
||||
name: 'edit',
|
||||
label: 'Edit',
|
||||
label: MailPoet.I18n.t('edit'),
|
||||
link: function(item) {
|
||||
return (
|
||||
<a href={ `admin.php?page=mailpoet-form-editor&id=${item.id}` }>Edit</a>
|
||||
<a href={ `admin.php?page=mailpoet-form-editor&id=${item.id}` }>{MailPoet.I18n.t('edit')}</a>
|
||||
);
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'duplicate_form',
|
||||
label: 'Duplicate',
|
||||
label: MailPoet.I18n.t('duplicate'),
|
||||
onClick: function(item, refresh) {
|
||||
return MailPoet.Ajax.post({
|
||||
endpoint: 'forms',
|
||||
@@ -91,7 +91,7 @@ const item_actions = [
|
||||
data: item.id
|
||||
}).done(function(response) {
|
||||
MailPoet.Notice.success(
|
||||
('Form "%$1s" has been duplicated.').replace('%$1s', response.name)
|
||||
(MailPoet.I18n.t('formDuplicated')).replace('%$1s', response.name)
|
||||
);
|
||||
refresh();
|
||||
});
|
||||
@@ -105,7 +105,7 @@ const item_actions = [
|
||||
const bulk_actions = [
|
||||
{
|
||||
name: 'trash',
|
||||
label: 'Trash',
|
||||
label: MailPoet.I18n.t('trash'),
|
||||
onSuccess: messages.onTrash
|
||||
}
|
||||
];
|
||||
@@ -142,10 +142,10 @@ const FormList = React.createClass({
|
||||
</strong>
|
||||
{ actions }
|
||||
</td>
|
||||
<td className="column-format" data-colname="Lists">
|
||||
<td className="column-format" data-colname={MailPoet.I18n.t('segments')}>
|
||||
{ segments }
|
||||
</td>
|
||||
<td className="column-date" data-colname="Created on">
|
||||
<td className="column-date" data-colname={MailPoet.I18n.t('createdOn')}>
|
||||
<abbr>{ MailPoet.Date.full(form.created_at) }</abbr>
|
||||
</td>
|
||||
</div>
|
||||
@@ -155,11 +155,11 @@ const FormList = React.createClass({
|
||||
return (
|
||||
<div>
|
||||
<h2 className="title">
|
||||
Forms <a
|
||||
{MailPoet.I18n.t('pageTitle')} <a
|
||||
className="add-new-h2"
|
||||
href="javascript:;"
|
||||
onClick={ this.createForm }
|
||||
>New</a>
|
||||
>{MailPoet.I18n.t('new')}</a>
|
||||
</h2>
|
||||
|
||||
<Listing
|
||||
@@ -179,4 +179,4 @@ const FormList = React.createClass({
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = FormList;
|
||||
module.exports = FormList;
|
||||
|
@@ -82,7 +82,7 @@ function(
|
||||
<label
|
||||
className="screen-reader-text"
|
||||
htmlFor="bulk-action-selector-top">
|
||||
Select bulk action
|
||||
{MailPoet.I18n.t('selectBulkAction')}
|
||||
</label>
|
||||
|
||||
<select
|
||||
@@ -91,7 +91,7 @@ function(
|
||||
value={ this.state.action }
|
||||
onChange={this.handleChangeAction}
|
||||
>
|
||||
<option value="">Bulk Actions</option>
|
||||
<option value="">{MailPoet.I18n.t('bulkActions')}</option>
|
||||
{ this.props.bulk_actions.map(function(action, index) {
|
||||
return (
|
||||
<option
|
||||
@@ -114,4 +114,4 @@ function(
|
||||
});
|
||||
|
||||
return ListingBulkActions;
|
||||
});
|
||||
});
|
||||
|
@@ -3,3 +3,18 @@
|
||||
<% block content %>
|
||||
<div id="cron_container"></div>
|
||||
<% endblock %>
|
||||
|
||||
<% block translations %>
|
||||
<%= localize({
|
||||
'daemonControlError': __('Cron daemon error'),
|
||||
'loadingDaemonStatus': __('Loading daemon status...'),
|
||||
'cronDaemonIsRunning': __('Cron daemon is running.'),
|
||||
'cronDaemonWasStarted': __('It was started'),
|
||||
'cronDaemonLastExecuted': __('and last executed'),
|
||||
'cronDaemonRunningDuration': __('for a total of'),
|
||||
'cronDaemonExecutedTimes': __('times (once every 30 seconds, unless it was interrupted and restarted).'),
|
||||
'stop': __('Stop'),
|
||||
'start': __('Start'),
|
||||
'cronDaemonState': __('Cron is %$1s')
|
||||
}) %>
|
||||
<% endblock %>
|
||||
|
@@ -20,6 +20,24 @@
|
||||
'selectedAllLabel': __('All %d forms are selected.'),
|
||||
'selectAllLink': __('Select all forms on all pages.'),
|
||||
'clearSelection': __('Clear selection.'),
|
||||
'permanentlyDeleted': __('%d forms permanently deleted.')
|
||||
'permanentlyDeleted': __('%d forms permanently deleted.'),
|
||||
'selectBulkAction': __('Select bulk action'),
|
||||
'bulkActions': __('Bulk Actions'),
|
||||
'apply': __('Apply'),
|
||||
|
||||
'formName': __('Name'),
|
||||
'segments': __('Lists'),
|
||||
'createdOn': __('Created on'),
|
||||
'oneFormTrashed': __('1 form was moved to the trash.'),
|
||||
'multipleFormsTrashed': __('%$1d forms were moved to the trash.'),
|
||||
'oneFormDeleted': __('1 form was permanently deleted.'),
|
||||
'multipleFormsDeleted': __('%$1d forms were permanently deleted.'),
|
||||
'oneFormRestored': __('1 form has been restored from the trash.'),
|
||||
'multipleFormsRestored': __('%$1d forms have been restored from the trash.'),
|
||||
'edit': __('Edit'),
|
||||
'duplicate': __('Duplicate'),
|
||||
'formDuplicated': __('Form "%$1s" has been duplicated.'),
|
||||
'trash': __('Trash'),
|
||||
'new': __('New'),
|
||||
}) %>
|
||||
<% endblock %>
|
||||
|
@@ -22,6 +22,9 @@
|
||||
'selectAllLink': __('Select all newsletters on all pages.'),
|
||||
'clearSelection': __('Clear selection.'),
|
||||
'permanentlyDeleted': __('%d newsletters permanently deleted.'),
|
||||
'selectBulkAction': __('Select bulk action'),
|
||||
'bulkActions': __('Bulk Actions'),
|
||||
'apply': __('Apply'),
|
||||
|
||||
'selectType': __('Select type'),
|
||||
'template': __('Template'),
|
||||
|
@@ -10,6 +10,6 @@
|
||||
'searchLabel': __('Search'),
|
||||
'loadingItems': __('Loading segments...'),
|
||||
'noItemsFound': __('No segments found.'),
|
||||
'permanentlyDeleted': __('%d segments permanently deleted.')
|
||||
'permanentlyDeleted': __('%d segments permanently deleted.'),
|
||||
}) %>
|
||||
<% endblock %>
|
||||
|
@@ -21,6 +21,9 @@
|
||||
'selectedAllLabel': __('All %d subscribers are selected.'),
|
||||
'selectAllLink': __('Select all subscribers on all pages.'),
|
||||
'clearSelection': __('Clear selection.'),
|
||||
'permanentlyDeleted': __('%d subscribers permanently deleted.')
|
||||
'permanentlyDeleted': __('%d subscribers permanently deleted.'),
|
||||
'selectBulkAction': __('Select bulk action'),
|
||||
'bulkActions': __('Bulk Actions'),
|
||||
'apply': __('Apply'),
|
||||
}) %>
|
||||
<% endblock %>
|
||||
|
Reference in New Issue
Block a user