Skip to content

Commit

Permalink
perf: let the user to know who sent the warning
Browse files Browse the repository at this point in the history
  • Loading branch information
mashirozx committed Jul 22, 2022
1 parent e63e31b commit 34bb47c
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 0 deletions.
6 changes: 6 additions & 0 deletions app/views/user_mailer/warning.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@
%p
%strong= t('user_mailer.warning.reason')
= t("user_mailer.warning.categories.#{@warning.report.category}")
%p
%strong= t('user_mailer.warning.disposer')
%span{ style: 'border: 1px solid #393f4f; padding: 5px; border-radius: 4px;' }
= image_tag full_asset_url(@warning.account.avatar.url), alt:'', width: 20, height: 20, style: 'border-radius: 50%; vertical-align: middle;'
= display_name(@warning.account)
= " (#{"@#{@warning.account.pretty_acct}"})"

- if @warning.report.violation? && @warning.report.rule_ids.present?
%ul.rules-list
Expand Down
2 changes: 2 additions & 0 deletions app/views/user_mailer/warning.text.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
<% if @warning.report && [email protected]? %>
**<%= t('user_mailer.warning.reason') %>** <%= t("user_mailer.warning.categories.#{@warning.report.category}") %>

**<%= t('user_mailer.warning.disposer') %>** <%= display_name(@warning.account) %> (<%= "@#{@warning.account.pretty_acct}" %>)

<% if @warning.report.violation? && @warning.report.rule_ids.present? %>
<% @warning.report.rules.each do |rule| %>
- <%= rule.text %>
Expand Down
1 change: 1 addition & 0 deletions config/locales/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1808,6 +1808,7 @@ en:
categories:
spam: Spam
violation: Content violates the following community guidelines
disposer: 'Disposer:'
explanation:
delete_statuses: Some of your posts have been found to violate one or more community guidelines and have been subsequently removed by the moderators of %{instance}.
disable: You can no longer use your account, but your profile and other data remains intact. You can request a backup of your data, change account settings or delete your account.
Expand Down
1 change: 1 addition & 0 deletions config/locales/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1752,6 +1752,7 @@ zh-CN:
categories:
spam: 垃圾信息
violation: 内容违反了以下社区准则
disposer: 处置人:
explanation:
delete_statuses: 你的一些嘟文被发现违反了一条或多条社区准则,并已被 %{instance} 的监察员删除。
disable: 你不能再使用你的帐户,但你的个人资料和其他数据保持不变。你可以请求数据备份,更改账户设置或删除账户。
Expand Down
1 change: 1 addition & 0 deletions config/locales/zh-TW.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1733,6 +1733,7 @@ zh-TW:
categories:
spam: 垃圾訊息
violation: 該內容違反以下社群規章
disposer: 处置人:
explanation:
delete_statuses: 您的某些嘟文被發現違反了一項或多項社群準則,隨後已被 %{instance} 的管理員刪除。
disable: 您無法繼續使用您的帳號,但您的個人頁面及其他資料內容保持不變。您可以要求一份您的資料備份,帳號異動設定,或是刪除帳號。
Expand Down

0 comments on commit 34bb47c

Please sign in to comment.