fix: simplify preview banner translation key (#6192)

This commit is contained in:
Prospector
2026-05-24 10:39:39 -07:00
committed by GitHub
parent 6f44c5b039
commit 3889d0f5ec
2 changed files with 6 additions and 15 deletions
@@ -5,7 +5,6 @@ import {
commonMessages, commonMessages,
defineMessages, defineMessages,
IntlFormatted, IntlFormatted,
normalizeChildren,
PagewideBanner, PagewideBanner,
useVIntl, useVIntl,
} from '@modrinth/ui' } from '@modrinth/ui'
@@ -22,7 +21,7 @@ const messages = defineMessages({
}, },
description: { description: {
id: 'layout.banner.preview.description', id: 'layout.banner.preview.description',
defaultMessage: `If you meant to access the official Modrinth website, visit {url}. This preview deploy is used by Modrinth staff for testing purposes. It was built using <branch-link>{owner}/{branch}</branch-link> @ {commit}.`, defaultMessage: `If you meant to access the official Modrinth website, visit {url}. This preview deploy is used by Modrinth staff for testing purposes. It was built using {ref}.`,
}, },
}) })
@@ -41,30 +40,22 @@ const url = computed(() => `https://modrinth.com${route.fullPath}`)
</template> </template>
<template #description> <template #description>
<span> <span>
<IntlFormatted <IntlFormatted :message-id="messages.description">
:message-id="messages.description"
:values="{
owner: config.public.owner,
branch: config.public.branch,
}"
>
<template #url> <template #url>
<a :href="url" target="_blank" rel="noopener" class="text-link"> <a :href="url" target="_blank" rel="noopener" class="text-link">
{{ url }} {{ url }}
</a> </a>
</template> </template>
<template #branch-link="{ children }"> <template #ref>
<a <a
:href="`https://github.com/${config.public.owner}/code/tree/${config.public.branch}`" :href="`https://github.com/${config.public.owner}/code/tree/${config.public.branch}`"
target="_blank" target="_blank"
rel="noopener" rel="noopener"
class="hover:underline" class="hover:underline"
> >
<component :is="() => normalizeChildren(children)" /> {{ config.public.owner }} / {{ config.public.branch }}
</a> </a>
</template> @ <span v-if="config.public.hash === 'unknown'">unknown</span>
<template #commit>
<span v-if="config.public.hash === 'unknown'">unknown</span>
<a <a
v-else v-else
:href="`https://github.com/${config.public.owner}/code/commit/${config.public.hash}`" :href="`https://github.com/${config.public.owner}/code/commit/${config.public.hash}`"
+1 -1
View File
@@ -1881,7 +1881,7 @@
"message": "Error generating state from API when building." "message": "Error generating state from API when building."
}, },
"layout.banner.preview.description": { "layout.banner.preview.description": {
"message": "If you meant to access the official Modrinth website, visit {url}. This preview deploy is used by Modrinth staff for testing purposes. It was built using <branch-link>{owner}/{branch}</branch-link> @ {commit}." "message": "If you meant to access the official Modrinth website, visit {url}. This preview deploy is used by Modrinth staff for testing purposes. It was built using {ref}."
}, },
"layout.banner.preview.title": { "layout.banner.preview.title": {
"message": "This is a preview deploy of the Modrinth website." "message": "This is a preview deploy of the Modrinth website."