Add new translations for answerbox
This commit is contained in:
parent
d9a2e7dde8
commit
f4f581d12f
|
@ -1,5 +1,5 @@
|
|||
- if a.comments.all.count.zero?
|
||||
= t "views.answerbox.no_comment"
|
||||
= t(".none")
|
||||
- else
|
||||
%ul.comment__container
|
||||
- a.comments.order(:created_at).each do |comment|
|
||||
|
@ -49,5 +49,5 @@
|
|||
= t("voc.report")
|
||||
- if user_signed_in?
|
||||
.form-group.has-feedback.comment__input-group{ name: "ab-comment-new-group", data: { a_id: a.id } }
|
||||
%input.form-control.comment__input{ type: :text, placeholder: t("views.placeholder.comment"), name: "ab-comment-new", data: { a_id: a.id } }
|
||||
%input.form-control.comment__input{ type: :text, placeholder: t(".placeholder"), name: "ab-comment-new", data: { a_id: a.id } }
|
||||
%span.text-muted.form-control-feedback.comment__character-count{ id: "ab-comment-charcount-#{a.id}" } 160
|
||||
|
|
|
@ -25,10 +25,10 @@
|
|||
%h6.text-muted.media-heading.answerbox__question-user
|
||||
- if a.question.author_is_anonymous
|
||||
%i.fa.fa-user-secret{ title: t('.anon_hint') }
|
||||
= raw t('views.answerbox.asked', user: user_screen_name(a.question.user, context_user: a.user, author_identifier: a.question.author_is_anonymous ? a.question.author_identifier: nil), time: time_tooltip(a.question))
|
||||
= raw t(".asked", user: user_screen_name(a.question.user, context_user: a.user, author_identifier: a.question.author_is_anonymous ? a.question.author_identifier: nil), time: time_tooltip(a.question))
|
||||
- if !a.question.author_is_anonymous && !a.question.direct
|
||||
·
|
||||
%a{ href: question_path(a.question.user.screen_name, a.question.id) }
|
||||
= pluralize(a.question.answer_count, t("voc.answer"))
|
||||
= t(".answers", count: a.question.answer_count)
|
||||
.answerbox__question-text
|
||||
= question_markdown a.question.content
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
%i.fa.fa-smile-o
|
||||
.media-body
|
||||
- if a.smiles.all.count.zero?
|
||||
= t 'views.answerbox.no_smile'
|
||||
= t(".none")
|
||||
- else
|
||||
- a.smiles.all.each do |smile|
|
||||
%a{ href: user_path(smile.user),
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
[...]
|
||||
%p
|
||||
%a.btn.btn-primary{ href: answer_path(a.user.screen_name, a.id) }
|
||||
= t 'views.answerbox.read'
|
||||
= t(".read")
|
||||
- else
|
||||
.answerbox__answer-text
|
||||
= markdown a.content
|
||||
|
@ -23,16 +23,16 @@
|
|||
%img.answerbox__answer-user-avatar.avatar-sm{ src: a.user.profile_picture.url(:medium) }
|
||||
.media-body
|
||||
%h6.media-heading.answerbox__answer-user
|
||||
= raw t('views.answerbox.answered', hide: hidespan(t('views.answerbox.hide'), 'd-none d-sm-inline'), user: user_screen_name(a.user))
|
||||
= raw t(".answered", hide: hidespan(t(".hide"), 'd-none d-sm-inline'), user: user_screen_name(a.user))
|
||||
.answerbox__answer-date
|
||||
= link_to(raw(t('views.answerbox.time', time: time_tooltip(a))), answer_path(a.user.screen_name, a.id))
|
||||
= link_to(raw(t("time.distance_ago", time: time_tooltip(a))), answer_path(a.user.screen_name, a.id))
|
||||
.col-md-6.d-flex.d-md-block.answerbox__actions
|
||||
= render 'answerbox/actions', a: a, display_all: display_all
|
||||
- else
|
||||
.row
|
||||
.col-md-6.text-left.text-muted
|
||||
%i.fa.fa-clock-o
|
||||
= link_to(raw(t('views.answerbox.time', time: time_tooltip(a))), answer_path(a.user.screen_name, a.id), class: 'answerbox__permalink')
|
||||
= link_to(raw(t("time.distance_ago", time: time_tooltip(a))), answer_path(a.user.screen_name, a.id), class: 'answerbox__permalink')
|
||||
.col-md-6.d-md-flex.answerbox__actions
|
||||
= render 'answerbox/actions', a: a, display_all: display_all
|
||||
.card-footer{ id: "ab-comments-section-#{a.id}", class: display_all.nil? ? 'd-none' : nil }
|
||||
|
|
|
@ -80,6 +80,11 @@ en:
|
|||
answerbox:
|
||||
header:
|
||||
anon_hint: :inbox.entry.anon_hint
|
||||
answers:
|
||||
zero: "0 answers"
|
||||
one: "1 answer"
|
||||
other: "%{count} answers"
|
||||
asked: "%{user} asked %{time} ago"
|
||||
actions:
|
||||
share:
|
||||
twitter: "Share on Twitter"
|
||||
|
@ -89,9 +94,17 @@ en:
|
|||
unsubscribe: "Unsubscribe"
|
||||
return: "Return to Inbox"
|
||||
comments:
|
||||
none: "There are no comments yet."
|
||||
placeholder: "Comment..."
|
||||
actions:
|
||||
view_smiles: "View comment smiles"
|
||||
smiles:
|
||||
none: "No one smiled this yet."
|
||||
application:
|
||||
answerbox:
|
||||
read: "Read the entire answer"
|
||||
answered: "%{hide} %{user}" # resolves into "Answered by %{user}"
|
||||
hide: "Answered by"
|
||||
questionbox:
|
||||
title: "Ask something!"
|
||||
required: "This user does not want to get asked by strangers. Why don't you %{signup}?"
|
||||
|
|
Loading…
Reference in New Issue