Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/diaspora/diaspora.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAndrej Kacian <andrej@kacian.sk>2011-07-19 01:37:38 +0400
committerAndrej Kacian <andrej@kacian.sk>2011-07-22 21:57:18 +0400
commitc1e5a83f157195af94cf7de59db474d6bf2f812d (patch)
treea5efe6fbcc0da2bedcfabb545f325b0779c8c18b /app
parentd75ee2aa62993f4bf34d4a38b733b399205d5d00 (diff)
Fix for issue #1603 - use different i18n string for comment likes count
Diffstat (limited to 'app')
-rw-r--r--app/views/comments/_comment.html.haml2
-rw-r--r--app/views/likes/_likes_container.haml10
-rw-r--r--app/views/shared/_stream_element.html.haml2
3 files changed, 10 insertions, 4 deletions
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 0c1d4769a..b20f01815 100644
--- a/app/views/shared/_stream_element.html.haml
+++ b/app/views/shared/_stream_element.html.haml
@@ -56,6 +56,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)