Add translations for ban modal
This commit is contained in:
parent
b32e67d01b
commit
bb23f6b3f0
|
@ -4,44 +4,37 @@
|
||||||
.modal-content#ban-control-super
|
.modal-content#ban-control-super
|
||||||
.modal-header
|
.modal-header
|
||||||
%h5.modal-title#modal-ban-label
|
%h5.modal-title#modal-ban-label
|
||||||
= t 'views.modal.bancontrol.title'
|
= t '.title'
|
||||||
%button.close{ data: { dismiss: :modal }, type: :button }
|
%button.close{ data: { dismiss: :modal }, type: :button }
|
||||||
%span{ aria: { hidden: true } } ×
|
%span{ aria: { hidden: true } } ×
|
||||||
%span.sr-only Close
|
%span.sr-only= t 'views.actions.close'
|
||||||
= bootstrap_form_tag(url: '/mod/ban', html: { method: :post, novalidate: :novalidate }) do |f|
|
= bootstrap_form_tag(url: '/mod/ban', html: { method: :post, novalidate: :novalidate }) do |f|
|
||||||
= f.hidden_field :user, value: user.screen_name
|
= f.hidden_field :user, value: user.screen_name
|
||||||
- if current_ban.nil?
|
- if current_ban.nil?
|
||||||
.modal-body
|
.modal-body
|
||||||
= f.check_box :ban, label: t('views.modal.bancontrol.ban'), checked: user.banned?
|
= f.check_box :ban, label: t('.is_banned'), checked: user.banned?
|
||||||
#ban-controls{ class: user.banned? ? '' : 'd-none' }
|
#ban-controls{ class: user.banned? ? '' : 'd-none' }
|
||||||
= f.check_box :permaban, label: t('views.modal.bancontrol.permanent'), checked: user.permanently_banned?
|
= f.check_box :permaban, label: t('.is_permanent'), checked: user.permanently_banned?
|
||||||
#ban-controls-time{ class: user.permanently_banned? ? 'd-none' : '' }
|
#ban-controls-time{ class: user.permanently_banned? ? 'd-none' : '' }
|
||||||
= f.text_field :duration, label: '', required: true
|
= f.text_field :duration, label: '', required: true
|
||||||
.form-check.form-check-inline
|
.form-check.form-check-inline
|
||||||
= f.radio_button :duration_unit, 'hours', label: 'Hours', checked: true
|
= f.radio_button :duration_unit, t('time.hours'), label: 'Hours', checked: true
|
||||||
= f.radio_button :duration_unit, 'days', label: 'Days'
|
= f.radio_button :duration_unit, t('time.days'), label: 'Days'
|
||||||
= f.radio_button :duration_unit, 'weeks', label: 'Weeks'
|
= f.radio_button :duration_unit, t('time.weeks'), label: 'Weeks'
|
||||||
= f.radio_button :duration_unit, 'months', label: 'Months'
|
= f.radio_button :duration_unit, t('time.months'), label: 'Months'
|
||||||
= f.text_field :reason, placeholder: t('views.modal.bancontrol.reason'), value: user.bans.current.first&.reason
|
= f.text_field :reason, placeholder: t('.reason'), value: user.bans.current.first&.reason
|
||||||
.modal-footer
|
.modal-footer
|
||||||
%button.btn.btn-default{ name: 'stop-time', type: :button, data: { dismiss: :modal } }= t 'views.actions.close'
|
%button.btn.btn-default{ name: 'stop-time', type: :button, data: { dismiss: :modal } }= t 'views.actions.close'
|
||||||
= f.submit t('views.modal.bancontrol.hammertime'), class: 'btn btn-primary', name: 'hammer-time'
|
= f.submit t('.hammertime'), class: 'btn btn-primary', name: 'hammer-time'
|
||||||
- else
|
- else
|
||||||
= f.hidden_field :ban, value: '0'
|
= f.hidden_field :ban, value: '0'
|
||||||
.modal-body
|
.modal-body
|
||||||
- if current_ban.expires_at.nil?
|
- if current_ban.expires_at.nil?
|
||||||
This user is currently permanently banned for
|
= t '.banned_permanently_html', reason: current_ban.reason
|
||||||
%strong= current_ban.reason
|
|
||||||
- else
|
- else
|
||||||
This user is currently banned until
|
= t '.banned_temporarily_html', reason: current_ban.reason, until: current_ban.expires_at.strftime('%Y-%m-%d %H:%M:%S')
|
||||||
%strong= current_ban.expires_at
|
|
||||||
for
|
|
||||||
%strong= current_ban.reason
|
|
||||||
- if current_ban.banned_by.present?
|
- if current_ban.banned_by.present?
|
||||||
%br
|
%br
|
||||||
This ban was instated by
|
= t '.banned_by_html', user: current_ban.banned_by.screen_name, on: current_ban.created_at.strftime('%Y-%m-%d %H:%M:%S')
|
||||||
%strong= current_ban.banned_by.profile.safe_name
|
|
||||||
on
|
|
||||||
%strong= current_ban.created_at
|
|
||||||
.modal-footer
|
.modal-footer
|
||||||
= f.submit 'Unban', class: 'btn btn-primary', name: 'hammer-time'
|
= f.submit t '.unban', class: 'btn btn-primary', name: 'hammer-time'
|
||||||
|
|
|
@ -295,12 +295,6 @@ en:
|
||||||
title: "Ask your followers"
|
title: "Ask your followers"
|
||||||
choose: "Choose list:"
|
choose: "Choose list:"
|
||||||
loading: "Asking..."
|
loading: "Asking..."
|
||||||
bancontrol:
|
|
||||||
title: "Ban Control Center"
|
|
||||||
ban: "Ban?"
|
|
||||||
permanent: "Permanently?"
|
|
||||||
reason: "Reason"
|
|
||||||
hammertime: "Hammer Time"
|
|
||||||
list:
|
list:
|
||||||
title: "Manage list memberships"
|
title: "Manage list memberships"
|
||||||
tabs:
|
tabs:
|
||||||
|
|
|
@ -81,6 +81,16 @@ en:
|
||||||
modal:
|
modal:
|
||||||
password:
|
password:
|
||||||
title: "Save account changes"
|
title: "Save account changes"
|
||||||
|
ban:
|
||||||
|
title: "Ban Control Center"
|
||||||
|
reason: "Reason"
|
||||||
|
is_banned: "Ban?"
|
||||||
|
is_permanent: "Permanently?"
|
||||||
|
hammertime: "Hammer Time"
|
||||||
|
unban: "Unban"
|
||||||
|
banned_permanently_html: "This user is currently permanently banned for <strong>%{reason}</strong>"
|
||||||
|
banned_temporarily_html: "This user is currently banned until <strong>%{until}</strong> for <strong>%{reason}</strong>"
|
||||||
|
banned_by_html: "This ban was instated by <strong>%{user}</strong> on <strong>%{on}</strong>"
|
||||||
services:
|
services:
|
||||||
index:
|
index:
|
||||||
title: "Service Settings"
|
title: "Service Settings"
|
||||||
|
|
|
@ -18,3 +18,7 @@ en:
|
||||||
noauth: "You must be signed in to do this."
|
noauth: "You must be signed in to do this."
|
||||||
time:
|
time:
|
||||||
distance_ago: "%{time} ago"
|
distance_ago: "%{time} ago"
|
||||||
|
hours: "hours"
|
||||||
|
days: "days"
|
||||||
|
weeks: "weeks"
|
||||||
|
months: "months"
|
||||||
|
|
Loading…
Reference in New Issue