Skip to content

Commit

Permalink
Add legal as report category (mastodon#23941)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gargron committed Jun 6, 2023
1 parent e4fd950 commit 67d17ce
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/javascript/mastodon/features/report/category.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ const messages = defineMessages({
dislike_description: { id: 'report.reasons.dislike_description', defaultMessage: 'It is not something you want to see' },
spam: { id: 'report.reasons.spam', defaultMessage: 'It\'s spam' },
spam_description: { id: 'report.reasons.spam_description', defaultMessage: 'Malicious links, fake engagement, or repetitive replies' },
legal: { id: 'report.reasons.legal', defaultMessage: 'It\'s illegal' },
legal_description: { id: 'report.reasons.legal_description', defaultMessage: 'You believe it violates the law of your or the server\'s country' },
violation: { id: 'report.reasons.violation', defaultMessage: 'It violates server rules' },
violation_description: { id: 'report.reasons.violation_description', defaultMessage: 'You are aware that it breaks specific rules' },
other: { id: 'report.reasons.other', defaultMessage: 'It\'s something else' },
Expand Down Expand Up @@ -69,11 +71,13 @@ class Category extends PureComponent {
const options = rules.size > 0 ? [
'dislike',
'spam',
'legal',
'violation',
'other',
] : [
'dislike',
'spam',
'legal',
'other',
];

Expand Down
2 changes: 2 additions & 0 deletions app/javascript/mastodon/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,8 @@
"report.placeholder": "Additional comments",
"report.reasons.dislike": "I don't like it",
"report.reasons.dislike_description": "It is not something you want to see",
"report.reasons.legal": "It's illegal",
"report.reasons.legal_description": "You believe it violates the law of your or the server's country",
"report.reasons.other": "It's something else",
"report.reasons.other_description": "The issue does not fit into other categories",
"report.reasons.spam": "It's spam",
Expand Down
1 change: 1 addition & 0 deletions app/models/report.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class Report < ApplicationRecord
enum category: {
other: 0,
spam: 1_000,
legal: 1_500,
violation: 2_000,
}

Expand Down

0 comments on commit 67d17ce

Please sign in to comment.