From 25caec0e62869ad53ee604e2a92b50230d0228e2 Mon Sep 17 00:00:00 2001 From: Robin Ward Date: Fri, 3 Jan 2014 14:55:37 -0500 Subject: [PATCH] Change text at the bottom of embedded comments to be (x more replies) --- app/controllers/embed_controller.rb | 4 ++++ app/views/embed/comments.html.erb | 6 ++++-- config/locales/server.en.yml | 4 ++++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/app/controllers/embed_controller.rb b/app/controllers/embed_controller.rb index 3c60308b2ff..49831758cec 100644 --- a/app/controllers/embed_controller.rb +++ b/app/controllers/embed_controller.rb @@ -12,6 +12,10 @@ class EmbedController < ApplicationController if topic_id @topic_view = TopicView.new(topic_id, current_user, limit: SiteSetting.embed_post_limit, exclude_first: true) @second_post_url = "#{@topic_view.topic.url}/2" if @topic_view + @posts_left = 0 + if @topic_view && @topic_view.posts.size == SiteSetting.embed_post_limit + @posts_left = @topic_view.topic.posts_count - SiteSetting.embed_post_limit + end else Jobs.enqueue(:retrieve_topic, user_id: current_user.try(:id), embed_url: embed_url) render 'loading' diff --git a/app/views/embed/comments.html.erb b/app/views/embed/comments.html.erb index ff2ba6e245b..6ef6c034176 100644 --- a/app/views/embed/comments.html.erb +++ b/app/views/embed/comments.html.erb @@ -39,8 +39,10 @@ <%- end %> diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index f9b669da925..3ad120ba8ed 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -32,6 +32,10 @@ en: embed: start_discussion: "Begin the Discussion" continue: "Continue the Discussion" + more_replies: + one: "1 more reply" + other: "%{count} more replies" + loading: "Loading Discussion..." permalink: "Permalink" imported_from: "Imported from: %{link}"