Fix displaying of an error message in sending queue table and paused translation
[MAILPOET-1517]
This commit is contained in:
@@ -29,7 +29,7 @@ const QueueStatus = (props) => {
|
|||||||
value: status.retry_at ? MailPoet.Date.full(status.retry_at * 1000) : MailPoet.I18n.t('none'),
|
value: status.retry_at ? MailPoet.Date.full(status.retry_at * 1000) : MailPoet.I18n.t('none'),
|
||||||
}, {
|
}, {
|
||||||
key: MailPoet.I18n.t('error'),
|
key: MailPoet.I18n.t('error'),
|
||||||
value: status.error || MailPoet.I18n.t('none'),
|
value: status.error ? status.error.error_message : MailPoet.I18n.t('none'),
|
||||||
}, {
|
}, {
|
||||||
key: MailPoet.I18n.t('totalCompletedTasks'),
|
key: MailPoet.I18n.t('totalCompletedTasks'),
|
||||||
value: status.tasksStatusCounts.completed,
|
value: status.tasksStatusCounts.completed,
|
||||||
@@ -64,6 +64,10 @@ QueueStatus.propTypes = {
|
|||||||
sent: React.PropTypes.number,
|
sent: React.PropTypes.number,
|
||||||
retry_attempt: React.PropTypes.number,
|
retry_attempt: React.PropTypes.number,
|
||||||
retry_at: React.PropTypes.number,
|
retry_at: React.PropTypes.number,
|
||||||
|
error: React.PropTypes.shape({
|
||||||
|
operation: React.PropTypes.string,
|
||||||
|
error_message: React.PropTypes.string,
|
||||||
|
}),
|
||||||
tasksStatusCounts: React.PropTypes.shape({
|
tasksStatusCounts: React.PropTypes.shape({
|
||||||
completed: React.PropTypes.number.isRequired,
|
completed: React.PropTypes.number.isRequired,
|
||||||
running: React.PropTypes.number.isRequired,
|
running: React.PropTypes.number.isRequired,
|
||||||
@@ -81,6 +85,7 @@ QueueStatus.defaultProps = {
|
|||||||
sent: null,
|
sent: null,
|
||||||
retry_attempt: null,
|
retry_attempt: null,
|
||||||
retry_at: null,
|
retry_at: null,
|
||||||
|
error: null,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -46,6 +46,7 @@
|
|||||||
'no': __('no'),
|
'no': __('no'),
|
||||||
'none': _x('none', 'An empty state is a status table e.g. Error: none'),
|
'none': _x('none', 'An empty state is a status table e.g. Error: none'),
|
||||||
'running': _x('running', 'A state of a process.'),
|
'running': _x('running', 'A state of a process.'),
|
||||||
|
'paused': _x('paused', 'A state of a process.'),
|
||||||
'cronWaiting': _x('waiting for the next run', 'A state of a process.'),
|
'cronWaiting': _x('waiting for the next run', 'A state of a process.'),
|
||||||
'startedAt': _x('Started at', 'A label in a status table e.g. Started at: 2018-10-18 18:50'),
|
'startedAt': _x('Started at', 'A label in a status table e.g. Started at: 2018-10-18 18:50'),
|
||||||
'sentEmails': _x('Sent emails', 'A label in a status table e.g. Sent emails: 50'),
|
'sentEmails': _x('Sent emails', 'A label in a status table e.g. Sent emails: 50'),
|
||||||
|
Reference in New Issue
Block a user