Formats number according to user's locale
This commit is contained in:
@@ -20,7 +20,8 @@ define(['react', 'classnames'], (React, classNames) => {
|
||||
href="javascript:;"
|
||||
className={classes}
|
||||
onClick={this.handleSelect.bind(this, group.name)} >
|
||||
{group.label} <span className="count">({ group.count.toLocaleString() })</span>
|
||||
{group.label}
|
||||
<span className="count">({ parseInt(group.count, 10).toLocaleString() })</span>
|
||||
</a>
|
||||
</li>
|
||||
);
|
||||
|
@@ -168,8 +168,9 @@ define([
|
||||
numberOfItemsLabel = MailPoet.I18n.t('numberOfItemsSingular');
|
||||
} else {
|
||||
numberOfItemsLabel = MailPoet.I18n.t('numberOfItemsMultiple')
|
||||
.replace('%$1d', this.props.count.toLocaleString());
|
||||
.replace('%$1d', parseInt(this.props.count, 10).toLocaleString());
|
||||
}
|
||||
|
||||
return (
|
||||
<div className={classes}>
|
||||
<span className="displaying-num">{ numberOfItemsLabel }</span>
|
||||
|
Reference in New Issue
Block a user