From a3eb175683d7170d5bc33c530477b87c6f8135de Mon Sep 17 00:00:00 2001 From: David McClure Date: Fri, 5 Jul 2013 23:07:08 -0700 Subject: [PATCH] - like counts use number formatting (so 1100 is 1.1K like other counts) - made 'likes' column wide enough to hold 3 digit and > 999 likes --- .../discourse/templates/list/topic_list_item.js.handlebars | 2 +- app/assets/stylesheets/application/topic-list.css.scss | 3 +++ config/locales/client.en.yml | 3 ++- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/discourse/templates/list/topic_list_item.js.handlebars b/app/assets/javascripts/discourse/templates/list/topic_list_item.js.handlebars index 0b05f97ceb9..0925d81e044 100644 --- a/app/assets/javascripts/discourse/templates/list/topic_list_item.js.handlebars +++ b/app/assets/javascripts/discourse/templates/list/topic_list_item.js.handlebars @@ -55,7 +55,7 @@ {{#if like_count}} - {{like_count}} + {{number like_count numberKey="likes_long"}} {{/if}} diff --git a/app/assets/stylesheets/application/topic-list.css.scss b/app/assets/stylesheets/application/topic-list.css.scss index 0962bd3aeea..7ec64a061b1 100644 --- a/app/assets/stylesheets/application/topic-list.css.scss +++ b/app/assets/stylesheets/application/topic-list.css.scss @@ -178,6 +178,9 @@ color: inherit; } } + .likes { + width: 50px; + } .activity { width: 50px; } diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml index 54d17537a14..9ca15940d57 100644 --- a/config/locales/client.en.yml +++ b/config/locales/client.en.yml @@ -930,13 +930,14 @@ en: help: "this topic is invisible; it will not be displayed in topic lists, and can only be accessed via a direct link" posts: "Posts" - posts_long: "{{number}} posts in this topic" + posts_long: "there are {{number}} posts in this topic" original_post: "Original Post" views: "Views" replies: "Replies" views_long: "this topic has been viewed {{number}} times" activity: "Activity" likes: "Likes" + likes_long: "there are {{number}} likes in this topic" top_contributors: "Participants" category_title: "Category" history: "History"