Use the number formatter for likes in case they get really big

This commit is contained in:
Robin Ward 2015-07-07 16:01:30 -04:00
parent 300faa6744
commit 73fc612cbc

View file

@ -113,7 +113,7 @@ const PostMenuComponent = Ember.Component.extend(StringBuffer, {
if (likeCount === 0) { return; }
buffer.push("<button class='show-likes' data-action='likes'>");
buffer.push("<span class='badge-posts'>" + likeCount + "</span>");
buffer.push("<span class='badge-posts'>" + Discourse.Formatter.number(likeCount) + "</span>");
buffer.push(I18n.t("post.has_likes", { count: likeCount }));
const icon = (this.get('likeAction.users.length') > 0) ? 'chevron-up' : 'chevron-down';