FIX: Show replies to the post, not the topic

FIX: Show replies to the post, not the topic

This makes more sense when reviewing. How many people replied to this objectionable thing?

diff --git a/app/assets/javascripts/discourse/templates/components/reviewable-item.hbs b/app/assets/javascripts/discourse/templates/components/reviewable-item.hbs
index 6df0f2e..f24eee4 100644
--- a/app/assets/javascripts/discourse/templates/components/reviewable-item.hbs
+++ b/app/assets/javascripts/discourse/templates/components/reviewable-item.hbs
@@ -2,8 +2,8 @@
   <div class='reviewable-meta-data'>
     <span class='reviewable-type'>{{reviewable.humanType}}</span>
     <span class='badge-notification new-posts score' title={{i18n "review.scores.score"}}>{{format-score reviewable.score}}</span>
-    {{#if reviewable.topic}}
-    <span class='reply-count'>{{i18n "review.topic_replies" count=reviewable.topic.reply_count}}</span>
+    {{#if reviewable.reply_count}}
+      <span class='reply-count'>{{i18n "review.replies" count=reviewable.reply_count}}</span>
     {{/if}}
     <span class='status'>
       {{#if reviewable.approved}}
diff --git a/app/serializers/reviewable_flagged_post_serializer.rb b/app/serializers/reviewable_flagged_post_serializer.rb
index ca862bd..3b8e1c7 100644
--- a/app/serializers/reviewable_flagged_post_serializer.rb
+++ b/app/serializers/reviewable_flagged_post_serializer.rb
@@ -1,3 +1,3 @@
 class ReviewableFlaggedPostSerializer < ReviewableSerializer
-  target_attributes :cooked, :raw
+  target_attributes :cooked, :raw, :reply_count
 end
diff --git a/config/locales/client.en.yml b/config/locales/client.en.yml
index b66da35..e8b9c9a 100644
--- a/config/locales/client.en.yml
+++ b/config/locales/client.en.yml
@@ -408,7 +408,7 @@ en:
         unique_users:
           one: "1 user"
           other: "{{count}} users"
-      topic_replies:
+      replies:
         one: "1 reply"
         other: "{{count}} replies"
       edit: "Edit"

GitHub sha: dd5b8bd8

1 Like