From bc986c6624f5791a22ec9dceb7358aba37f2e2e6 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Fri, 24 Jun 2022 01:13:27 +0200 Subject: [PATCH] Add translations for block settings page --- app/views/settings/_blocks.haml | 26 ++++++++------------------ config/locales/views.en.yml | 11 +++++++++++ 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/app/views/settings/_blocks.haml b/app/views/settings/_blocks.haml index b2bbbf9f..4160b157 100644 --- a/app/views/settings/_blocks.haml +++ b/app/views/settings/_blocks.haml @@ -1,9 +1,7 @@ .card .card-body - %h2 Blocks - %p - Here every user you are currently blocking is listed with a quick option to unblock them. You can block users on their profile using the "Actions" dropdown. - + %h2= t(".section.blocks.heading") + %p= t(".section.blocks.body") %ul.list-group - @blocks.each do |block| %li.list-group-item @@ -11,30 +9,22 @@ %img.avatar-md.d-none.d-sm-inline.mr-2{ src: block.target.profile_picture.url(:small) } %div %p.mb-0= user_screen_name(block.target) - %p.text-muted.mb-0 - blocked - = time_ago_in_words(block.created_at) - ago + %p.text-muted.mb-0= t(".blocked", time: time_ago_in_words(block.created_at)) .ml-auto.d-inline-flex %button.btn.btn-default.align-self-center{ data: { action: :unblock, target: block.target.screen_name } } - %span.pe-none Unblock + %span.pe-none= t("views.actions.unblock") .card .card-body - %h2 Anonymous Blocks - %p - Here every anonymous user you are blocking is listed with a quick option to unblock them. Anonymous users can be blocked from questions in your inbox. To provide - more context on who you blocked, the question they asked you is provided as context. + %h2= t(".section.anon_blocks.heading") + %p= t(".section.anon_blocks.body") %ul.list-group - @anonymous_blocks.each do |block| %li.list-group-item .d-flex %div %p.mb-0= block.question.content - %p.text-muted.mb-0 - blocked - = time_ago_in_words(block.created_at) - ago + %p.text-muted.mb-0= t(".blocked", time: time_ago_in_words(block.created_at)) .ml-auto.d-inline-flex %button.btn.btn-default.align-self-center{ data: { action: "anon-unblock", target: block.id } } - %span.pe-none Unblock + %span.pe-none= t("views.actions.unblock") diff --git a/config/locales/views.en.yml b/config/locales/views.en.yml index c23e871a..0467cc78 100644 --- a/config/locales/views.en.yml +++ b/config/locales/views.en.yml @@ -92,6 +92,15 @@ en: delete: action: "Delete my account" heading: "Unsatisfied?" + blocks: + blocked: "blocked %{time} ago" + section: + blocks: + heading: "Blocks" + body: "Here every user you are currently blocking is listed with a quick option to unblock them. You can block users on their profile using the 'Actions' dropdown." + anon_blocks: + heading: "Anonymous Blocks" + body: "Here every anonymous user you are blocking is listed with a quick option to unblock them. Anonymous users can be blocked from questions in your inbox. To provide more context on who you blocked, the question they asked you is provided as context." data: heading: "Your Profile Data" body: "Everything we have about you! Really, not that much as you might expect." @@ -316,6 +325,8 @@ en: title: "Your Data" edit: title: "Profile Settings" + edit_blocks: + title: "Blocks" edit_mute: title: "Muted Words" edit_privacy: