From 9b58fb1ea4036daca945cb524e674446adb9ac42 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 2 Mar 2022 18:57:44 +0100 Subject: [PATCH] Add descriptions to trending features in admin UI (#17677) --- app/views/admin/trends/links/index.html.haml | 4 ++++ .../trends/links/preview_card_providers/index.html.haml | 5 ++++- app/views/admin/trends/statuses/_status.html.haml | 3 +++ app/views/admin/trends/statuses/index.html.haml | 4 ++++ app/views/admin/trends/tags/index.html.haml | 4 ++++ config/locales/en.yml | 5 +++++ 6 files changed, 24 insertions(+), 1 deletion(-) diff --git a/app/views/admin/trends/links/index.html.haml b/app/views/admin/trends/links/index.html.haml index 79f3513d31..49a53d979b 100644 --- a/app/views/admin/trends/links/index.html.haml +++ b/app/views/admin/trends/links/index.html.haml @@ -4,6 +4,10 @@ - content_for :header_tags do = javascript_pack_tag 'admin', async: true, crossorigin: 'anonymous' +%p= t('admin.trends.links.description_html') + +%hr.spacer/ + = form_tag admin_trends_links_path, method: 'GET', class: 'simple_form' do - Trends::PreviewCardFilter::KEYS.each do |key| = hidden_field_tag key, params[key] if params[key].present? diff --git a/app/views/admin/trends/links/preview_card_providers/index.html.haml b/app/views/admin/trends/links/preview_card_providers/index.html.haml index b793499477..c3648c35e9 100644 --- a/app/views/admin/trends/links/preview_card_providers/index.html.haml +++ b/app/views/admin/trends/links/preview_card_providers/index.html.haml @@ -4,6 +4,10 @@ - content_for :header_tags do = javascript_pack_tag 'admin', async: true, crossorigin: 'anonymous' +%p= t('admin.trends.preview_card_providers.description_html') + +%hr.spacer/ + .filters .filter-subset %strong= t('admin.tags.review') @@ -17,7 +21,6 @@ = fa_icon 'chevron-left fw' = t('admin.trends.links.title') - %hr.spacer/ = form_for(@form, url: batch_admin_trends_links_preview_card_providers_path) do |f| diff --git a/app/views/admin/trends/statuses/_status.html.haml b/app/views/admin/trends/statuses/_status.html.haml index c99ee5d60e..edb27b9ff5 100644 --- a/app/views/admin/trends/statuses/_status.html.haml +++ b/app/views/admin/trends/statuses/_status.html.haml @@ -22,6 +22,9 @@ - if status.language.present? • = standard_locale_name(status.language) + - if status.trendable? && !status.account.discoverable? + • + = t('admin.trends.statuses.not_discoverable') - if status.trendable? && (rank = Trends.statuses.rank(status.id)) • %abbr{ title: t('admin.trends.tags.current_score', score: Trends.statuses.score(status.id)) }= t('admin.trends.tags.trending_rank', rank: rank + 1) diff --git a/app/views/admin/trends/statuses/index.html.haml b/app/views/admin/trends/statuses/index.html.haml index 3476882628..b0059b20d7 100644 --- a/app/views/admin/trends/statuses/index.html.haml +++ b/app/views/admin/trends/statuses/index.html.haml @@ -4,6 +4,10 @@ - content_for :header_tags do = javascript_pack_tag 'admin', async: true, crossorigin: 'anonymous' +%p= t('admin.trends.statuses.description_html') + +%hr.spacer/ + = form_tag admin_trends_statuses_path, method: 'GET', class: 'simple_form' do - Trends::StatusFilter::KEYS.each do |key| = hidden_field_tag key, params[key] if params[key].present? diff --git a/app/views/admin/trends/tags/index.html.haml b/app/views/admin/trends/tags/index.html.haml index 8a2f785bc2..bde32a2952 100644 --- a/app/views/admin/trends/tags/index.html.haml +++ b/app/views/admin/trends/tags/index.html.haml @@ -4,6 +4,10 @@ - content_for :header_tags do = javascript_pack_tag 'admin', async: true, crossorigin: 'anonymous' +%p= t('admin.trends.tags.description_html') + +%hr.spacer/ + .filters .filter-subset %strong= t('admin.tags.review') diff --git a/config/locales/en.yml b/config/locales/en.yml index 5ce43be1ab..6a55941858 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -777,6 +777,7 @@ en: links: allow: Allow link allow_provider: Allow publisher + description_html: These are links that are currently being shared a lot by accounts that your server sees posts from. It can help your users find out what's going on in the world. No links are displayed publicly until you approve the publisher. You can also allow or reject individual links. disallow: Disallow link disallow_provider: Disallow publisher shared_by_over_week: @@ -788,14 +789,17 @@ en: pending_review: Pending review preview_card_providers: allowed: Links from this publisher can trend + description_html: These are domains from which links are often shared on your server. Links will not trend publicly unless the domain of the link is approved. Your approval (or rejection) extends to subdomains. rejected: Links from this publisher won't trend title: Publishers rejected: Rejected statuses: allow: Allow post allow_account: Allow author + description_html: These are posts that your server knows about that are currently being shared and favourited a lot at the moment. It can help your new and returning users to find more people to follow. No posts are displayed publicly until you approve the author, and the author allows their account to be suggested to others. You can also allow or reject individual posts. disallow: Disallow post disallow_account: Disallow author + not_discoverable: Author has not opted-in to being discoverable shared_by: one: Shared or favourited one time other: Shared and favourited %{friendly_count} times @@ -808,6 +812,7 @@ en: tag_servers_dimension: Top servers tag_servers_measure: different servers tag_uses_measure: total uses + description_html: These are hashtags that are currently appearing in a lot of posts that your server sees. It can help your users find out what people are talking the most about at the moment. No hashtags are displayed publicly until you approve them. listable: Can be suggested not_listable: Won't be suggested not_trendable: Won't appear under trends