mirror of
https://github.com/modrinth/code.git
synced 2026-08-25 09:04:55 +00:00
fix: simplify preview banner translation key (#6192)
This commit is contained in:
@@ -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}`"
|
||||||
|
|||||||
@@ -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."
|
||||||
|
|||||||
Reference in New Issue
Block a user