From d6fe0c94ca48a10d579cf5ec321c33c6124b402d Mon Sep 17 00:00:00 2001 From: Takeshi Umeda Date: Thu, 5 Nov 2020 04:45:01 +0900 Subject: Add account sensitized (#14361) * Add account sensitized * Fix i18n normalize * Fix description and spec * Fix spec * Fix wording --- config/locales/en.yml | 10 ++++++++++ config/locales/ja.yml | 10 ++++++++++ config/locales/simple_form.en.yml | 1 + config/locales/simple_form.ja.yml | 1 + 4 files changed, 22 insertions(+) (limited to 'config/locales') diff --git a/config/locales/en.yml b/config/locales/en.yml index 084006a2a..c962bc532 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -188,6 +188,8 @@ en: search: Search search_same_email_domain: Other users with the same e-mail domain search_same_ip: Other users with the same IP + sensitive: Sensitive + sensitized: marked as sensitive shared_inbox_url: Shared inbox URL show: created_reports: Made reports @@ -202,6 +204,7 @@ en: time_in_queue: Waiting in queue %{time} title: Accounts unconfirmed_email: Unconfirmed email + undo_sensitized: Undo sensitive undo_silenced: Undo silence undo_suspension: Undo suspension unsilenced_msg: Successfully unlimited %{username}'s account @@ -243,9 +246,11 @@ en: reopen_report: Reopen Report reset_password_user: Reset Password resolve_report: Resolve Report + sensitive_account: Mark the media in your account as sensitive silence_account: Silence Account suspend_account: Suspend Account unassigned_report: Unassign Report + unsensitive_account: Unmark the media in your account as sensitive unsilence_account: Unsilence Account unsuspend_account: Unsuspend Account update_announcement: Update Announcement @@ -281,9 +286,11 @@ en: reopen_report: "%{name} reopened report %{target}" reset_password_user: "%{name} reset password of user %{target}" resolve_report: "%{name} resolved report %{target}" + sensitive_account: "%{name} marked %{target}'s media as sensitive" silence_account: "%{name} silenced %{target}'s account" suspend_account: "%{name} suspended %{target}'s account" unassigned_report: "%{name} unassigned report %{target}" + unsensitive_account: "%{name} unmarked %{target}'s media as sensitive" unsilence_account: "%{name} unsilenced %{target}'s account" unsuspend_account: "%{name} unsuspended %{target}'s account" update_announcement: "%{name} updated announcement %{target}" @@ -1339,6 +1346,7 @@ en: warning: explanation: disable: You can no longer login to your account or use it in any other way, but your profile and other data remains intact. + sensitive: Your uploaded media files and linked media will be treated as sensitive. silence: You can still use your account but only people who are already following you will see your toots on this server, and you may be excluded from various public listings. However, others may still manually follow you. suspend: You can no longer use your account, and your profile and other data are no longer accessible. You can still login to request a backup of your data until the data is fully removed, but we will retain some data to prevent you from evading the suspension. get_in_touch: You can reply to this e-mail to get in touch with the staff of %{instance}. @@ -1347,11 +1355,13 @@ en: subject: disable: Your account %{acct} has been frozen none: Warning for %{acct} + sensitive: Your account %{acct} posting media has been marked as sensitive silence: Your account %{acct} has been limited suspend: Your account %{acct} has been suspended title: disable: Account frozen none: Warning + sensitive: Your media has been marked as sensitive silence: Account limited suspend: Account suspended welcome: diff --git a/config/locales/ja.yml b/config/locales/ja.yml index fb6255546..fd9ec9427 100644 --- a/config/locales/ja.yml +++ b/config/locales/ja.yml @@ -172,6 +172,8 @@ ja: search: 検索 search_same_email_domain: 同じドメインのメールアドレスを使用しているユーザー search_same_ip: 同じ IP のユーザーを検索 + sensitive: 閲覧注意 + sensitized: 閲覧注意済み shared_inbox_url: Shared inbox URL show: created_reports: このアカウントで作られた通報 @@ -184,6 +186,7 @@ ja: time_in_queue: "%{time} 待ち" title: アカウント unconfirmed_email: 確認待ちのメールアドレス + undo_sensitized: 閲覧注意から戻す undo_silenced: サイレンスから戻す undo_suspension: 停止から戻す unsubscribe: 購読の解除 @@ -220,9 +223,11 @@ ja: reopen_report: 通報を再度開く reset_password_user: パスワードをリセット resolve_report: 通報を解決済みにする + sensitive_account: アカウントのメディアを閲覧注意にマーク silence_account: アカウントをサイレンス suspend_account: アカウントを停止 unassigned_report: 通報の担当を解除 + unsensitive_account: アカウントのメディアの閲覧注意マークを解除 unsilence_account: アカウントのサイレンスを解除 unsuspend_account: アカウントの停止を解除 update_announcement: お知らせを更新 @@ -256,9 +261,11 @@ ja: reopen_report: "%{name} さんが通報 %{target} を再び開きました" reset_password_user: "%{name} さんが %{target} さんのパスワードをリセットしました" resolve_report: "%{name} さんが通報 %{target} を解決済みにしました" + sensitive_account: "%{name} さんが %{target} さんのメディアを閲覧注意にマークしました" silence_account: "%{name} さんが %{target} さんをサイレンスにしました" suspend_account: "%{name} さんが %{target} さんを停止しました" unassigned_report: "%{name} さんが通報 %{target} の担当を外しました" + unsensitive_account: "%{name} さんが %{target} さんのメディアの閲覧注意を解除しました" unsilence_account: "%{name} さんが %{target} さんのサイレンスを解除しました" unsuspend_account: "%{name} さんが %{target} さんの停止を解除しました" update_announcement: "%{name} さんがお知らせ %{target} を更新しました" @@ -1271,6 +1278,7 @@ ja: warning: explanation: disable: アカウントが凍結されている間、データはそのまま残りますが、凍結が解除されるまでは何の操作もできません。 + sensitive: あなたのアップロードしたメディアファイルとリンク先のメディアは、閲覧注意として扱われます。 silence: あなたのアカウントは制限されていますが、あなたをフォローしているユーザーのみ、このサーバー上の投稿を見ることができます。そしてあなたは様々な公開リストから除外されるかもしれません。ただし、他のユーザーは手動であなたをフォローすることができます。 suspend: あなたのアカウントは停止されています。あなたの投稿とアップロードされたメディアファイルは、このサーバーとあなたのフォロワーが参加していたサーバーから完全に削除されました。 get_in_touch: このメールに返信することで %{instance} のスタッフと連絡を取ることができます。 @@ -1279,11 +1287,13 @@ ja: subject: disable: あなたのアカウント %{acct} は凍結されました none: "%{acct} に対する警告" + sensitive: あなたのアカウント %{acct} の投稿メディアは閲覧注意とマークされました silence: あなたのアカウント %{acct} はサイレンスにされました suspend: あなたのアカウント %{acct} は停止されました title: disable: アカウントが凍結されました none: 警告 + sensitive: あなたのメディアが閲覧注意とマークされました silence: アカウントがサイレンスにされました suspend: アカウントが停止されました welcome: diff --git a/config/locales/simple_form.en.yml b/config/locales/simple_form.en.yml index b69487953..46a4759a8 100644 --- a/config/locales/simple_form.en.yml +++ b/config/locales/simple_form.en.yml @@ -100,6 +100,7 @@ en: types: disable: Freeze none: Send a warning + sensitive: Sensitive silence: Limit suspend: Suspend warning_preset_id: Use a warning preset diff --git a/config/locales/simple_form.ja.yml b/config/locales/simple_form.ja.yml index bbc0b5fd7..00f469b87 100644 --- a/config/locales/simple_form.ja.yml +++ b/config/locales/simple_form.ja.yml @@ -91,6 +91,7 @@ ja: types: disable: ログインを無効化 none: 何もしない + sensitive: 閲覧注意 silence: サイレンス suspend: 停止しアカウントのデータを恒久的に削除する warning_preset_id: プリセット警告文を使用 -- cgit From 68d4b2b83e124719f8473489ee8c1743ca848dc4 Mon Sep 17 00:00:00 2001 From: Mélanie Chauvel Date: Wed, 4 Nov 2020 21:15:45 +0100 Subject: Display “Show newer” and “Show older” instead of “Show more” in public pages (#15052) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/helpers/statuses_helper.rb | 8 ++++++-- app/views/accounts/show.html.haml | 4 ++-- app/views/statuses/_status.html.haml | 8 ++++---- config/locales/en.yml | 2 ++ 4 files changed, 14 insertions(+), 8 deletions(-) (limited to 'config/locales') diff --git a/app/helpers/statuses_helper.rb b/app/helpers/statuses_helper.rb index adb7918c5..daed9048f 100644 --- a/app/helpers/statuses_helper.rb +++ b/app/helpers/statuses_helper.rb @@ -4,8 +4,12 @@ module StatusesHelper EMBEDDED_CONTROLLER = 'statuses' EMBEDDED_ACTION = 'embed' - def link_to_more(url) - link_to t('statuses.show_more'), url, class: 'load-more load-gap' + def link_to_newer(url) + link_to t('statuses.show_newer'), url, class: 'load-more load-gap' + end + + def link_to_older(url) + link_to t('statuses.show_older'), url, class: 'load-more load-gap' end def nothing_here(extra_classes = '') diff --git a/app/views/accounts/show.html.haml b/app/views/accounts/show.html.haml index c9688ea88..1a81b96f6 100644 --- a/app/views/accounts/show.html.haml +++ b/app/views/accounts/show.html.haml @@ -39,12 +39,12 @@ = render partial: 'statuses/status', collection: @pinned_statuses, as: :status, locals: { pinned: true } - if @newer_url - .entry= link_to_more @newer_url + .entry= link_to_newer @newer_url = render partial: 'statuses/status', collection: @statuses, as: :status - if @older_url - .entry= link_to_more @older_url + .entry= link_to_older @older_url .column-1 - if @account.memorial? diff --git a/app/views/statuses/_status.html.haml b/app/views/statuses/_status.html.haml index 0e3652503..650f9b679 100644 --- a/app/views/statuses/_status.html.haml +++ b/app/views/statuses/_status.html.haml @@ -17,7 +17,7 @@ - if status.reply? && include_threads - if @next_ancestor .entry{ class: entry_classes } - = link_to_more ActivityPub::TagManager.instance.url_for(@next_ancestor) + = link_to_older ActivityPub::TagManager.instance.url_for(@next_ancestor) = render partial: 'statuses/status', collection: @ancestors, as: :status, locals: { is_predecessor: true, direct_reply_id: status.in_reply_to_id }, autoplay: autoplay @@ -44,16 +44,16 @@ - if include_threads - if @since_descendant_thread_id .entry{ class: entry_classes } - = link_to_more short_account_status_url(status.account.username, status, max_descendant_thread_id: @since_descendant_thread_id + 1) + = link_to_newer short_account_status_url(status.account.username, status, max_descendant_thread_id: @since_descendant_thread_id + 1) - @descendant_threads.each do |thread| = render partial: 'statuses/status', collection: thread[:statuses], as: :status, locals: { is_successor: true, parent_id: status.id }, autoplay: autoplay - if thread[:next_status] .entry{ class: entry_classes } - = link_to_more ActivityPub::TagManager.instance.url_for(thread[:next_status]) + = link_to_newer ActivityPub::TagManager.instance.url_for(thread[:next_status]) - if @next_descendant_thread .entry{ class: entry_classes } - = link_to_more short_account_status_url(status.account.username, status, since_descendant_thread_id: @max_descendant_thread_id - 1) + = link_to_newer short_account_status_url(status.account.username, status, since_descendant_thread_id: @max_descendant_thread_id - 1) - if include_threads && !embedded_view? && !user_signed_in? .entry{ class: entry_classes } diff --git a/config/locales/en.yml b/config/locales/en.yml index c962bc532..047ba36ac 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1210,6 +1210,8 @@ en: other: "%{count} votes" vote: Vote show_more: Show more + show_newer: Show newer + show_older: Show older show_thread: Show thread sign_in_to_participate: Sign in to participate in the conversation title: '%{name}: "%{quote}"' -- cgit