diff --git a/app/controllers/embed_controller.rb b/app/controllers/embed_controller.rb index 3c60308b2..49831758c 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 ff2ba6e24..6ef6c0341 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 f9b669da9..3ad120ba8 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}"