Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
## Supported Languages

Currently, you've selected %PROJECT_LANGUAGE_COUNT% [Languages](%PROJECT_LANGUAGE_SETTINGS%), per section 5.1 of %RULES% we ask that you confirm all selected languages are accurate.

Selected languages should represent what players can expect to see on your server, and all players should be able to get the full experience out of your server even if they only understand one of the selected languages.
50 changes: 21 additions & 29 deletions packages/moderation/src/data/stages/description.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,66 +10,58 @@ const description: Stage = {
guidance_url: 'https://modrinth.com/legal/rules#general-expectations',
navigate: '/',
actions: [
{
id: 'description_insufficient',
type: 'button',
label: 'Insufficient (custom)',
weight: 400,
suggestedStatus: 'flagged',
severity: 'medium',
message: async () =>
(await import('../messages/description/insufficient/insufficient.md?raw')).default,
relevantExtraInput: [
{
label: 'Please elaborate on how the author can improve their description.',
variable: 'EXPLAINER',
large: true,
required: true,
},
],
disablesActions: [
'description_insufficient_packs',
'description_insufficient_projects',
'description_insufficient_servers',
],
} as ButtonAction,
{
id: 'description_insufficient_packs',
type: 'button',
label: 'Insufficient',
weight: 401,
weight: 400,
suggestedStatus: 'flagged',
severity: 'medium',
shouldShow: (project, projectV3) =>
project.project_type === 'modpack' && !projectV3?.minecraft_server,
message: async () =>
(await import('../messages/description/insufficient/insufficient-packs.md?raw')).default,
disablesActions: ['description_insufficient'],
} as ButtonAction,
{
id: 'description_insufficient_projects',
type: 'button',
label: 'Insufficient',
weight: 401,
weight: 400,
suggestedStatus: 'flagged',
severity: 'medium',
shouldShow: (project, projectV3) =>
project.project_type !== 'modpack' && !projectV3?.minecraft_server,
message: async () =>
(await import('../messages/description/insufficient/insufficient-projects.md?raw')).default,
disablesActions: ['description_insufficient'],
} as ButtonAction,
{
id: 'description_insufficient_servers',
type: 'button',
label: 'Insufficient',
weight: 401,
weight: 400,
suggestedStatus: 'flagged',
severity: 'medium',
shouldShow: (project, projectV3) => !!projectV3?.minecraft_java_server,
message: async () =>
(await import('../messages/description/insufficient/insufficient-servers.md?raw')).default,
disablesActions: ['description_insufficient'],
} as ButtonAction,
{
id: 'description_insufficient',
type: 'button',
label: 'Insufficient (custom)',
weight: 401,
suggestedStatus: 'flagged',
severity: 'medium',
message: async () =>
(await import('../messages/description/insufficient/insufficient.md?raw')).default,
relevantExtraInput: [
{
label: 'Please elaborate on how the author can improve their description.',
variable: 'EXPLAINER',
large: true,
required: true,
},
],
} as ButtonAction,
{
id: 'description_non_english',
Expand Down
20 changes: 20 additions & 0 deletions packages/moderation/src/data/stages/rule-following.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,28 @@ const ruleFollowing: Stage = {
weight: 0,
suggestedStatus: 'rejected',
severity: 'critical',
shouldShow(project, projectV3) {
return !!projectV3?.minecraft_server
},
message: async () => (await import('../messages/paid-access-server.md?raw')).default,
},
{
id: 'excessive_languages',
type: 'button',
label: 'Excessive languages',
weight: 0,
suggestedStatus: 'flagged',
severity: 'low',
shouldShow(project, projectV3) {
return (
!!projectV3?.minecraft_server &&
!!projectV3?.minecraft_server?.languages?.length &&
projectV3?.minecraft_server?.languages?.length > 4
)
},
message: async () =>
(await import('../messages/misc-metadata/excessive_languages-server.md?raw')).default,
},
],
}

Expand Down
3 changes: 3 additions & 0 deletions packages/moderation/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -412,5 +412,8 @@ export function flattenProjectV3Variables(
vars['PROJECT_SITE_URL'] = projectV3.link_urls?.site?.url || 'None'
vars['PROJECT_STORE_URL'] = projectV3.link_urls?.store?.url || 'None'

vars['PROJECT_LANGUAGES'] = projectV3.minecraft_server?.languages?.toString() || 'None'
vars['PROJECT_LANGUAGE_COUNT'] = (projectV3.minecraft_server?.languages?.length || 0).toString()

return vars
}