Add translations for questionbox
This commit is contained in:
parent
b657894576
commit
cf74d6f4c8
|
@ -1,46 +1,46 @@
|
||||||
.card
|
.card
|
||||||
.card-header
|
.card-header
|
||||||
- if user.profile.motivation_header.blank?
|
- if user.profile.motivation_header.blank?
|
||||||
= t 'views.questionbox.title'
|
= t(".title")
|
||||||
- else
|
- else
|
||||||
= user.profile.motivation_header
|
= user.profile.motivation_header
|
||||||
.card-body
|
.card-body
|
||||||
- if user.banned?
|
- if user.banned?
|
||||||
.text-center
|
.text-center
|
||||||
%strong= t 'views.questionbox.banned'
|
%strong= t(".status.banned")
|
||||||
- else
|
- else
|
||||||
- if user_signed_in? || user.privacy_allow_anonymous_questions?
|
- if user_signed_in? || user.privacy_allow_anonymous_questions?
|
||||||
#question-box
|
#question-box
|
||||||
%textarea.form-control{ name: 'qb-question', placeholder: t('views.placeholder.question') }
|
%textarea.form-control{ name: "qb-question", placeholder: t(".placeholder") }
|
||||||
.row{ style: 'padding-top: 5px; padding-left: 5px; padding-right: 5px;' }
|
.row{ style: "padding-top: 5px; padding-left: 5px; padding-right: 5px;" }
|
||||||
.col-6
|
.col-6
|
||||||
- if user_signed_in?
|
- if user_signed_in?
|
||||||
- if user.privacy_allow_anonymous_questions?
|
- if user.privacy_allow_anonymous_questions?
|
||||||
%input{ name: 'qb-anonymous', type: :checkbox }/
|
%input{ name: "qb-anonymous", type: :checkbox }/
|
||||||
= t 'views.actions.anonymous'
|
= t(".anonymous")
|
||||||
%br/
|
%br/
|
||||||
- else
|
- else
|
||||||
%input{ name: 'qb-anonymous', type: :hidden, value: false }/
|
%input{ name: "qb-anonymous", type: :hidden, value: false }/
|
||||||
.col-6
|
.col-6
|
||||||
%p.pull-right
|
%p.pull-right
|
||||||
%input{ name: 'qb-to', type: 'hidden', value: user.id }/
|
%input{ name: "qb-to", type: "hidden", value: user.id }/
|
||||||
%button.btn.btn-primary{ name: 'qb-ask',
|
%button.btn.btn-primary{ name: "qb-ask",
|
||||||
type: :button,
|
type: :button,
|
||||||
data: { loading_text: t('views.questionbox.load'), promote: user_signed_in? ? 'false' : 'true' } }
|
data: { loading_text: t(".load"), promote: user_signed_in? ? "false" : "true" } }
|
||||||
Ask
|
Ask
|
||||||
- unless user_signed_in?
|
- unless user_signed_in?
|
||||||
- if user.privacy_allow_anonymous_questions?
|
- if user.privacy_allow_anonymous_questions?
|
||||||
.d-none#question-box-promote
|
.d-none#question-box-promote
|
||||||
.row
|
.row
|
||||||
.col-12.text-center
|
.col-12.text-center
|
||||||
%strong= t 'views.questionbox.promote.message'
|
%strong= t(".promote.message")
|
||||||
.row
|
.row
|
||||||
.col-sm-5.offset-sm-1
|
.col-sm-5.offset-sm-1
|
||||||
%button.btn.btn-block.btn-primary#create-account= t 'views.questionbox.promote.create'
|
%button.btn.btn-block.btn-primary#create-account= t(".promote.create")
|
||||||
.col-sm-5
|
.col-sm-5
|
||||||
%button.btn.btn-block.btn-default#new-question= t 'views.questionbox.promote.another'
|
%button.btn.btn-block.btn-default#new-question= t(".promote.another")
|
||||||
.row
|
.row
|
||||||
.col-xs-12.col-sm-10.offset-sm-1.text-center
|
.col-xs-12.col-sm-10.offset-sm-1.text-center
|
||||||
%small= t('views.questionbox.promote.join', app_title: APP_CONFIG['site_name'])
|
%small= t(".promote.join", app_title: APP_CONFIG["site_name"])
|
||||||
- else
|
- else
|
||||||
%p= raw t 'views.questionbox.required', signup: link_to(t('views.sessions.new'), new_user_registration_path)
|
%p= raw t(".required"), signup: link_to(t("views.sessions.new"), new_user_registration_path)
|
||||||
|
|
|
@ -12,6 +12,20 @@ en:
|
||||||
title: "Create Announcement"
|
title: "Create Announcement"
|
||||||
edit:
|
edit:
|
||||||
title: "Edit Announcement"
|
title: "Edit Announcement"
|
||||||
|
application:
|
||||||
|
questionbox:
|
||||||
|
title: "Ask something!"
|
||||||
|
required: "This user does not want to get asked by strangers. Why don't you %{signup}?"
|
||||||
|
placeholder: "Type your question here…"
|
||||||
|
anonymous: "Hide your name"
|
||||||
|
load: "Asking…"
|
||||||
|
promote:
|
||||||
|
message: "Your question has been sent."
|
||||||
|
create: "Create an account"
|
||||||
|
another: "Ask another question"
|
||||||
|
join: "Join %{app_title} today! You'll be able to follow and ask people you know and a lot more."
|
||||||
|
status:
|
||||||
|
banned: "This user got hit with ye olde banhammer."
|
||||||
devise:
|
devise:
|
||||||
registrations:
|
registrations:
|
||||||
edit:
|
edit:
|
||||||
|
|
Loading…
Reference in New Issue