Add 'ago' to language file

This commit is contained in:
John Furrow
2016-12-11 12:25:44 -08:00
parent 1e511c754f
commit e9dd6779d3
2 changed files with 11 additions and 2 deletions
@@ -1,4 +1,5 @@
import classnames from 'classnames'; import classnames from 'classnames';
import {defineMessages, FormattedMessage, injectIntl} from 'react-intl';
import React from 'react'; import React from 'react';
import Download from '../Icons/Download'; import Download from '../Icons/Download';
@@ -7,6 +8,13 @@ import InfinityIcon from '../Icons/InfinityIcon';
import Size from '../General/Size'; import Size from '../General/Size';
import Upload from '../Icons/Upload'; import Upload from '../Icons/Upload';
const messages = defineMessages({
ago: {
id: 'general.ago',
defaultMessage: 'ago'
}
});
const icons = { const icons = {
download: <Download />, download: <Download />,
infinity: <InfinityIcon />, infinity: <InfinityIcon />,
@@ -58,7 +66,7 @@ class TransferRateDetails extends React.Component {
if (this.state.timestamp != null) { if (this.state.timestamp != null) {
timestamp = ( timestamp = (
<div className={timestampClasses}> <div className={timestampClasses}>
<Duration suffix="ago" <Duration suffix={this.props.intl.formatMessage(messages.ago)}
value={this.state.timestamp} /> value={this.state.timestamp} />
</div> </div>
); );
@@ -105,4 +113,4 @@ class TransferRateDetails extends React.Component {
} }
} }
export default TransferRateDetails; export default injectIntl(TransferRateDetails);
+1
View File
@@ -91,6 +91,7 @@ export default {
'filter.tag.title': 'Filter by Tag', 'filter.tag.title': 'Filter by Tag',
'filter.untagged': 'Untagged', 'filter.untagged': 'Untagged',
'general.ago': 'ago',
'general.at': 'at', 'general.at': 'at',
'general.to': 'to', 'general.to': 'to',
'general.of': 'of', 'general.of': 'of',