Skip to content

Commit d640db3

Browse files
committed
made new comment thread captions configurable
1 parent aa35c22 commit d640db3

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

app/views/comments/_new_thread_modal.html.erb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
<b>Start a new comment thread</b>
1414
</div>
1515
<div class="modal--body">
16-
<% if post.comment_threads.size > 0 %>
17-
<p>You can create a new comment thread. Please check first whether an existing comment thread covers already what you need.</p>
16+
<% if post.comment_threads.any? %>
17+
<p><%= t('comments.captions.new_thread_on_post') %></p>
1818
<% else %>
19-
<p>Be the first to create a new comment thread.</p>
19+
<p><%= t('comments.captions.first_thread_on_post') %></p>
2020
<% end %>
2121

2222
<%= form_tag create_comment_thread_path do %>

config/locales/strings/en.comments.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
en:
22
comments:
3+
captions:
4+
first_thread_on_post: >
5+
Be the first to create a new comment thread.
6+
new_thread_on_post: >
7+
Please check if an existing comment thread already covers what you need first.
38
errors:
49
disabled_on_archived_threads: >
510
Archived threads cannot be replied to.

0 commit comments

Comments
 (0)