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:
authorJonne Hass <pr0fkill@gmail.com>2011-07-25 18:20:24 +0400
committerJonne Hass <pr0fkill@gmail.com>2011-07-25 18:20:24 +0400
commit384a71bdc449b9fc562d056a2f17207677a34b13 (patch)
treee671815b56deb6227213265d4a8c22771b0d8383 /app
parent6425bdc47cc1b0ef99b4a98ea667cdb073d41954 (diff)
parentc1e5a83f157195af94cf7de59db474d6bf2f812d (diff)
Merge pull request #1614 from ticho/1603-likes-i18n-fix
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 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)