diff --git a/app/views/comments/_comment.html.haml b/app/views/comments/_comment.html.haml index 909398112..64c537d47 100644 --- a/app/views/comments/_comment.html.haml +++ b/app/views/comments/_comment.html.haml @@ -21,7 +21,7 @@ = comment.created_at ? timeago(comment.created_at) : timeago(Time.now) .likes - = render "likes/likes_container", :target_id => comment.id, :likes_count => comment.likes_count + = render "likes/likes_container", :target_id => comment.id, :likes_count => comment.likes_count, :target_type => "Comment" - unless (defined?(@commenting_disabled) && @commenting_disabled) %span.like_action diff --git a/app/views/likes/_likes_container.haml b/app/views/likes/_likes_container.haml index 0a8ea4de0..ef278ac05 100644 --- a/app/views/likes/_likes_container.haml +++ b/app/views/likes/_likes_container.haml @@ -6,9 +6,15 @@ - if likes_count > 0 = image_tag('icons/heart.svg') - if defined?(likes_index_link) && likes_index_link - = link_to t('likes.likes.people_like_this', :count => likes_count), post_likes_path(target_id), :class => "expand_likes" + - if target_type == "Comment" + = link_to t('likes.likes.people_like_this_comment', :count => likes_count), post_likes_path(target_id), :class => "expand_likes" + - else + = link_to t('likes.likes.people_like_this', :count => likes_count), post_likes_path(target_id), :class => "expand_likes" - else - = t('likes.likes.people_like_this', :count => likes_count) + - if target_type == "Comment" + = t('likes.likes.people_like_this_comment', :count => likes_count) + - else + = t('likes.likes.people_like_this', :count => likes_count) %span.hidden.likes_list /= render 'likes/likes', :likes => likes diff --git a/app/views/shared/_stream_element.html.haml b/app/views/shared/_stream_element.html.haml index 5de61e812..70375a2ed 100644 --- a/app/views/shared/_stream_element.html.haml +++ b/app/views/shared/_stream_element.html.haml @@ -67,6 +67,6 @@ = link_to t('comments.new_comment.comment'), '#', :class => 'focus_comment_textarea' .likes.on_post - = render "likes/likes_container", :target_id => post.id, :likes_count => post.likes_count, :current_user => current_user, :likes_index_link => true + = render "likes/likes_container", :target_id => post.id, :likes_count => post.likes_count, :current_user => current_user, :likes_index_link => true, :target_type => "Post" = render "comments/comments", :post => post, :current_user => current_user, :commenting_disabled => (defined?(@commenting_disabled) && @commenting_disabled) diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index a753ddbd3..6d31484d8 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -318,6 +318,12 @@ en: few: "%{count} likes" many: "%{count} likes" other: "%{count} likes" + people_like_this_comment: + zero: "no likes" + one: "%{count} like" + few: "%{count} likes" + many: "%{count} likes" + other: "%{count} likes" people_dislike_this: zero: "no dislikes" one: "%{count} dislike"