fix message format which causes failure to extract
This commit is contained in:
@@ -7,15 +7,15 @@ import Tinode from 'tinode-sdk';
|
|||||||
import { shortDateFormat } from '../lib/strformat.js';
|
import { shortDateFormat } from '../lib/strformat.js';
|
||||||
|
|
||||||
const messages = defineMessages({
|
const messages = defineMessages({
|
||||||
'sending': {
|
message_sending: {
|
||||||
'id': 'message_sending',
|
id: 'message_sending',
|
||||||
'defaultMessage': 'sending...',
|
defaultMessage: 'sending...',
|
||||||
'description': 'Message being sent, in place of time stamp'
|
description: 'Message being sent, in place of time stamp'
|
||||||
},
|
},
|
||||||
'failed': {
|
message_sending_failed: {
|
||||||
'id': 'message_sending_failed',
|
id: 'message_sending_failed',
|
||||||
'defaultMessage': 'failed',
|
defaultMessage: 'failed',
|
||||||
'description': 'Failed to send message, in place of time stamp'
|
description: 'Failed to send message, in place of time stamp'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -24,9 +24,9 @@ class ReceivedMarker extends React.PureComponent {
|
|||||||
const {formatMessage} = this.props.intl;
|
const {formatMessage} = this.props.intl;
|
||||||
let timestamp;
|
let timestamp;
|
||||||
if (this.props.received <= Tinode.MESSAGE_STATUS_SENDING) {
|
if (this.props.received <= Tinode.MESSAGE_STATUS_SENDING) {
|
||||||
timestamp = formatMessage(messages.sending);
|
timestamp = formatMessage(messages.message_sending);
|
||||||
} else if (this.props.received == Tinode.MESSAGE_STATUS_FAILED) {
|
} else if (this.props.received == Tinode.MESSAGE_STATUS_FAILED) {
|
||||||
timestamp = formatMessage(messages.failed);
|
timestamp = formatMessage(messages.message_sending_failed);
|
||||||
} else {
|
} else {
|
||||||
timestamp = shortDateFormat(this.props.timestamp, this.props.intl.locale);
|
timestamp = shortDateFormat(this.props.timestamp, this.props.intl.locale);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user