mitlist/fe/src/pages/ErrorNotFound.vue
google-labs-jules[bot] 5c9ba3f38c feat: Internationalize AuthCallback, Chores, ErrorNotFound, GroupDetail pages
This commit introduces internationalization for several pages:
- AuthCallbackPage.vue
- ChoresPage.vue (a comprehensive page with many elements)
- ErrorNotFound.vue
- GroupDetailPage.vue (including sub-sections for members, invites, chores summary, and expenses summary)

Key changes:
- Integrated `useI18n` in each listed page to handle translatable strings.
- Replaced hardcoded text in templates and relevant script sections (notifications, dynamic messages, fallbacks, etc.) with `t('key')` calls.
- Added new translation keys, organized under page-specific namespaces (e.g., `authCallbackPage`, `choresPage`, `errorNotFoundPage`, `groupDetailPage`), to `fe/src/i18n/en.json`.
- Added corresponding keys with placeholder translations (prefixed with DE:, FR:, ES:) to `fe/src/i18n/de.json`, `fe/src/i18n/fr.json`, and `fe/src/i18n/es.json`.
- Reused existing translation keys (e.g., for chore frequency options) where applicable.
2025-06-02 00:19:26 +02:00

52 lines
1.3 KiB
Vue

<template>
<div class="fullscreen-error text-center">
<div>
<div class="error-code">{{ t('errorNotFoundPage.errorCode') }}</div>
<div class="error-message">{{ t('errorNotFoundPage.errorMessage') }}</div>
<router-link to="/" class="btn btn-primary mt-3">{{ t('errorNotFoundPage.goHomeButton') }}</router-link>
</div>
</div>
</template>
<script setup lang="ts">
import { useI18n } from 'vue-i18n';
const { t } = useI18n();
// No script logic needed for this simple page
</script>
<style scoped>
.fullscreen-error {
display: flex;
align-items: center;
justify-content: center;
min-height: 100vh; /* Fallback for browsers that don't support dvh */
min-height: 100dvh;
background-color: var(--secondary-accent); /* Light Blue */
color: var(--dark);
padding: 2rem;
font-family: "Patrick Hand", cursive;
}
.error-code {
font-size: clamp(15vh, 25vw, 30vh); /* Responsive font size */
font-weight: bold;
color: var(--primary);
line-height: 1;
text-shadow: var(--shadow-md);
}
.error-message {
font-size: clamp(1.5rem, 4vw, 2.5rem);
opacity: 0.8;
margin-top: -1rem; /* Adjust based on font size */
margin-bottom: 2rem;
}
.btn-primary {
/* Ensure primary button styles are applied if not already by global .btn */
background-color: var(--primary);
color: var(--dark);
}
.mt-3 { margin-top: 1.5rem; }
</style>