feat(#22): Use translation keys in files

This commit is contained in:
2025-11-21 19:20:19 +01:00
parent 63023f4f9f
commit 81b1227e82
28 changed files with 497 additions and 195 deletions

View File

@@ -2,7 +2,7 @@
<template>
<UDashboardPanel id="versions">
<template #header>
<UDashboardNavbar :title="`Versionen: ${applicationForm?.name}`">
<UDashboardNavbar :title="$t('versions.pageTitle', { name: applicationForm?.name })">
<template #leading>
<UDashboardSidebarCollapse />
</template>
@@ -15,7 +15,12 @@
<template #body>
<div class="p-6">
<VersionHistory v-if="applicationForm" :application-form-id="applicationForm.id" :current-form="applicationForm" @restored="handleRestored" />
<VersionHistory
v-if="applicationForm"
:application-form-id="applicationForm.id"
:current-form="applicationForm"
@restored="handleRestored"
/>
</div>
</template>
</UDashboardPanel>
@@ -25,6 +30,7 @@
const route = useRoute()
const router = useRouter()
const toast = useToast()
const { t: $t } = useI18n()
definePageMeta({
key: (route) => `${route.params.id}-versions`
@@ -36,8 +42,8 @@ const { applicationForm, navigationLinks: links, refresh } = await useApplicatio
async function handleRestored() {
await refresh()
toast.add({
title: 'Version wiederhergestellt',
description: 'Das Formular wurde auf die ausgewählte Version zurückgesetzt.',
title: $t('versions.restored'),
description: $t('versions.restoredDescription'),
color: 'success'
})
router.push(`/application-forms/${applicationForm.value.id}/0`)