fix: i18n string problems (#6131)

* fix: apply non-json i18n fixes

* fix: pruning

* fix: prepr

* fix: run.mjs

* fix: lint
This commit is contained in:
Calum H.
2026-05-29 16:55:39 +01:00
committed by GitHub
parent 5c1ffd9ff2
commit 047b8c3bf7
165 changed files with 1283 additions and 5626 deletions
+14 -6
View File
@@ -1,4 +1,4 @@
import { defineMessage, useVIntl } from '@modrinth/ui'
import { defineMessage, formatProjectTypeSentence, useVIntl } from '@modrinth/ui'
import type { Nag, NagContext } from '../../types/nags'
@@ -106,10 +106,19 @@ export const coreNags: Nag[] = [
defineMessage({
id: 'nags.upload-gallery-image.description',
defaultMessage:
'At least one gallery image is required to showcase the content of your {type, select, resourcepack {resource pack, except for audio or localization packs. If this describes your pack, please select the appropriate tag} shader {shader} other {project}}.',
'At least one gallery image is required to showcase the content of your {type}.',
}),
{
type: context.project.project_type,
type:
context.project.project_type === 'resourcepack'
? formatMessage(
defineMessage({
id: 'nags.upload-gallery-image.resourcepack-type',
defaultMessage:
'resource pack, except for audio or localization packs. If this describes your pack, please select the appropriate tag',
}),
)
: formatProjectTypeSentence(formatMessage, context.project.project_type),
},
)
},
@@ -174,11 +183,10 @@ export const coreNags: Nag[] = [
return formatMessage(
defineMessage({
id: 'nags.select-license.description',
defaultMessage:
'Select the license your {type, select, mod {mod} modpack {modpack} resourcepack {resource pack} shader {shader} plugin {plugin} datapack {data pack} other {project}} is distributed under.',
defaultMessage: 'Select the license your {type} is distributed under.',
}),
{
type: context.project.project_type,
type: formatProjectTypeSentence(formatMessage, context.project.project_type),
},
)
},
+4 -4
View File
@@ -1,4 +1,4 @@
import { defineMessage, useVIntl } from '@modrinth/ui'
import { defineMessage, formatProjectTypeSentence, useVIntl } from '@modrinth/ui'
import type { Nag, NagContext } from '../../types/nags'
@@ -133,7 +133,7 @@ export const linksNags: Nag[] = [
id: 'identical-links',
title: defineMessage({
id: 'nags.identical-links.title',
defaultMessage: 'Identical Links',
defaultMessage: 'Clean up identical links',
}),
description: defineMessage({
id: 'nags.identical-links.description',
@@ -315,10 +315,10 @@ export const linksNags: Nag[] = [
defineMessage({
id: 'nags.gpl-license-source-required.description',
defaultMessage:
'Your {type, select, mod {mod} plugin {plugin} other {project}} uses a license which requires source code to be available. Please provide a source code link or sources file for each additional version, or consider using a different license.',
'Your {type} uses a license which requires source code to be available. Please provide a source code link or sources file for each additional version, or consider using a different license.',
}),
{
type: context.project.project_type,
type: formatProjectTypeSentence(formatMessage, context.project.project_type),
},
)
},
+2 -5
View File
@@ -1,5 +1,5 @@
import type { Labrinth } from '@modrinth/api-client'
import { defineMessage, useVIntl } from '@modrinth/ui'
import { defineMessage, formatCategory, useVIntl } from '@modrinth/ui'
import type { Nag, NagContext } from '../../types/nags'
@@ -150,10 +150,7 @@ export const tagsNags: Nag[] = [
}),
{
count: resolutionTags.length,
tags: sortedTags
.join(', ')
.replace('8x-', '8x or lower')
.replace('512x+', '512x or higher'),
tags: sortedTags.map((tag) => formatCategory(formatMessage, tag)).join(', '),
},
)
},