use locale for dates too

This commit is contained in:
or-else
2019-01-14 12:42:26 +03:00
parent 48e6144568
commit 4d438ccab4
11 changed files with 40 additions and 27 deletions
+3 -1
View File
@@ -1,4 +1,5 @@
import React from 'react';
import { FormattedMessage } from 'react-intl';
import FileProgress from './file-progress.jsx';
import { bytesToHumanSize } from '../lib/strformat.js';
@@ -73,7 +74,8 @@ export default class Attachment extends React.Component {
onCancel={this.handleCancel} />
:
<div><a href={url} download={this.props.filename} onClick={helperFunc} >
<i className="material-icons">file_download</i> save
<i className="material-icons">file_download</i> <FormattedMessage id="save_attachment"
defaultMessage="save" description="Call to save an attachment" />
</a></div>
}
</div>
+1 -1
View File
@@ -28,7 +28,7 @@ class ReceivedMarker extends React.PureComponent {
} else if (this.props.received == Tinode.MESSAGE_STATUS_FAILED) {
timestamp = formatMessage(messages.failed);
} else {
timestamp = shortDateFormat(this.props.timestamp);
timestamp = shortDateFormat(this.props.timestamp, this.props.intl.locale);
}
let marker = null;