Translate admin (#1702)
* Translate the domain_block panel Signed-off-by: Thomas Citharel <tcit@tcit.fr> * Translate PubSubHubbub section Signed-off-by: Thomas Citharel <tcit@tcit.fr> * translate account section and correct typos * move reports translation & translate sidebar Signed-off-by: Thomas Citharel <tcit@tcit.fr> * normalize l18n
This commit is contained in:
parent
d9dc0fe84e
commit
c0c56db0fa
12 changed files with 235 additions and 80 deletions
|
@ -1,30 +1,30 @@
|
|||
- content_for :page_title do
|
||||
Accounts
|
||||
= t('admin.accounts.title')
|
||||
|
||||
.filters
|
||||
.filter-subset
|
||||
%strong Location
|
||||
%strong= t('admin.accounts.location.title')
|
||||
%ul
|
||||
%li= filter_link_to 'All', local: nil, remote: nil
|
||||
%li= filter_link_to 'Local', local: '1', remote: nil
|
||||
%li= filter_link_to 'Remote', remote: '1', local: nil
|
||||
%li= filter_link_to t('admin.accounts.location.all'), local: nil, remote: nil
|
||||
%li= filter_link_to t('admin.accounts.location.local'), local: '1', remote: nil
|
||||
%li= filter_link_to t('admin.accounts.location.remote'), remote: '1', local: nil
|
||||
.filter-subset
|
||||
%strong Moderation
|
||||
%strong= t('admin.accounts.moderation.title')
|
||||
%ul
|
||||
%li= filter_link_to 'All', silenced: nil, suspended: nil
|
||||
%li= filter_link_to 'Silenced', silenced: '1'
|
||||
%li= filter_link_to 'Suspended', suspended: '1'
|
||||
%li= filter_link_to t('admin.accounts.moderation.all'), silenced: nil, suspended: nil
|
||||
%li= filter_link_to t('admin.accounts.moderation.silenced'), silenced: '1'
|
||||
%li= filter_link_to t('admin.accounts.moderation.suspended'), suspended: '1'
|
||||
.filter-subset
|
||||
%strong Order
|
||||
%strong= t('admin.accounts.order.title')
|
||||
%ul
|
||||
%li= filter_link_to 'Alphabetic', recent: nil
|
||||
%li= filter_link_to 'Most recent', recent: '1'
|
||||
%li= filter_link_to t('admin.accounts.order.alphabetic'), recent: nil
|
||||
%li= filter_link_to t('admin.accounts.order.most_recent'), recent: '1'
|
||||
|
||||
%table.table
|
||||
%thead
|
||||
%tr
|
||||
%th Username
|
||||
%th Domain
|
||||
%th= t('admin.accounts.username')
|
||||
%th= t('admin.accounts.domain')
|
||||
%th= fa_icon 'paper-plane-o'
|
||||
%th
|
||||
%tbody
|
||||
|
@ -36,14 +36,14 @@
|
|||
= link_to account.domain, admin_accounts_path(by_domain: account.domain)
|
||||
%td
|
||||
- if account.local?
|
||||
Local
|
||||
= t('admin.accounts.location.local')
|
||||
- elsif account.subscribed?
|
||||
%i.fa.fa-check
|
||||
- else
|
||||
%i.fa.fa-times
|
||||
%td
|
||||
= table_link_to 'circle', 'Web', web_path("accounts/#{account.id}")
|
||||
= table_link_to 'globe', 'Public', TagManager.instance.url_for(account)
|
||||
= table_link_to 'pencil', 'Edit', admin_account_path(account.id)
|
||||
= table_link_to 'circle', t('admin.accounts.web'), web_path("accounts/#{account.id}")
|
||||
= table_link_to 'globe', t('admin.accounts.public'), TagManager.instance.url_for(account)
|
||||
= table_link_to 'pencil', t('admin.accounts.edit'), admin_account_path(account.id)
|
||||
|
||||
= paginate @accounts
|
||||
|
|
|
@ -4,24 +4,24 @@
|
|||
%table.table
|
||||
%tbody
|
||||
%tr
|
||||
%th Username
|
||||
%th= t('admin.accounts.username')
|
||||
%td= @account.username
|
||||
%tr
|
||||
%th Domain
|
||||
%th= t('admin.accounts.domain')
|
||||
%td= @account.domain
|
||||
%tr
|
||||
%th Display name
|
||||
%th= t('admin.accounts.display_name')
|
||||
%td= @account.display_name
|
||||
|
||||
- if @account.local?
|
||||
%tr
|
||||
%th E-mail
|
||||
%th= t('admin.accounts.email')
|
||||
%td= @account.user.email
|
||||
%tr
|
||||
%th Most recent IP
|
||||
%th= t('admin.accounts.most_recent_ip')
|
||||
%td= @account.user.current_sign_in_ip
|
||||
%tr
|
||||
%th Most recent activity
|
||||
%th= t('admin.accounts.most_recent_activity')
|
||||
%td
|
||||
- if @account.user.current_sign_in_at
|
||||
= l @account.user.current_sign_in_at
|
||||
|
@ -29,44 +29,44 @@
|
|||
Never
|
||||
- else
|
||||
%tr
|
||||
%th Profile URL
|
||||
%th= t('admin.accounts.profile_url')
|
||||
%td= link_to @account.url
|
||||
%tr
|
||||
%th Feed URL
|
||||
%th= t('admin.accounts.feed_url')
|
||||
%td= link_to @account.remote_url
|
||||
%tr
|
||||
%th PuSH subscription expires
|
||||
%th= t('admin.accounts.push_subscription_expires')
|
||||
%td
|
||||
- if @account.subscribed?
|
||||
= l @account.subscription_expires_at
|
||||
- else
|
||||
Not subscribed
|
||||
= t('admin.accounts.not_subscribed')
|
||||
%tr
|
||||
%th Salmon URL
|
||||
%th= t('admin.accounts.salmon_url')
|
||||
%td= link_to @account.salmon_url
|
||||
|
||||
%tr
|
||||
%th Follows
|
||||
%th= t('admin.accounts.follows')
|
||||
%td= @account.following_count
|
||||
%tr
|
||||
%th Followers
|
||||
%th= t('admin.accounts.followers')
|
||||
%td= @account.followers_count
|
||||
%tr
|
||||
%th Statuses
|
||||
%th= t('admin.accounts.statuses')
|
||||
%td= @account.statuses_count
|
||||
%tr
|
||||
%th Media attachments
|
||||
%th= t('admin.accounts.media_attachments')
|
||||
%td
|
||||
= @account.media_attachments.count
|
||||
= surround '(', ')' do
|
||||
= number_to_human_size @account.media_attachments.sum('file_file_size')
|
||||
|
||||
- if @account.silenced?
|
||||
= link_to 'Undo silence', admin_account_silence_path(@account.id), method: :delete, class: 'button'
|
||||
= link_to t('admin.accounts.undo_silenced'), admin_account_silence_path(@account.id), method: :delete, class: 'button'
|
||||
- else
|
||||
= link_to 'Silence', admin_account_silence_path(@account.id), method: :post, class: 'button'
|
||||
= link_to t('admin.accounts.silence'), admin_account_silence_path(@account.id), method: :post, class: 'button'
|
||||
|
||||
- if @account.suspended?
|
||||
= link_to 'Undo suspension', admin_account_suspension_path(@account.id), method: :delete, class: 'button'
|
||||
= link_to t('admin.accounts.undo_suspension'), admin_account_suspension_path(@account.id), method: :delete, class: 'button'
|
||||
- else
|
||||
= link_to 'Perform full suspension', admin_account_suspension_path(@account.id), method: :post, data: { confirm: 'Are you sure?' }, class: 'button'
|
||||
= link_to t('admin.accounts.perform_full_suspension'), admin_account_suspension_path(@account.id), method: :post, data: { confirm: t('admin.accounts.are_you_sure') }, class: 'button'
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
- content_for :page_title do
|
||||
Domain Blocks
|
||||
= t('admin.domain_block.title')
|
||||
|
||||
%table.table
|
||||
%thead
|
||||
%tr
|
||||
%th Domain
|
||||
%th Severity
|
||||
%th= t('admin.domain_block.domain')
|
||||
%th= t('admin.domain_block.severity')
|
||||
%tbody
|
||||
- @blocks.each do |block|
|
||||
%tr
|
||||
|
@ -14,4 +14,4 @@
|
|||
%td= block.severity
|
||||
|
||||
= paginate @blocks
|
||||
= link_to 'Add new', new_admin_domain_block_path, class: 'button'
|
||||
= link_to t('admin.domain_block.add_new'), new_admin_domain_block_path, class: 'button'
|
||||
|
|
|
@ -1,18 +1,14 @@
|
|||
- content_for :page_title do
|
||||
New domain block
|
||||
= t('admin.domain_block.new.title')
|
||||
|
||||
= simple_form_for @domain_block, url: admin_domain_blocks_path do |f|
|
||||
= render 'shared/error_messages', object: @domain_block
|
||||
|
||||
%p.hint The domain block will not prevent creation of account entries in the database, but will retroactively and automatically apply specific moderation methods on those accounts.
|
||||
%p.hint= t('admin.domain_block.new.hint')
|
||||
|
||||
= f.input :domain, placeholder: 'Domain'
|
||||
= f.input :severity, collection: DomainBlock.severities.keys, wrapper: :with_label, include_blank: false
|
||||
= f.input :domain, placeholder: t('admin.domain_block.domain')
|
||||
= f.input :severity, collection: DomainBlock.severities.keys, wrapper: :with_label, include_blank: false, label_method: lambda { |type| I18n.t("admin.domain_block.new.severity.#{type}") }
|
||||
|
||||
%p.hint
|
||||
%strong Silence
|
||||
will make the account's posts invisible to anyone who isn't following them.
|
||||
%strong Suspend
|
||||
will remove all of the account's content, media, and profile data.
|
||||
%p.hint= t('admin.domain_block.new.severity.desc_html')
|
||||
.actions
|
||||
= f.button :button, 'Create block', type: :submit
|
||||
= f.button :button, t('admin.domain_block.new.create'), type: :submit
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
- content_for :page_title do
|
||||
PubSubHubbub
|
||||
= t('admin.pubsubhubbub.title')
|
||||
|
||||
%table.table
|
||||
%thead
|
||||
%tr
|
||||
%th Topic
|
||||
%th Callback URL
|
||||
%th Confirmed
|
||||
%th Expires in
|
||||
%th Last delivery
|
||||
%th= t('admin.pubsubhubbub.topic')
|
||||
%th= t('admin.pubsubhubbub.callback_url')
|
||||
%th= t('admin.pubsubhubbub.confirmed')
|
||||
%th= t('admin.pubsubhubbub.expires_in')
|
||||
%th= t('admin.pubsubhubbub.last_delivery')
|
||||
%tbody
|
||||
- @subscriptions.each do |subscription|
|
||||
%tr
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
- content_for :page_title do
|
||||
= t('reports.reports')
|
||||
= t('admin.reports.title')
|
||||
|
||||
.filters
|
||||
.filter-subset
|
||||
%strong= t('reports.status')
|
||||
%strong= t('admin.reports.status')
|
||||
%ul
|
||||
%li= filter_link_to t('reports.unresolved'), action_taken: nil
|
||||
%li= filter_link_to t('reports.resolved'), action_taken: '1'
|
||||
%li= filter_link_to t('admin.reports.unresolved'), action_taken: nil
|
||||
%li= filter_link_to t('admin.reports.resolved'), action_taken: '1'
|
||||
|
||||
= form_tag do
|
||||
|
||||
|
@ -14,10 +14,10 @@
|
|||
%thead
|
||||
%tr
|
||||
%th
|
||||
%th= t('reports.id')
|
||||
%th= t('reports.target')
|
||||
%th= t('reports.reported_by')
|
||||
%th= t('reports.comment.label')
|
||||
%th= t('admin.reports.id')
|
||||
%th= t('admin.reports.target')
|
||||
%th= t('admin.reports.reported_by')
|
||||
%th= t('admin.reports.comment.label')
|
||||
%th
|
||||
%tbody
|
||||
- @reports.each do |report|
|
||||
|
@ -27,6 +27,6 @@
|
|||
%td= link_to report.target_account.acct, admin_account_path(report.target_account.id)
|
||||
%td= link_to report.account.acct, admin_account_path(report.account.id)
|
||||
%td= truncate(report.comment, length: 30, separator: ' ')
|
||||
%td= table_link_to 'circle', t('reports.view'), admin_report_path(report)
|
||||
%td= table_link_to 'circle', t('admin.reports.view'), admin_report_path(report)
|
||||
|
||||
= paginate @reports
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
- content_for :page_title do
|
||||
= t('reports.report', id: @report.id)
|
||||
= t('admin.reports.report', id: @report.id)
|
||||
|
||||
.report-accounts
|
||||
.report-accounts__item
|
||||
%strong= t('reports.reported_account')
|
||||
%strong= t('admin.reports.reported_account')
|
||||
= render partial: 'authorize_follow/card', locals: { account: @report.target_account }
|
||||
.report-accounts__item
|
||||
%strong= t('reports.reported_by')
|
||||
%strong= t('admin.reports.reported_by')
|
||||
= render partial: 'authorize_follow/card', locals: { account: @report.account }
|
||||
|
||||
%p
|
||||
%strong= t('reports.comment.label')
|
||||
%strong= t('admin.reports.comment.label')
|
||||
\:
|
||||
= @report.comment.presence || t('reports.comment.none')
|
||||
|
||||
|
@ -22,7 +22,7 @@
|
|||
.activity-stream.activity-stream-headless
|
||||
.entry= render partial: 'stream_entries/simple_status', locals: { status: status }
|
||||
.report-status__actions
|
||||
= link_to remove_admin_report_path(@report, status_id: status.id), method: :post, class: 'icon-button', style: 'font-size: 24px; width: 24px; height: 24px', title: t('reports.delete') do
|
||||
= link_to remove_admin_report_path(@report, status_id: status.id), method: :post, class: 'icon-button', style: 'font-size: 24px; width: 24px; height: 24px', title: t('admin.reports.delete') do
|
||||
= fa_icon 'trash'
|
||||
|
||||
- if !@report.action_taken?
|
||||
|
@ -30,10 +30,10 @@
|
|||
|
||||
%div{ style: 'overflow: hidden' }
|
||||
%div{ style: 'float: right' }
|
||||
= link_to t('reports.silence_account'), silence_admin_report_path(@report), method: :post, class: 'button'
|
||||
= link_to t('reports.suspend_account'), suspend_admin_report_path(@report), method: :post, class: 'button'
|
||||
= link_to t('admin.reports.silence_account'), silence_admin_report_path(@report), method: :post, class: 'button'
|
||||
= link_to t('admin.reports.suspend_account'), suspend_admin_report_path(@report), method: :post, class: 'button'
|
||||
%div{ style: 'float: left' }
|
||||
= link_to t('reports.mark_as_resolved'), resolve_admin_report_path(@report), method: :post, class: 'button'
|
||||
= link_to t('admin.reports.mark_as_resolved'), resolve_admin_report_path(@report), method: :post, class: 'button'
|
||||
- elsif !@report.action_taken_by_account.nil?
|
||||
%hr/
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue