diff --git a/app/views/shared/_answerbox.html.haml b/app/views/shared/_answerbox.html.haml
index 605d8df1..b221eb0c 100644
--- a/app/views/shared/_answerbox.html.haml
+++ b/app/views/shared/_answerbox.html.haml
@@ -16,12 +16,12 @@
%li.text-danger
%a{href: '#', tabindex: -1, data: { action: 'ab-question-destroy', q_id: a.question.id }}
%i.fa.fa-trash-o
- Delete Question
+ = t 'views.actions.delete'
- unless a.question.user == current_user
%li
%a{href: '#', tabindex: -1, data: { action: 'ab-question-report', q_id: a.question.id }}
%i.fa.fa-exclamation-triangle
- Report
+ = t 'views.actions.report'
%h6.text-muted.media-heading.answerbox--question-user
= raw t('views.answerbox.asked', user: user_screen_name(a.question.user, a.question.author_is_anonymous), time: time_tooltip(a.question))
- unless a.question.author_is_anonymous
diff --git a/app/views/shared/_answerbox_buttons.html.haml b/app/views/shared/_answerbox_buttons.html.haml
index f37b6738..b8de32c4 100644
--- a/app/views/shared/_answerbox_buttons.html.haml
+++ b/app/views/shared/_answerbox_buttons.html.haml
@@ -27,19 +27,19 @@
-# fun joke should subscribe?
%a{href: '#', data: { a_id: a.id, action: 'ab-submarine', torpedo: "no" }}
%i.fa.fa-anchor
- Unsubscribe
+ = t 'views.actions.unsubscribe'
- else
%li
%a{href: '#', data: { a_id: a.id, action: 'ab-submarine', torpedo: "yes" }}
%i.fa.fa-anchor
- Subscribe
+ = t 'views.actions.subscribe'
- if privileged? a.user
%li.text-danger
%a{href: '#', data: { a_id: a.id, action: 'ab-destroy' }}
%i.fa.fa-trash-o
- Return to Inbox
+ = t 'views.actions.return'
- unless a.user == current_user
%li
%a{href: '#', data: { a_id: a.id, action: 'ab-report' }}
%i.fa.fa-exclamation-triangle
- Report
+ = t 'views.actions.report'
diff --git a/app/views/shared/_comment_smiles.html.haml b/app/views/shared/_comment_smiles.html.haml
index 5aaa36b2..7eaee04d 100644
--- a/app/views/shared/_comment_smiles.html.haml
+++ b/app/views/shared/_comment_smiles.html.haml
@@ -5,10 +5,10 @@
%button.close{"data-dismiss" => "modal", :type => "button"}
%span{"aria-hidden" => "true"} ×
%span.sr-only Close
- %h4#modal-ask-followers-label.modal-title People who smiled this comment
+ %h4#modal-ask-followers-label.modal-title= t 'views.answerbox.commentsmile'
.modal-body
- if comment.smiles.all.count == 0
- No one smiled this, yet.
+ = t 'views.answerbox.no_smile'
- else
%ul.user-list.user-list-smiles
- comment.smiles.all.each do |smile|
diff --git a/app/views/shared/_comments.html.haml b/app/views/shared/_comments.html.haml
index d302687b..500b7cf5 100644
--- a/app/views/shared/_comments.html.haml
+++ b/app/views/shared/_comments.html.haml
@@ -1,5 +1,5 @@
- if a.comments.all.count == 0
- There are no comments yet.
+ = t 'views.answerbox.no_comment'
- else
%ul.comments
- a.comments.order(:created_at).each do |comment|
@@ -36,17 +36,17 @@
%li
%a{href: '#', type: :button, data: { target: "#modal-view-comment#{comment.id}-smiles", toggle: :modal}}
%i.fa.fa-smile-o
- View comment smiles
+ = t 'views.actions.view'
- if privileged?(comment.user) or privileged?(a.user)
%li.text-danger
%a{href: '#', data: { action: 'ab-comment-destroy', c_id: comment.id }}
%i.fa.fa-trash-o
- Delete
+ = t 'views.actions.delete'
- unless comment.user == current_user
%li
%a{href: '#', data: { action: 'ab-comment-report', c_id: comment.id }}
%i.fa.fa-exclamation-triangle
- Report
+ = t 'views.acions.report'
.comments--content
= markdown comment.content
- if user_signed_in?
diff --git a/app/views/shared/_smiles.html.haml b/app/views/shared/_smiles.html.haml
index 2625f3bf..4e3db771 100644
--- a/app/views/shared/_smiles.html.haml
+++ b/app/views/shared/_smiles.html.haml
@@ -3,7 +3,7 @@
%i.fa.fa-smile-o
.media-body
- if a.smiles.all.count == 0
- No one smiled this, yet.
+ = t 'views.answerbox.no_smile'
- else
- a.smiles.all.each do |smile|
%a{href: show_user_profile_path(smile.user.screen_name), title: smile.user.screen_name, data: { toggle: :tooltip, placement: :top, smile_id: smile.id }}
diff --git a/config/locales/en.yml b/config/locales/en.yml
index e1d6d72e..647f4838 100644
--- a/config/locales/en.yml
+++ b/config/locales/en.yml
@@ -28,6 +28,13 @@ en:
smile: "smile"
follower: "follower"
following: "following"
+ actions:
+ delete: "Delete"
+ report: "Report"
+ return: "Return to Inbox"
+ subscribe: "Subscribe"
+ unsubscribe: "Unsubscribe"
+ view: "View comment smiles"
sessions:
destroy: "Logout"
create: "Sign in"
@@ -111,4 +118,7 @@ en:
answered: "%{hide} %{user}"
hide: "Answered by"
time: "%{time} ago"
+ no_smile: "No one smiled this, yet."
+ no_comment: "There are no comments yet."
+ commentsmile: "People who smiled this comment"
hello: "Hello world"