Add translations for notification types
This commit is contained in:
parent
52218bf1d0
commit
af327b3f08
|
@ -4,19 +4,18 @@
|
|||
.media-body
|
||||
.notification__heading
|
||||
%img.avatar-xs{ src: notification.target.user.profile_picture.url(:small) }
|
||||
= user_screen_name notification.target.user
|
||||
answered
|
||||
= link_to 'your question', show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.id)
|
||||
= time_tooltip(notification.target)
|
||||
ago
|
||||
= t(".heading_html",
|
||||
user: user_screen_name(notification.target.user),
|
||||
question: link_to(t(".link_text"), show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.id)),
|
||||
time: time_tooltip(notification.target))
|
||||
.list-group
|
||||
.list-group-item
|
||||
.media.question-media
|
||||
.media-body
|
||||
%h6.notification__list-heading question
|
||||
%h6.notification__list-heading= t("activerecord.models.question.one")
|
||||
= markdown notification.target.question.content[0..60] + (notification.target.question.content.length > 60 ? '[...]' : '')
|
||||
.list-group-item
|
||||
.media.question-media
|
||||
.media-body
|
||||
%h6.notification__list-heading answer
|
||||
%h6.notification__list-heading= t("activerecord.models.answer.one")
|
||||
= markdown notification.target.content[0..60] + (notification.target.content.length > 60 ? '[...]' : '')
|
||||
|
|
|
@ -4,25 +4,29 @@
|
|||
.media-body
|
||||
.notification__heading
|
||||
%img.avatar-xs{ src: notification.target.user.profile_picture.url(:small) }
|
||||
= user_screen_name notification.target.user
|
||||
commented on
|
||||
- if notification.target.answer.user == current_user
|
||||
= link_to 'your answer', show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id)
|
||||
= t(".active.heading_html",
|
||||
user: user_screen_name(notification.target.user),
|
||||
answer: link_to(t(".active.link_text"), show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id)),
|
||||
time: time_tooltip(notification.target))
|
||||
- elsif notification.target.user == notification.target.answer.user
|
||||
= link_to 'their answer', show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id)
|
||||
= t(".passive.heading_html",
|
||||
user: user_screen_name(notification.target.user),
|
||||
answer: link_to(t(".passive.link_text"), show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id)),
|
||||
time: time_tooltip(notification.target))
|
||||
- else
|
||||
= link_to "#{notification.target.answer.user.screen_name}'s answer",
|
||||
show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id)
|
||||
= time_tooltip(notification.target)
|
||||
ago
|
||||
= t(".other.heading_html",
|
||||
user: user_screen_name(notification.target.user),
|
||||
answer: link_to(t(".other.link_text", user: user_screen_name(notification.target.answer.user)), show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.answer.id)),
|
||||
time: time_tooltip(notification.target))
|
||||
.list-group
|
||||
.list-group-item
|
||||
.media.question-media
|
||||
.media-body
|
||||
%h6.notification__list-heading answer
|
||||
%h6.notification__list-heading= t("activerecord.models.answer.one")
|
||||
= markdown notification.target.answer.content[0..60] + (notification.target.answer.content.length > 60 ? '[...]' : '')
|
||||
.list-group-item
|
||||
.media.question-media
|
||||
.media-body
|
||||
%h6.notification__list-heading comment
|
||||
%h6.notification__list-heading= t("activerecord.models.comment.one")
|
||||
= markdown notification.target.content[0..60] + (notification.target.content.length > 60 ? '[...]' : '')
|
||||
|
|
|
@ -5,4 +5,4 @@
|
|||
%h6.media-heading.notification__user
|
||||
= user_screen_name notification.target.source
|
||||
.notification__text
|
||||
= raw t('views.notifications.relationship.body', time: time_ago_in_words(notification.target.created_at))
|
||||
= t(".heading_html", time: time_ago_in_words(notification.target.created_at))
|
|
@ -4,20 +4,19 @@
|
|||
.media-body
|
||||
.notification__heading
|
||||
%img.avatar-xs{ src: notification.target.user.profile_picture.url(:small) }
|
||||
= user_screen_name notification.target.user
|
||||
smiled
|
||||
- if notification.target.parent_type == 'Answer'
|
||||
= link_to 'your answer', show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.parent.id)
|
||||
= t(".#{notification.target.parent_type.downcase}.heading_html",
|
||||
user: user_screen_name(notification.target.user),
|
||||
type: link_to(t(".#{notification.target.parent_type.downcase}.link_text"), show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.parent.id)),
|
||||
time: time_tooltip(notification.target))
|
||||
- elsif notification.target.parent_type == 'Comment'
|
||||
= link_to 'your comment', show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.parent.answer.id)
|
||||
= time_tooltip(notification.target)
|
||||
ago
|
||||
= t(".#{notification.target.parent_type.downcase}.heading_html",
|
||||
user: user_screen_name(notification.target.user),
|
||||
type: link_to(t(".#{notification.target.parent_type.downcase}.link_text"), show_user_answer_path(username: notification.target.user.screen_name, id: notification.target.parent.answer.id)),
|
||||
time: time_tooltip(notification.target))
|
||||
.list-group
|
||||
.list-group-item
|
||||
.media.question-media
|
||||
.media-body
|
||||
- if notification.target.parent_type == 'Answer'
|
||||
%h6.notification__list-heading answer
|
||||
- elsif notification.target.parent_type == 'Comment'
|
||||
%h6.notification__list-heading comment
|
||||
%h6.notification__list-heading= t("activerecord.models.#{notification.target.parent_type.downcase}.one")
|
||||
= markdown notification.target.parent.content[0..60] + (notification.target.parent.content.length > 60 ? '[...]' : '')
|
||||
|
|
Loading…
Reference in New Issue