✨ add german translation

This commit is contained in:
anbraten committed 2026-09-24 20:28:05 +02:00
1 parent 99a9f908f1
commit c78920ba6e
15 files changed
+3282 -4101

No files matched your search

+17 -12
View File
@@ -1,6 +1,7 @@
<script setup lang="ts">
import type { PotView } from '~/types';
const { t } = useI18n();
const route = useRoute();
const slug = route.params.slug as string;
@@ -25,7 +26,7 @@ async function addParticipant(participantName: string) {
}
async function removeParticipant(participant: { id: number; name: string }) {
if (!confirm(`Remove ${participant.name} from this Pot?`)) return;
if (!confirm(t('settings.removeConfirm', { name: participant.name }))) return;
removeError.value = '';
removingId.value = participant.id;
@@ -35,7 +36,7 @@ async function removeParticipant(participant: { id: number; name: string }) {
});
await refresh();
} catch {
removeError.value = `Couldn't remove ${participant.name}. They may have expenses or payments recorded.`;
removeError.value = t('settings.removeError', { name: participant.name });
} finally {
removingId.value = null;
}
@@ -44,9 +45,9 @@ async function removeParticipant(participant: { id: number; name: string }) {
<template>
<div v-if="error" class="space-y-3 text-center">
<p class="text-rose-600 dark:text-rose-400">This Pot couldn't be found.</p>
<p class="text-rose-600 dark:text-rose-400">{{ t('pot.notFound') }}</p>
<NuxtLink to="/" class="font-medium text-orange-600 dark:text-orange-400">
Go home
{{ t('pot.goHome') }}
</NuxtLink>
</div>
@@ -55,7 +56,7 @@ async function removeParticipant(participant: { id: number; name: string }) {
<NuxtLink
:to="`/p/${slug}`"
class="flex h-9 w-9 shrink-0 items-center justify-center rounded-xl border border-stone-300 text-stone-600 transition-colors hover:border-orange-300 hover:text-orange-600 dark:border-stone-700 dark:text-stone-300 dark:hover:border-orange-700 dark:hover:text-orange-400"
aria-label="Back to Pot"
:aria-label="t('settings.backToPot')"
>
<svg class="h-4.5 w-4.5" viewBox="0 0 20 20" fill="currentColor">
<path
@@ -67,7 +68,7 @@ async function removeParticipant(participant: { id: number; name: string }) {
</NuxtLink>
<div>
<h1 class="text-lg font-bold text-stone-900 dark:text-stone-100">
Pot settings
{{ t('settings.title') }}
</h1>
<p class="text-sm text-stone-500 dark:text-stone-400">
{{ data.pot.name }} · {{ data.pot.currency }}
@@ -79,7 +80,7 @@ async function removeParticipant(participant: { id: number; name: string }) {
<h2
class="text-sm font-semibold uppercase tracking-wide text-stone-500 dark:text-stone-400"
>
Participants
{{ t('settings.participants') }}
</h2>
<ul class="space-y-2">
<li
@@ -102,14 +103,18 @@ async function removeParticipant(participant: { id: number; name: string }) {
class="shrink-0 text-sm font-medium text-rose-600 disabled:opacity-50 dark:text-rose-400"
@click="removeParticipant(participant)"
>
{{ removingId === participant.id ? 'Removing…' : 'Remove' }}
{{
removingId === participant.id
? t('settings.removing')
: t('settings.remove')
}}
</button>
</li>
<li
v-if="data.participants.length === 0"
class="rounded-2xl border border-dashed border-stone-300 p-4 text-center text-sm text-stone-500 dark:border-stone-700 dark:text-stone-400"
>
No one's in this Pot yet.
{{ t('settings.noParticipants') }}
</li>
</ul>
<p v-if="removeError" class="text-sm text-rose-600 dark:text-rose-400">
@@ -123,11 +128,11 @@ async function removeParticipant(participant: { id: number; name: string }) {
<h2
class="text-sm font-semibold uppercase tracking-wide text-stone-500 dark:text-stone-400"
>
Add a participant
{{ t('settings.addParticipant') }}
</h2>
<NameForm
title="Name"
:button-label="adding ? 'Adding…' : 'Add'"
:title="t('settings.nameLabel')"
:button-label="adding ? t('settings.adding') : t('settings.add')"
@submit="addParticipant"
/>
</section>