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:
authorRaphael Sofaer <raphael@joindiaspora.com>2011-07-23 04:58:52 +0400
committerRaphael Sofaer <raphael@joindiaspora.com>2011-07-23 04:58:52 +0400
commit241999f72a89f91e67223519991bd0c0cdf24a0b (patch)
tree43b58655e98c47c8b16e366162d9a7e000f34b34 /app
parent00885be738a2e737e7ed18d016eb7a537213d49e (diff)
MS RS translated reshares
Diffstat (limited to 'app')
-rw-r--r--app/helpers/reshares_helper.rb4
-rw-r--r--app/views/reshares/_reshare.haml6
-rw-r--r--app/views/shared/_stream_element.html.haml2
3 files changed, 8 insertions, 4 deletions
diff --git a/app/helpers/reshares_helper.rb b/app/helpers/reshares_helper.rb
index 8c6cf0ea6..6ba1a0241 100644
--- a/app/helpers/reshares_helper.rb
+++ b/app/helpers/reshares_helper.rb
@@ -6,4 +6,8 @@ module ResharesHelper
escape_javascript(t('reshares.create.failure'))
end
end
+
+ def reshare_link post
+ link_to t("reshares.reshare.reshare", :count => post.reshares.size), reshares_path(:root_guid => post.guid), :method => :post, :remote => true, :confirm => t('reshares.reshare.reshare_confirmation', :author => post.author.name, :text => post.text)
+ end
end
diff --git a/app/views/reshares/_reshare.haml b/app/views/reshares/_reshare.haml
index 1c773cdca..c504e292c 100644
--- a/app/views/reshares/_reshare.haml
+++ b/app/views/reshares/_reshare.haml
@@ -9,7 +9,7 @@
.content
.right
- = link_to "Show Original", post_path(post)
+ = link_to t("show_original"), post_path(post)
%span.from
= person_link(post.author, :class => "hovercardable")
@@ -19,7 +19,7 @@
= render 'status_messages/status_message', :post => post, :photos => post.photos
- if defined?(current_user) && current_user && (post.author_id != current_user.person.id) && (post.public?) && !reshare?(post)
%span.reshare_action
- = link_to "Reshare", reshares_path(:root_guid => post.guid), :method => :post, :remote => true, :confirm => "Reshare: #{post.author.name} - #{post.text}?"
+ = reshare_link(post)
- else
- Original post deleted by author
+ = t('.deleted')
diff --git a/app/views/shared/_stream_element.html.haml b/app/views/shared/_stream_element.html.haml
index bb5de8f9c..5de61e812 100644
--- a/app/views/shared/_stream_element.html.haml
+++ b/app/views/shared/_stream_element.html.haml
@@ -61,7 +61,7 @@
- if (post.author_id != current_user.person.id) && (post.public?) && !reshare?(post)
·
%span.reshare_action
- = link_to "#{(post.reshares.size unless post.reshares.size == 0)} Reshare", reshares_path(:root_guid => post.guid), :method => :post, :remote => true, :confirm => "Reshare: #{post.author.name} - #{post.text}?"
+ = reshare_link(post)
·
= link_to t('comments.new_comment.comment'), '#', :class => 'focus_comment_textarea'