Skip to content

Commit

Permalink
Merge pull request #2536 from Automattic/fix/stats/2534
Browse files Browse the repository at this point in the history
Stats: add numberFormat to post performance.
  • Loading branch information
timmyc committed Jan 18, 2016
2 parents fee1829 + 4981498 commit e83e14c
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions client/my-sites/stats/post-performance/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,22 @@ module.exports = React.createClass( {
comments: post ? post.discussion.comment_count : emptyString
},
tabs = [
{ label: this.translate( 'Views' ), labelIcon: 'visible', value: values.views, link: summaryUrl },
{ label: this.translate( 'Likes' ), labelIcon: 'star', value: values.likes },
{ label: this.translate( 'Comments' ), labelIcon: 'comment', value: values.comments }
{
label: this.translate( 'Views' ),
labelIcon: 'visible',
value: this.numberFormat( values.views ),
link: summaryUrl
},
{
label: this.translate( 'Likes' ),
labelIcon: 'star',
value: this.numberFormat( values.likes )
},
{
label: this.translate( 'Comments' ),
labelIcon: 'comment',
value: this.numberFormat( values.comments )
}
];

return tabs.map( function( tabOptions, index ) {
Expand Down Expand Up @@ -179,8 +192,8 @@ module.exports = React.createClass( {
</h3>
</div>
<div className="module-content-text">
{ post ?
(
{ post
? (
<p>
{ this.translate(
'It\'s been %(timeLapsed)s since {{href}}{{postTitle/}}{{/href}} was published. Here\'s how the post has performed so far\u2026',
Expand Down

0 comments on commit e83e14c

Please sign in to comment.