mirror of
https://github.com/modrinth/code.git
synced 2026-08-27 18:14:49 +00:00
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:
@@ -1371,7 +1371,7 @@ const messages = defineMessages({
|
||||
},
|
||||
downloadsStat: {
|
||||
id: 'project.stats.downloads-label',
|
||||
defaultMessage: 'download{count, plural, one {} other {s}}',
|
||||
defaultMessage: '{count, plural, one {download} other {downloads}}',
|
||||
},
|
||||
errorLoadingProject: {
|
||||
id: 'project.error.loading',
|
||||
@@ -1401,7 +1401,7 @@ const messages = defineMessages({
|
||||
},
|
||||
followersStat: {
|
||||
id: 'project.stats.followers-label',
|
||||
defaultMessage: 'follower{count, plural, one {} other {s}}',
|
||||
defaultMessage: '{count, plural, one {follower} other {followers}}',
|
||||
},
|
||||
galleryTab: {
|
||||
id: 'project.gallery.title',
|
||||
|
||||
@@ -373,7 +373,7 @@ const messages = defineMessages({
|
||||
},
|
||||
infiniteTimesInfiniteMB: {
|
||||
id: 'app-marketing.features.performance.infinite-times-infinite-mb',
|
||||
defaultMessage: '∞ * ∞ MB',
|
||||
defaultMessage: '∞ × ∞ MB',
|
||||
},
|
||||
performant: {
|
||||
id: 'app-marketing.features.performance.title',
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div>
|
||||
<NewModal ref="editLinksModal" :header="formatMessage(messages.editLinksButton)">
|
||||
<NewModal ref="editLinksModal" :header="formatMessage(messages.editLinksHeader)">
|
||||
<div class="universal-modal links-modal !p-0">
|
||||
<p>{{ formatMessage(messages.editLinksDescription) }}</p>
|
||||
<section class="links">
|
||||
@@ -360,6 +360,10 @@ const messages = defineMessages({
|
||||
id: 'dashboard.projects.links.button.edit',
|
||||
defaultMessage: 'Edit links',
|
||||
},
|
||||
editLinksHeader: {
|
||||
id: 'dashboard.projects.links.header.edit',
|
||||
defaultMessage: 'Edit links',
|
||||
},
|
||||
editLinksDescription: {
|
||||
id: 'dashboard.projects.links.description',
|
||||
defaultMessage:
|
||||
@@ -387,7 +391,7 @@ const messages = defineMessages({
|
||||
},
|
||||
wikiPageDescription: {
|
||||
id: 'dashboard.projects.links.wiki-page.description',
|
||||
defaultMessage: 'A page containing information, documentation, and help for the project.',
|
||||
defaultMessage: 'A page containing information, documentation, and help for the project',
|
||||
},
|
||||
discordInviteLabel: {
|
||||
id: 'dashboard.projects.links.discord-invite.label',
|
||||
|
||||
@@ -19,6 +19,7 @@ import {
|
||||
commonMessages,
|
||||
CreationFlowModal,
|
||||
defineMessages,
|
||||
formatProjectTypeSentence,
|
||||
injectModrinthClient,
|
||||
PROJECT_DEP_MARKER_QUERY,
|
||||
provideBrowseManager,
|
||||
@@ -350,18 +351,16 @@ const messages = defineMessages({
|
||||
},
|
||||
seoTitle: {
|
||||
id: 'discover.seo.title',
|
||||
defaultMessage:
|
||||
'Search {projectType, select, mod {mods} modpack {modpacks} resourcepack {resource packs} shader {shaders} plugin {plugins} datapack {datapacks} other {projects}}',
|
||||
defaultMessage: 'Search {projectType}',
|
||||
},
|
||||
seoTitleWithQuery: {
|
||||
id: 'discover.seo.title-with-query',
|
||||
defaultMessage:
|
||||
'Search {projectType, select, mod {mods} modpack {modpacks} resourcepack {resource packs} shader {shaders} plugin {plugins} datapack {datapacks} other {projects}} | {query}',
|
||||
defaultMessage: 'Search {projectType} | {query}',
|
||||
},
|
||||
seoDescription: {
|
||||
id: 'discover.seo.description',
|
||||
defaultMessage:
|
||||
'Search and browse thousands of Minecraft {projectType, select, mod {mods} modpack {modpacks} resourcepack {resource packs} shader {shaders} plugin {plugins} datapack {datapacks} other {projects}} on Modrinth with instant, accurate search results. Our filters help you quickly find the best Minecraft {projectType, select, mod {mods} modpack {modpacks} resourcepack {resource packs} shader {shaders} plugin {plugins} datapack {datapacks} other {projects}}.',
|
||||
'Search and browse thousands of Minecraft {projectType} on Modrinth with instant, accurate search results. Our filters help you quickly find the best Minecraft {projectType}.',
|
||||
},
|
||||
gameVersionShaderMessage: {
|
||||
id: 'search.filter.game-version-shader-message',
|
||||
@@ -417,13 +416,25 @@ searchState.refreshSearch()
|
||||
const ogTitle = computed(() =>
|
||||
searchState.query.value
|
||||
? formatMessage(messages.seoTitleWithQuery, {
|
||||
projectType: projectType.value?.id ?? 'project',
|
||||
projectType: formatProjectTypeSentence(
|
||||
formatMessage,
|
||||
projectType.value?.id ?? 'project',
|
||||
2,
|
||||
),
|
||||
query: searchState.query.value,
|
||||
})
|
||||
: formatMessage(messages.seoTitle, { projectType: projectType.value?.id ?? 'project' }),
|
||||
: formatMessage(messages.seoTitle, {
|
||||
projectType: formatProjectTypeSentence(
|
||||
formatMessage,
|
||||
projectType.value?.id ?? 'project',
|
||||
2,
|
||||
),
|
||||
}),
|
||||
)
|
||||
const description = computed(() =>
|
||||
formatMessage(messages.seoDescription, { projectType: projectType.value?.id ?? 'project' }),
|
||||
formatMessage(messages.seoDescription, {
|
||||
projectType: formatProjectTypeSentence(formatMessage, projectType.value?.id ?? 'project', 2),
|
||||
}),
|
||||
)
|
||||
|
||||
useSeoMeta({
|
||||
|
||||
@@ -125,10 +125,9 @@
|
||||
</div>
|
||||
</section>
|
||||
<p>
|
||||
Changes will be applied to
|
||||
<strong>{{ selectedProjects.length }}</strong> project{{
|
||||
selectedProjects.length > 1 ? 's' : ''
|
||||
}}.
|
||||
{{
|
||||
formatMessage(messages.editLinksAffectedProjects, { count: selectedProjects.length })
|
||||
}}
|
||||
</p>
|
||||
<ul>
|
||||
<li
|
||||
@@ -339,6 +338,7 @@ import {
|
||||
Checkbox,
|
||||
commonMessages,
|
||||
CopyCode,
|
||||
defineMessages,
|
||||
DropdownSelect,
|
||||
injectModrinthClient,
|
||||
injectNotificationManager,
|
||||
@@ -359,6 +359,14 @@ const client = injectModrinthClient()
|
||||
const { addNotification } = injectNotificationManager()
|
||||
const { formatMessage } = useVIntl()
|
||||
|
||||
const messages = defineMessages({
|
||||
editLinksAffectedProjects: {
|
||||
id: 'organization.settings.projects.edit-links.affected-projects',
|
||||
defaultMessage:
|
||||
'Changes will be applied to {count, plural, one {# project} other {# projects}}.',
|
||||
},
|
||||
})
|
||||
|
||||
const { organization, projects, refresh } = injectOrganizationContext()
|
||||
|
||||
const auth = await useAuth()
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
>
|
||||
{{
|
||||
formatMessage(messages.alreadyReportedDescription, {
|
||||
item: reportItem || 'content',
|
||||
item: formatReportItemType(formatMessage, reportItem),
|
||||
})
|
||||
}}
|
||||
<div class="flex gap-2">
|
||||
@@ -28,7 +28,7 @@
|
||||
<LeftArrowIcon />
|
||||
{{
|
||||
formatMessage(messages.backToItem, {
|
||||
item: reportItem || 'content',
|
||||
item: formatReportItemType(formatMessage, reportItem),
|
||||
})
|
||||
}}
|
||||
</nuxt-link>
|
||||
@@ -131,7 +131,7 @@
|
||||
<span class="text-lg font-bold text-contrast">
|
||||
{{
|
||||
formatMessage(messages.whatContentId, {
|
||||
item: reportItem || 'content',
|
||||
item: formatReportItemType(formatMessage, reportItem),
|
||||
})
|
||||
}}
|
||||
</span>
|
||||
@@ -154,7 +154,11 @@
|
||||
<div v-if="checkingId || checkedId" class="flex items-center gap-1">
|
||||
<template v-if="checkingId">
|
||||
<SpinnerIcon class="animate-spin" />
|
||||
{{ formatMessage(messages.checking, { item: reportItem }) }}...
|
||||
{{
|
||||
formatMessage(messages.checking, {
|
||||
item: formatReportItemType(formatMessage, reportItem),
|
||||
})
|
||||
}}
|
||||
</template>
|
||||
<template v-else-if="checkedId && itemName">
|
||||
<AutoLink
|
||||
@@ -178,7 +182,7 @@
|
||||
<IssuesIcon />
|
||||
{{
|
||||
formatMessage(messages.couldNotFind, {
|
||||
item: reportItem,
|
||||
item: formatReportItemType(formatMessage, reportItem),
|
||||
})
|
||||
}}
|
||||
</span>
|
||||
@@ -189,7 +193,7 @@
|
||||
<template v-if="existingReport">
|
||||
{{
|
||||
formatMessage(messages.alreadyReportedDescription, {
|
||||
item: reportItem || 'content',
|
||||
item: formatReportItemType(formatMessage, reportItem),
|
||||
})
|
||||
}}
|
||||
<ButtonStyled color="brand">
|
||||
@@ -203,7 +207,7 @@
|
||||
<span class="text-lg font-bold text-contrast">
|
||||
{{
|
||||
formatMessage(messages.whatReportReason, {
|
||||
item: reportItem || 'content',
|
||||
item: formatReportItemType(formatMessage, reportItem),
|
||||
})
|
||||
}}
|
||||
</span>
|
||||
@@ -286,6 +290,7 @@ import {
|
||||
Avatar,
|
||||
ButtonStyled,
|
||||
defineMessages,
|
||||
formatReportItemType,
|
||||
injectNotificationManager,
|
||||
IntlFormatted,
|
||||
MarkdownEditor,
|
||||
@@ -559,12 +564,11 @@ const messages = defineMessages({
|
||||
alreadyReportedDescription: {
|
||||
id: 'report.already-reported-description',
|
||||
defaultMessage:
|
||||
'You have an open report for this {item, select, project {project} version {version} user {user} other {content}} already. You can add more details to your report if you have more information to add.',
|
||||
'You have an open report for this {item} already. You can add more details to your report if you have more information to add.',
|
||||
},
|
||||
backToItem: {
|
||||
id: 'report.back-to-item',
|
||||
defaultMessage:
|
||||
'Back to {item, select, project {project} version {version} user {user} other {content}}',
|
||||
defaultMessage: 'Back to {item}',
|
||||
},
|
||||
goToReport: {
|
||||
id: 'report.go-to-report',
|
||||
@@ -610,23 +614,19 @@ const messages = defineMessages({
|
||||
},
|
||||
whatContentId: {
|
||||
id: 'report.question.content-id',
|
||||
defaultMessage:
|
||||
'What is the ID of the {item, select, project {project} version {version} user {user} other {content}}?',
|
||||
defaultMessage: 'What is the ID of the {item}?',
|
||||
},
|
||||
whatReportReason: {
|
||||
id: 'report.question.report-reason',
|
||||
defaultMessage:
|
||||
"Which of Modrinth's rules is this {item, select, project {project} version {version} user {user} other {content}} violating?",
|
||||
defaultMessage: "Which of Modrinth's rules is this {item} violating?",
|
||||
},
|
||||
checking: {
|
||||
id: 'report.checking',
|
||||
defaultMessage:
|
||||
'Checking {item, select, project {project} version {version} user {user} other {content}}...',
|
||||
defaultMessage: 'Checking {item}...',
|
||||
},
|
||||
couldNotFind: {
|
||||
id: 'report.could-not-find',
|
||||
defaultMessage:
|
||||
'Could not find {item, select, project {project} version {version} user {user} other {content}}',
|
||||
defaultMessage: 'Could not find {item}',
|
||||
},
|
||||
reportBodyTitle: {
|
||||
id: 'report.body.title',
|
||||
|
||||
@@ -150,7 +150,13 @@
|
||||
</Modal>
|
||||
<Modal
|
||||
ref="manageTwoFactorModal"
|
||||
:header="`${auth.user.has_totp && twoFactorStep === 0 ? formatMessage(messages.twoFactorRemoveButton) : formatMessage(messages.twoFactorSetupButton)}`"
|
||||
:header="
|
||||
formatMessage(
|
||||
auth.user.has_totp && twoFactorStep === 0
|
||||
? messages.twoFactorRemoveModalHeader
|
||||
: messages.twoFactorSetupModalHeader,
|
||||
)
|
||||
"
|
||||
>
|
||||
<div class="universal-modal">
|
||||
<template v-if="auth.user.has_totp && twoFactorStep === 0">
|
||||
@@ -649,6 +655,10 @@ const messages = defineMessages({
|
||||
id: 'settings.account.security.two-factor.action.setup',
|
||||
defaultMessage: 'Setup 2FA',
|
||||
},
|
||||
twoFactorSetupModalHeader: {
|
||||
id: 'settings.account.security.two-factor.modal.setup.header',
|
||||
defaultMessage: 'Setup 2FA',
|
||||
},
|
||||
twoFactorEnterCodeLabel: {
|
||||
id: 'settings.account.two-factor.field.code.label',
|
||||
defaultMessage: 'Enter two-factor code',
|
||||
@@ -669,6 +679,10 @@ const messages = defineMessages({
|
||||
id: 'settings.account.security.two-factor.action.remove',
|
||||
defaultMessage: 'Remove 2FA',
|
||||
},
|
||||
twoFactorRemoveModalHeader: {
|
||||
id: 'settings.account.security.two-factor.modal.remove.header',
|
||||
defaultMessage: 'Remove 2FA',
|
||||
},
|
||||
twoFactorSetupIntro: {
|
||||
id: 'settings.account.two-factor.setup.intro',
|
||||
defaultMessage:
|
||||
|
||||
@@ -84,11 +84,9 @@
|
||||
>
|
||||
<span class="opacity-70">{{ formatMessage(messages.nextLabel) }}</span>
|
||||
<span class="font-semibold text-contrast">
|
||||
{{ formatPrice(midasCharge.amount, midasCharge.currency_code) }}
|
||||
</span>
|
||||
<span>
|
||||
{{
|
||||
formatMessage(messages.slashInterval, {
|
||||
formatMessage(messages.pricePerInterval, {
|
||||
price: formatPrice(midasCharge.amount, midasCharge.currency_code),
|
||||
interval: getIntervalNounLabel(midasCharge.subscription_interval),
|
||||
})
|
||||
}}
|
||||
@@ -144,7 +142,7 @@
|
||||
>
|
||||
{{
|
||||
formatMessage(messages.switchesToBillingOn, {
|
||||
interval: getIntervalAdjectiveLabel(midasCharge.subscription_interval),
|
||||
interval: midasCharge.subscription_interval,
|
||||
date: formatDate(midasCharge.due),
|
||||
})
|
||||
}}
|
||||
@@ -239,10 +237,10 @@
|
||||
{{
|
||||
changingInterval
|
||||
? formatMessage(messages.switchingToInterval, {
|
||||
interval: getIntervalAdjectiveLabel(oppositeInterval),
|
||||
interval: oppositeInterval,
|
||||
})
|
||||
: formatMessage(messages.switchToInterval, {
|
||||
interval: getIntervalAdjectiveLabel(oppositeInterval),
|
||||
interval: oppositeInterval,
|
||||
})
|
||||
}}
|
||||
</button>
|
||||
@@ -375,22 +373,22 @@
|
||||
<span class="leading-none text-contrast">
|
||||
{{
|
||||
getProductPrice(getPyroProduct(subscription), subscription.interval)
|
||||
? formatPrice(
|
||||
getProductPrice(getPyroProduct(subscription), subscription.interval)
|
||||
.prices.intervals[subscription.interval],
|
||||
getProductPrice(getPyroProduct(subscription), subscription.interval)
|
||||
.currency_code,
|
||||
)
|
||||
? formatMessage(messages.pricePerInterval, {
|
||||
price: formatPrice(
|
||||
getProductPrice(
|
||||
getPyroProduct(subscription),
|
||||
subscription.interval,
|
||||
).prices.intervals[subscription.interval],
|
||||
getProductPrice(
|
||||
getPyroProduct(subscription),
|
||||
subscription.interval,
|
||||
).currency_code,
|
||||
),
|
||||
interval: getIntervalNounLabel(subscription.interval),
|
||||
})
|
||||
: ''
|
||||
}}
|
||||
</span>
|
||||
<span class="leading-none">
|
||||
{{
|
||||
formatMessage(messages.slashInterval, {
|
||||
interval: getIntervalNounLabel(subscription.interval),
|
||||
})
|
||||
}}
|
||||
</span>
|
||||
</h3>
|
||||
<div
|
||||
v-if="
|
||||
@@ -407,15 +405,11 @@
|
||||
<span class="opacity-70">{{ formatMessage(messages.nextLabel) }}</span>
|
||||
<span class="font-semibold text-contrast">
|
||||
{{
|
||||
formatPrice(
|
||||
getPyroCharge(subscription).amount,
|
||||
getPyroCharge(subscription).currency_code,
|
||||
)
|
||||
}}
|
||||
</span>
|
||||
<span>
|
||||
{{
|
||||
formatMessage(messages.slashInterval, {
|
||||
formatMessage(messages.pricePerInterval, {
|
||||
price: formatPrice(
|
||||
getPyroCharge(subscription).amount,
|
||||
getPyroCharge(subscription).currency_code,
|
||||
),
|
||||
interval: getIntervalNounLabel(
|
||||
getPyroCharge(subscription).subscription_interval ||
|
||||
subscription.interval,
|
||||
@@ -453,9 +447,7 @@
|
||||
>
|
||||
{{
|
||||
formatMessage(messages.switchesToBillingOn, {
|
||||
interval: getIntervalAdjectiveLabel(
|
||||
getPyroCharge(subscription).subscription_interval,
|
||||
),
|
||||
interval: getPyroCharge(subscription).subscription_interval,
|
||||
date: formatDate(getPyroCharge(subscription).due),
|
||||
})
|
||||
}}
|
||||
@@ -847,26 +839,10 @@ const messages = defineMessages({
|
||||
id: 'settings.billing.interval.quarter',
|
||||
defaultMessage: 'quarter',
|
||||
},
|
||||
intervalQuarterly: {
|
||||
id: 'settings.billing.interval.quarterly.adjective',
|
||||
defaultMessage: 'quarterly',
|
||||
},
|
||||
intervalMonthly: {
|
||||
id: 'settings.billing.interval.monthly',
|
||||
defaultMessage: 'monthly',
|
||||
},
|
||||
intervalYearly: {
|
||||
id: 'settings.billing.interval.yearly',
|
||||
defaultMessage: 'yearly',
|
||||
},
|
||||
pricePerInterval: {
|
||||
id: 'settings.billing.price.per-interval',
|
||||
defaultMessage: '{price} / {interval}',
|
||||
},
|
||||
slashInterval: {
|
||||
id: 'settings.billing.price.slash-interval',
|
||||
defaultMessage: '/{interval}',
|
||||
},
|
||||
nextLabel: {
|
||||
id: 'settings.billing.next',
|
||||
defaultMessage: 'Next:',
|
||||
@@ -930,7 +906,8 @@ const messages = defineMessages({
|
||||
},
|
||||
switchesToBillingOn: {
|
||||
id: 'settings.billing.switches-to-billing-on',
|
||||
defaultMessage: 'Switches to {interval} billing on {date}',
|
||||
defaultMessage:
|
||||
'Switches to {interval, select, monthly {monthly} yearly {yearly} other {{interval}}} billing on {date}',
|
||||
},
|
||||
orYearlySave: {
|
||||
id: 'settings.billing.or-yearly-save',
|
||||
@@ -942,11 +919,13 @@ const messages = defineMessages({
|
||||
},
|
||||
switchToInterval: {
|
||||
id: 'settings.billing.switch.to-interval',
|
||||
defaultMessage: 'Switch to {interval}',
|
||||
defaultMessage:
|
||||
'Switch to {interval, select, monthly {monthly} yearly {yearly} other {{interval}}}',
|
||||
},
|
||||
switchingToInterval: {
|
||||
id: 'settings.billing.switch.switching-to-interval',
|
||||
defaultMessage: 'Switching to {interval}',
|
||||
defaultMessage:
|
||||
'Switching to {interval, select, monthly {monthly} yearly {yearly} other {{interval}}}',
|
||||
},
|
||||
monthlyBillingAdditionalPerYearTooltip: {
|
||||
id: 'settings.billing.switch.tooltip.monthly-additional-per-year',
|
||||
@@ -1039,14 +1018,6 @@ function getIntervalNounLabel(interval) {
|
||||
: formatMessage(messages.intervalMonth)
|
||||
}
|
||||
|
||||
function getIntervalAdjectiveLabel(interval) {
|
||||
return interval === 'yearly'
|
||||
? formatMessage(messages.intervalYearly)
|
||||
: interval === 'quarterly'
|
||||
? formatMessage(messages.intervalQuarterly)
|
||||
: formatMessage(messages.intervalMonthly)
|
||||
}
|
||||
|
||||
const queryClient = useQueryClient()
|
||||
|
||||
const { data: paymentMethods } = useQuery({
|
||||
|
||||
@@ -412,9 +412,9 @@
|
||||
<div class="stats">
|
||||
<BoxIcon />
|
||||
{{
|
||||
`${$formatNumber(collection.projects?.length || 0, false)} project${
|
||||
(collection.projects?.length || 0) !== 1 ? 's' : ''
|
||||
}`
|
||||
formatMessage(messages.collectionProjectsCount, {
|
||||
count: collection.projects?.length || 0,
|
||||
})
|
||||
}}
|
||||
</div>
|
||||
<div class="stats">
|
||||
@@ -591,6 +591,10 @@ const messages = defineMessages({
|
||||
id: 'profile.label.downloads',
|
||||
defaultMessage: '{count} {countPlural, plural, one {download} other {downloads}}',
|
||||
},
|
||||
collectionProjectsCount: {
|
||||
id: 'profile.collection.projects-count',
|
||||
defaultMessage: '{count, plural, one {# project} other {# projects}}',
|
||||
},
|
||||
profileJoinedLabel: {
|
||||
id: 'profile.label.joined',
|
||||
defaultMessage: 'Joined',
|
||||
@@ -725,7 +729,7 @@ const messages = defineMessages({
|
||||
officialAccountBio: {
|
||||
id: 'profile.official-account.bio',
|
||||
defaultMessage:
|
||||
'The official user account of Modrinth. Get support at {support-link} or via email at {email}',
|
||||
'The official user account of Modrinth. Get support at <support-link></support-link> or via email at <email></email>',
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user