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

@@ -1,7 +1,7 @@
<template>
<UDashboardPanel id="home">
<template #header>
<UDashboardNavbar title="Home" :ui="{ right: 'gap-3' }">
<UDashboardNavbar :title="$t('common.home')" :ui="{ right: 'gap-3' }">
<template #leading>
<UDashboardSidebarCollapse />
</template>
@@ -9,7 +9,7 @@
<template #right>
<UButton
icon="i-lucide-circle-plus"
label="Neuer Mitbestimmungsantrag"
:label="$t('applicationForms.createNew')"
to="/create"
:disabled="!canWriteApplicationForms"
size="xl"
@@ -59,6 +59,7 @@ import { useUserStore } from '~~/stores/useUserStore'
const route = useRoute()
const toast = useToast()
const { t: $t } = useI18n()
definePageMeta({
// Prevent whole page from re-rendering when navigating between sections to keep state
@@ -113,7 +114,7 @@ async function onSave() {
const updated = await updateForm(applicationForm.value.id, applicationForm.value)
if (updated) {
updateApplicationForm(updated)
toast.add({ title: 'Success', description: 'Application form saved', color: 'success' })
toast.add({ title: $t('common.success'), description: $t('applicationForms.saved'), color: 'success' })
}
}
}
@@ -122,7 +123,7 @@ async function onSubmit() {
if (applicationForm.value) {
await submitApplicationForm(applicationForm.value.id)
await navigateTo('/')
toast.add({ title: 'Success', description: 'Application form submitted', color: 'success' })
toast.add({ title: $t('common.success'), description: $t('applicationForms.submitted'), color: 'success' })
}
}