✨ 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

+19
View File
@@ -1,9 +1,28 @@
<script setup lang="ts">
const { locale, locales, setLocale } = useI18n();
</script>
<template>
<div
class="min-h-screen bg-orange-50/40 text-stone-900 dark:bg-stone-950 dark:text-stone-100"
>
<NuxtRouteAnnouncer />
<main class="mx-auto max-w-md px-4 py-8">
<div class="mb-4 flex justify-end">
<select
:value="locale"
class="rounded-lg border border-stone-300 bg-white px-2 py-1 text-xs font-medium text-stone-600 shadow-sm dark:border-stone-700 dark:bg-stone-900 dark:text-stone-300"
@change="
setLocale(
($event.target as HTMLSelectElement).value as typeof locale,
)
"
>
<option v-for="loc in locales" :key="loc.code" :value="loc.code">
{{ loc.name }}
</option>
</select>
</div>
<NuxtPage />
</main>
</div>
+17 -12
View File
@@ -20,6 +20,8 @@ const emit = defineEmits<{
cancel: [];
}>();
const { t } = useI18n();
const description = ref(props.editing?.description ?? '');
const amount = ref(
props.editing ? fromCents(props.editing.amountCents).toString() : '',
@@ -45,15 +47,15 @@ function onSubmit() {
const amountCents = toCents(Number(amount.value));
if (!description.value.trim()) {
error.value = 'Description is required.';
error.value = t('expenseForm.errorDescriptionRequired');
return;
}
if (!Number.isFinite(amountCents) || amountCents <= 0) {
error.value = 'Enter a valid amount.';
error.value = t('expenseForm.errorInvalidAmount');
return;
}
if (selectedIds.value.length === 0) {
error.value = 'Select at least one participant to split with.';
error.value = t('expenseForm.errorSelectParticipant');
return;
}
@@ -75,7 +77,7 @@ function onSubmit() {
<label
for="description"
class="block text-sm font-medium text-stone-700 dark:text-stone-300"
>Description</label
>{{ t('expenseForm.descriptionLabel') }}</label
>
<input
id="description"
@@ -83,7 +85,7 @@ function onSubmit() {
type="text"
required
class="mt-1 block w-full rounded-xl border border-stone-300 bg-white px-3 py-2 text-base text-stone-900 shadow-sm placeholder:text-stone-400 focus:border-orange-400 focus:outline-none focus:ring-2 focus:ring-orange-200 dark:border-stone-700 dark:bg-stone-950 dark:text-stone-100 dark:placeholder:text-stone-500 dark:focus:ring-orange-900"
placeholder="Dinner, taxi, groceries…"
:placeholder="t('expenseForm.descriptionPlaceholder')"
/>
</div>
@@ -92,7 +94,7 @@ function onSubmit() {
for="amount"
class="block text-sm font-medium text-stone-700 dark:text-stone-300"
>
Amount ({{ currency }})
{{ t('expenseForm.amountLabel', { currency }) }}
</label>
<input
id="amount"
@@ -102,7 +104,7 @@ function onSubmit() {
min="0.01"
required
class="mt-1 block w-full rounded-xl border border-stone-300 bg-white px-3 py-2 text-base text-stone-900 shadow-sm placeholder:text-stone-400 focus:border-orange-400 focus:outline-none focus:ring-2 focus:ring-orange-200 dark:border-stone-700 dark:bg-stone-950 dark:text-stone-100 dark:placeholder:text-stone-500 dark:focus:ring-orange-900"
placeholder="0.00"
:placeholder="t('expenseForm.amountPlaceholder')"
/>
</div>
@@ -110,7 +112,7 @@ function onSubmit() {
<label
for="payer"
class="block text-sm font-medium text-stone-700 dark:text-stone-300"
>Paid by</label
>{{ t('expenseForm.paidByLabel') }}</label
>
<select
id="payer"
@@ -128,8 +130,9 @@ function onSubmit() {
</div>
<div>
<span class="block text-sm font-medium text-stone-700 dark:text-stone-300"
>Split equally among</span
<span
class="block text-sm font-medium text-stone-700 dark:text-stone-300"
>{{ t('expenseForm.splitEquallyLabel') }}</span
>
<div class="mt-2 flex flex-wrap gap-2">
<button
@@ -159,13 +162,15 @@ function onSubmit() {
class="flex-1 rounded-xl border border-stone-300 px-4 py-2 font-medium text-stone-700 dark:border-stone-700 dark:text-stone-300"
@click="emit('cancel')"
>
Cancel
{{ t('common.cancel') }}
</button>
<button
type="submit"
class="flex-1 rounded-xl bg-orange-500 px-4 py-2 font-medium text-white shadow-sm transition-colors hover:bg-orange-600 active:bg-orange-600"
>
{{ editing ? 'Save changes' : 'Add expense' }}
{{
editing ? t('expenseForm.saveChanges') : t('expenseForm.addExpense')
}}
</button>
</div>
</form>
+18 -13
View File
@@ -12,6 +12,7 @@ const props = defineProps<{
const emit = defineEmits<{ settled: []; updated: [] }>();
const { t } = useI18n();
const { lastLink, rememberLink } = usePaymentLinkCache();
const showSettlements = ref(false);
@@ -22,7 +23,9 @@ const editError = ref('');
const savingLink = ref(false);
function nameOf(id: number) {
return props.participants.find((p) => p.id === id)?.name ?? 'Unknown';
return (
props.participants.find((p) => p.id === id)?.name ?? t('common.unknown')
);
}
function paymentLinkOf(id: number) {
@@ -51,7 +54,7 @@ function cancelEdit() {
async function saveEdit(participant: ParticipantView) {
const trimmed = editValue.value.trim();
if (trimmed && !isValidPaymentLink(trimmed)) {
editError.value = 'Enter a valid link starting with http:// or https://.';
editError.value = t('balances.invalidLink');
return;
}
savingLink.value = true;
@@ -93,7 +96,7 @@ async function markSettled(settlement: SettlementView) {
v-if="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. Add people from the settings page.
{{ t('balances.empty') }}
</p>
<ul v-else class="space-y-2">
@@ -131,7 +134,7 @@ async function markSettled(settlement: SettlementView) {
class="text-xs font-medium text-orange-600 hover:underline dark:text-orange-400"
@click.stop
>
Payment link
{{ t('balances.paymentLink') }}
</a>
<span
class="text-sm font-semibold"
@@ -145,7 +148,7 @@ async function markSettled(settlement: SettlementView) {
}"
>
<template v-if="(netBalances[participant.id] ?? 0) === 0">
settled up
{{ t('balances.settledUp') }}
</template>
<template v-else>
{{ (netBalances[participant.id] ?? 0) > 0 ? '+' : '−'
@@ -167,13 +170,13 @@ async function markSettled(settlement: SettlementView) {
<label
class="block text-xs font-medium text-stone-500 dark:text-stone-400"
>
Payment link for {{ participant.name }}
{{ t('balances.paymentLinkLabelFor', { name: participant.name }) }}
</label>
<div class="flex gap-2">
<input
v-model="editValue"
type="url"
placeholder="https://paypal.me/yourname"
:placeholder="t('balances.paymentLinkPlaceholder')"
class="block w-full rounded-xl border border-stone-300 bg-white px-3 py-2 text-sm text-stone-900 shadow-sm placeholder:text-stone-400 focus:border-orange-400 focus:outline-none focus:ring-2 focus:ring-orange-200 dark:border-stone-700 dark:bg-stone-950 dark:text-stone-100 dark:placeholder:text-stone-500 dark:focus:ring-orange-900"
@keyup.enter="saveEdit(participant)"
/>
@@ -183,14 +186,14 @@ async function markSettled(settlement: SettlementView) {
class="shrink-0 rounded-xl bg-orange-500 px-3 py-2 text-sm font-medium text-white shadow-sm transition-colors hover:bg-orange-600 disabled:opacity-50"
@click="saveEdit(participant)"
>
{{ savingLink ? 'Saving…' : 'Save' }}
{{ savingLink ? t('common.saving') : t('common.save') }}
</button>
<button
type="button"
class="shrink-0 rounded-xl border border-stone-300 px-3 py-2 text-sm font-medium 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"
@click="cancelEdit"
>
Cancel
{{ t('common.cancel') }}
</button>
</div>
<p v-if="editError" class="text-xs text-rose-600 dark:text-rose-400">
@@ -206,7 +209,7 @@ async function markSettled(settlement: SettlementView) {
class="flex w-full items-center justify-between gap-2 text-sm font-medium text-orange-600 dark:text-orange-400"
@click="showSettlements = !showSettlements"
>
<span>Suggested payments</span>
<span>{{ t('balances.suggestedPayments') }}</span>
<svg
class="h-4 w-4 shrink-0 transition-transform"
:class="{ 'rotate-180': showSettlements }"
@@ -225,7 +228,7 @@ async function markSettled(settlement: SettlementView) {
v-if="showSettlements && settlements.length === 0"
class="text-sm text-stone-500 dark:text-stone-400"
>
Everyone is settled up.
{{ t('balances.allSettled') }}
</p>
<ul v-else-if="showSettlements" class="space-y-2">
<li
@@ -283,7 +286,7 @@ async function markSettled(settlement: SettlementView) {
rel="noopener noreferrer"
class="rounded-full border border-orange-300 px-3 py-1 text-xs font-medium text-orange-700 transition-colors hover:bg-white dark:border-orange-800 dark:text-orange-300 dark:hover:bg-stone-900"
>
Pay now
{{ t('balances.payNow') }}
</a>
<button
type="button"
@@ -292,7 +295,9 @@ async function markSettled(settlement: SettlementView) {
@click="markSettled(settlement)"
>
{{
settlingKey === keyOf(settlement) ? 'Marking…' : 'Mark as paid'
settlingKey === keyOf(settlement)
? t('balances.marking')
: t('balances.markAsPaid')
}}
</button>
</div>
+32 -13
View File
@@ -12,14 +12,22 @@ const emit = defineEmits<{
remove: [id: number];
}>();
const { t } = useI18n();
const expandedId = ref<number | null>(null);
function nameOf(id: number) {
return props.participants.find((p) => p.id === id)?.name ?? 'Unknown';
return (
props.participants.find((p) => p.id === id)?.name ?? t('common.unknown')
);
}
function namesOf(ids: number[]) {
return ids.map(nameOf).join(', ');
function splitOf(expense: ExpenseView) {
const shares = computeSplit(expense.amountCents, expense.participantIds);
return expense.participantIds.map((id) => ({
id,
name: nameOf(id),
amountCents: shares[id]!,
}));
}
function toggle(id: number) {
@@ -37,7 +45,7 @@ const sorted = computed(() =>
v-if="expenses.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 expenses yet. Add the first one below.
{{ t('expenses.empty') }}
</p>
<div
@@ -73,8 +81,12 @@ const sorted = computed(() =>
<p
class="truncate font-medium text-emerald-800 dark:text-emerald-300"
>
{{ nameOf(expense.payerId) }} paid
{{ nameOf(expense.participantIds[0]!) }}
{{
t('expenses.paymentDescription', {
payer: nameOf(expense.payerId),
recipient: nameOf(expense.participantIds[0]!),
})
}}
</p>
</div>
<div v-else class="min-w-0">
@@ -82,7 +94,7 @@ const sorted = computed(() =>
{{ expense.description }}
</p>
<p class="text-sm text-stone-500 dark:text-stone-400">
paid by {{ nameOf(expense.payerId) }}
{{ t('expenses.paidBy', { name: nameOf(expense.payerId) }) }}
</p>
</div>
<div class="flex shrink-0 items-center gap-2">
@@ -120,12 +132,19 @@ const sorted = computed(() =>
: 'border-stone-100 dark:border-stone-800'
"
>
<p
<ul
v-if="expense.type === 'expense'"
class="text-xs text-stone-400 dark:text-stone-500"
class="space-y-1 text-xs text-stone-400 dark:text-stone-500"
>
split among {{ namesOf(expense.participantIds) }}
</p>
<li
v-for="share in splitOf(expense)"
:key="share.id"
class="flex justify-between gap-2"
>
<span>{{ share.name }}</span>
<span>{{ formatCurrency(share.amountCents, currency) }}</span>
</li>
</ul>
<div class="flex gap-3">
<button
v-if="expense.type === 'expense'"
@@ -133,14 +152,14 @@ const sorted = computed(() =>
class="text-sm font-medium text-orange-600 dark:text-orange-400"
@click="emit('edit', expense)"
>
Edit
{{ t('expenses.edit') }}
</button>
<button
type="button"
class="text-sm font-medium text-rose-600 dark:text-rose-400"
@click="emit('remove', expense.id)"
>
Delete
{{ t('expenses.delete') }}
</button>
</div>
</div>
+4 -3
View File
@@ -1,6 +1,7 @@
<script setup lang="ts">
const props = defineProps<{ title?: string; buttonLabel?: string }>();
const emit = defineEmits<{ submit: [name: string] }>();
const { t } = useI18n();
const name = ref('');
@@ -17,7 +18,7 @@ function onSubmit() {
for="name"
class="block text-sm font-medium text-stone-700 dark:text-stone-300"
>
{{ props.title ?? "What's your name?" }}
{{ props.title ?? t('nameForm.defaultTitle') }}
</label>
<input
id="name"
@@ -26,14 +27,14 @@ function onSubmit() {
autocomplete="name"
required
class="mt-1 block w-full rounded-xl border border-stone-300 bg-white px-3 py-2 text-base text-stone-900 shadow-sm placeholder:text-stone-400 focus:border-orange-400 focus:outline-none focus:ring-2 focus:ring-orange-200 dark:border-stone-700 dark:bg-stone-900 dark:text-stone-100 dark:placeholder:text-stone-500 dark:focus:ring-orange-900"
placeholder="Your name"
:placeholder="t('nameForm.placeholder')"
/>
</div>
<button
type="submit"
class="w-full rounded-xl bg-orange-500 px-4 py-2 font-medium text-white shadow-sm transition-colors hover:bg-orange-600 active:bg-orange-600"
>
{{ props.buttonLabel ?? 'Continue' }}
{{ props.buttonLabel ?? t('nameForm.continue') }}
</button>
</form>
</template>
+10 -9
View File
@@ -1,4 +1,5 @@
<script setup lang="ts">
const { t } = useI18n();
const { name, setName } = useIdentity();
const { pots: visitedPots } = useVisitedPots();
@@ -24,7 +25,7 @@ async function createPot() {
});
await navigateTo(`/p/${pot.slug}/setup`);
} catch {
error.value = 'Could not create the Pot. Please try again.';
error.value = t('home.createError');
} finally {
creating.value = false;
}
@@ -36,16 +37,16 @@ async function createPot() {
<div class="space-y-1 text-center">
<div class="text-4xl">🍯</div>
<h1 class="text-2xl font-bold text-stone-900 dark:text-stone-100">
Splitt the Bill
{{ t('home.title') }}
</h1>
<p class="text-sm text-stone-500 dark:text-stone-400">
Track shared costs with friends, the easy way.
{{ t('home.subtitle') }}
</p>
</div>
<section v-if="visitedPots.length" class="space-y-2">
<h2 class="text-sm font-semibold text-stone-500 dark:text-stone-400">
Your Pots
{{ t('home.yourPots') }}
</h2>
<ul class="space-y-2">
<li v-for="pot in visitedPots" :key="pot.slug">
@@ -73,14 +74,14 @@ async function createPot() {
@submit.prevent="createPot"
>
<p class="text-sm text-stone-600 dark:text-stone-400">
Hi {{ name }}! Create a new Pot to start splitting costs.
{{ t('home.greeting', { name }) }}
</p>
<div>
<label
for="pot-name"
class="block text-sm font-medium text-stone-700 dark:text-stone-300"
>Pot name</label
>{{ t('home.potNameLabel') }}</label
>
<input
id="pot-name"
@@ -88,7 +89,7 @@ async function createPot() {
type="text"
required
class="mt-1 block w-full rounded-xl border border-stone-300 bg-white px-3 py-2 text-base text-stone-900 shadow-sm placeholder:text-stone-400 focus:border-orange-400 focus:outline-none focus:ring-2 focus:ring-orange-200 dark:border-stone-700 dark:bg-stone-950 dark:text-stone-100 dark:placeholder:text-stone-500 dark:focus:ring-orange-900"
placeholder="Weekend in Lisbon"
:placeholder="t('home.potNamePlaceholder')"
/>
</div>
@@ -96,7 +97,7 @@ async function createPot() {
<label
for="currency"
class="block text-sm font-medium text-stone-700 dark:text-stone-300"
>Currency</label
>{{ t('home.currencyLabel') }}</label
>
<select
id="currency"
@@ -118,7 +119,7 @@ async function createPot() {
:disabled="creating"
class="w-full rounded-xl bg-orange-500 px-4 py-2 font-medium text-white shadow-sm transition-colors hover:bg-orange-600 active:bg-orange-600 disabled:opacity-50"
>
{{ creating ? 'Creating…' : 'Create Pot' }}
{{ creating ? t('home.creating') : t('home.createPot') }}
</button>
</form>
</div>
+11 -10
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;
const { name, setName } = useIdentity();
@@ -53,15 +54,15 @@ async function copyLink() {
<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>
<NameForm
v-else-if="!name && isPotTab"
title="What's your name?"
:title="t('pot.whatIsYourName')"
@submit="setName"
/>
@@ -78,7 +79,7 @@ async function copyLink() {
clip-rule="evenodd"
/>
</svg>
All Pots
{{ t('pot.allPots') }}
</NuxtLink>
<div class="flex items-start justify-between gap-2">
@@ -96,12 +97,12 @@ async function copyLink() {
class="rounded-xl border border-stone-300 px-3 py-1.5 text-sm font-medium text-stone-700 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"
@click="copyLink"
>
{{ linkCopied ? 'Copied!' : 'Copy link' }}
{{ linkCopied ? t('pot.linkCopied') : t('pot.copyLink') }}
</button>
<NuxtLink
:to="`/p/${slug}/settings`"
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="Pot settings"
:aria-label="t('pot.settingsLabel')"
>
<svg class="h-4.5 w-4.5" viewBox="0 0 20 20" fill="currentColor">
<path
@@ -119,14 +120,14 @@ async function copyLink() {
class="rounded-2xl border border-orange-200 bg-orange-50 p-4 text-sm dark:border-orange-900 dark:bg-orange-950/40"
>
<p class="mb-2 text-stone-700 dark:text-stone-300">
You're not in this Pot's participant list yet.
{{ t('pot.notInPot') }}
</p>
<button
type="button"
class="rounded-xl bg-orange-500 px-3 py-1.5 font-medium text-white shadow-sm transition-colors hover:bg-orange-600"
@click="addMyself"
>
Add myself as {{ name }}
{{ t('pot.addMyself', { name }) }}
</button>
</div>
@@ -142,7 +143,7 @@ async function copyLink() {
: 'text-stone-500 hover:text-stone-700 dark:text-stone-400 dark:hover:text-stone-200'
"
>
People &amp; balances
{{ t('pot.tabPeople') }}
</NuxtLink>
<NuxtLink
:to="`/p/${slug}/expenses`"
@@ -153,7 +154,7 @@ async function copyLink() {
: 'text-stone-500 hover:text-stone-700 dark:text-stone-400 dark:hover:text-stone-200'
"
>
Expenses
{{ t('pot.tabExpenses') }}
</NuxtLink>
</div>
</template>
+3 -2
View File
@@ -1,6 +1,7 @@
<script setup lang="ts">
import type { ExpenseView, PotView } from '~/types';
const { t } = useI18n();
const route = useRoute();
const slug = route.params.slug as string;
const { name } = useIdentity();
@@ -55,7 +56,7 @@ function cancelExpenseForm() {
}
async function removeExpense(id: number) {
if (!confirm('Delete this expense?')) return;
if (!confirm(t('expenses.deleteConfirm'))) return;
await $fetch(`/api/pots/${slug}/expenses/${id}`, { method: 'DELETE' });
await refresh();
}
@@ -88,7 +89,7 @@ async function removeExpense(id: number) {
class="w-full rounded-xl bg-orange-500 px-4 py-2 font-medium text-white shadow-sm transition-colors hover:bg-orange-600"
@click="newExpense"
>
+ Add expense
{{ t('expenses.addExpense') }}
</button>
</section>
</template>
+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>
+7 -6
View File
@@ -1,4 +1,5 @@
<script setup lang="ts">
const { t } = useI18n();
const route = useRoute();
const slug = route.params.slug as string;
@@ -34,10 +35,10 @@ function skip() {
<div class="space-y-1 text-center">
<div class="text-3xl">👋</div>
<h1 class="text-xl font-bold text-stone-900 dark:text-stone-100">
Add the rest of the group
{{ t('setup.title') }}
</h1>
<p class="text-sm text-stone-500 dark:text-stone-400">
Add everyone else's name now, or skip and add them later from settings.
{{ t('setup.subtitle') }}
</p>
</div>
@@ -48,7 +49,7 @@ function skip() {
v-model="names[index]"
type="text"
class="block w-full rounded-xl border border-stone-300 bg-white px-3 py-2 text-base text-stone-900 shadow-sm placeholder:text-stone-400 focus:border-orange-400 focus:outline-none focus:ring-2 focus:ring-orange-200 dark:border-stone-700 dark:bg-stone-900 dark:text-stone-100 dark:placeholder:text-stone-500 dark:focus:ring-orange-900"
placeholder="Participant name"
:placeholder="t('setup.placeholder')"
/>
</div>
@@ -57,7 +58,7 @@ function skip() {
class="w-full rounded-xl border border-dashed border-stone-300 px-4 py-2 text-sm font-medium text-stone-600 transition-colors hover:border-orange-300 hover:text-orange-600 dark:border-stone-700 dark:text-stone-400 dark:hover:border-orange-700 dark:hover:text-orange-400"
@click="addRow"
>
+ Add another
{{ t('setup.addAnother') }}
</button>
<div class="flex gap-3">
@@ -66,7 +67,7 @@ function skip() {
class="flex-1 rounded-xl border border-stone-300 px-4 py-2 font-medium text-stone-700 dark:border-stone-700 dark:text-stone-300"
@click="skip"
>
Skip
{{ t('setup.skip') }}
</button>
<button
type="button"
@@ -74,7 +75,7 @@ function skip() {
class="flex-1 rounded-xl bg-orange-500 px-4 py-2 font-medium text-white shadow-sm transition-colors hover:bg-orange-600 active:bg-orange-600 disabled:opacity-50"
@click="continueToPot"
>
{{ saving ? 'Saving…' : 'Continue' }}
{{ saving ? t('setup.saving') : t('setup.continue') }}
</button>
</div>
</div>
+96
View File
@@ -0,0 +1,96 @@
{
"common": {
"cancel": "Abbrechen",
"save": "Speichern",
"saving": "Wird gespeichert…",
"unknown": "Unbekannt"
},
"nameForm": {
"defaultTitle": "Wie heißt du?",
"placeholder": "Dein Name",
"continue": "Weiter"
},
"home": {
"title": "Splitt the Bill",
"subtitle": "Teile gemeinsame Kosten mit Freunden – ganz einfach.",
"yourPots": "Deine Töpfe",
"greeting": "Hi {name}! Erstelle einen neuen Topf, um Kosten aufzuteilen.",
"potNameLabel": "Name des Topfes",
"potNamePlaceholder": "Wochenende in Lissabon",
"currencyLabel": "Währung",
"createPot": "Topf erstellen",
"creating": "Wird erstellt…",
"createError": "Der Topf konnte nicht erstellt werden. Bitte versuche es erneut."
},
"pot": {
"notFound": "Dieser Topf wurde nicht gefunden.",
"goHome": "Zur Startseite",
"whatIsYourName": "Wie heißt du?",
"allPots": "Alle Töpfe",
"copyLink": "Link kopieren",
"linkCopied": "Kopiert!",
"settingsLabel": "Topf-Einstellungen",
"notInPot": "Du bist noch nicht in der Teilnehmerliste dieses Topfes.",
"addMyself": "Mich als {name} hinzufügen",
"tabPeople": "Personen & Salden",
"tabExpenses": "Ausgaben"
},
"balances": {
"empty": "Noch niemand in diesem Topf. Füge Personen auf der Einstellungsseite hinzu.",
"settledUp": "ausgeglichen",
"paymentLink": "Zahlungslink",
"paymentLinkLabelFor": "Zahlungslink für {name}",
"paymentLinkPlaceholder": "https://paypal.me/deinname",
"invalidLink": "Gib einen gültigen Link ein, der mit http:// oder https:// beginnt.",
"suggestedPayments": "Vorgeschlagene Zahlungen",
"allSettled": "Alle sind ausgeglichen.",
"payNow": "Jetzt zahlen",
"markAsPaid": "Als bezahlt markieren",
"marking": "Wird markiert…"
},
"expenses": {
"empty": "Noch keine Ausgaben. Füge die erste unten hinzu.",
"addExpense": "+ Ausgabe hinzufügen",
"paidBy": "bezahlt von {name}",
"paymentDescription": "{payer} hat {recipient} bezahlt",
"edit": "Bearbeiten",
"delete": "Löschen",
"deleteConfirm": "Diese Ausgabe löschen?"
},
"expenseForm": {
"descriptionLabel": "Beschreibung",
"descriptionPlaceholder": "Abendessen, Taxi, Einkauf…",
"amountLabel": "Betrag ({currency})",
"amountPlaceholder": "0,00",
"paidByLabel": "Bezahlt von",
"splitEquallyLabel": "Gleich aufteilen zwischen",
"addExpense": "Ausgabe hinzufügen",
"saveChanges": "Änderungen speichern",
"errorDescriptionRequired": "Beschreibung ist erforderlich.",
"errorInvalidAmount": "Gib einen gültigen Betrag ein.",
"errorSelectParticipant": "Wähle mindestens einen Teilnehmer zum Aufteilen aus."
},
"settings": {
"title": "Topf-Einstellungen",
"backToPot": "Zurück zum Topf",
"participants": "Teilnehmer",
"remove": "Entfernen",
"removing": "Wird entfernt…",
"removeConfirm": "{name} aus diesem Topf entfernen?",
"removeError": "{name} konnte nicht entfernt werden. Möglicherweise sind noch Ausgaben oder Zahlungen erfasst.",
"noParticipants": "Noch niemand in diesem Topf.",
"addParticipant": "Teilnehmer hinzufügen",
"nameLabel": "Name",
"add": "Hinzufügen",
"adding": "Wird hinzugefügt…"
},
"setup": {
"title": "Restliche Gruppe hinzufügen",
"subtitle": "Füge jetzt die Namen aller anderen hinzu oder überspringe diesen Schritt und füge sie später über die Einstellungen hinzu.",
"placeholder": "Name des Teilnehmers",
"addAnother": "+ Weitere Person",
"skip": "Überspringen",
"continue": "Weiter",
"saving": "Wird gespeichert…"
}
}
+96
View File
@@ -0,0 +1,96 @@
{
"common": {
"cancel": "Cancel",
"save": "Save",
"saving": "Saving…",
"unknown": "Unknown"
},
"nameForm": {
"defaultTitle": "What's your name?",
"placeholder": "Your name",
"continue": "Continue"
},
"home": {
"title": "Splitt the Bill",
"subtitle": "Track shared costs with friends, the easy way.",
"yourPots": "Your Pots",
"greeting": "Hi {name}! Create a new Pot to start splitting costs.",
"potNameLabel": "Pot name",
"potNamePlaceholder": "Weekend in Lisbon",
"currencyLabel": "Currency",
"createPot": "Create Pot",
"creating": "Creating…",
"createError": "Could not create the Pot. Please try again."
},
"pot": {
"notFound": "This Pot couldn't be found.",
"goHome": "Go home",
"whatIsYourName": "What's your name?",
"allPots": "All Pots",
"copyLink": "Copy link",
"linkCopied": "Copied!",
"settingsLabel": "Pot settings",
"notInPot": "You're not in this Pot's participant list yet.",
"addMyself": "Add myself as {name}",
"tabPeople": "People & balances",
"tabExpenses": "Expenses"
},
"balances": {
"empty": "No one's in this Pot yet. Add people from the settings page.",
"settledUp": "settled up",
"paymentLink": "Payment link",
"paymentLinkLabelFor": "Payment link for {name}",
"paymentLinkPlaceholder": "https://paypal.me/yourname",
"invalidLink": "Enter a valid link starting with http:// or https://.",
"suggestedPayments": "Suggested payments",
"allSettled": "Everyone is settled up.",
"payNow": "Pay now",
"markAsPaid": "Mark as paid",
"marking": "Marking…"
},
"expenses": {
"empty": "No expenses yet. Add the first one below.",
"addExpense": "+ Add expense",
"paidBy": "paid by {name}",
"paymentDescription": "{payer} paid {recipient}",
"edit": "Edit",
"delete": "Delete",
"deleteConfirm": "Delete this expense?"
},
"expenseForm": {
"descriptionLabel": "Description",
"descriptionPlaceholder": "Dinner, taxi, groceries…",
"amountLabel": "Amount ({currency})",
"amountPlaceholder": "0.00",
"paidByLabel": "Paid by",
"splitEquallyLabel": "Split equally among",
"addExpense": "Add expense",
"saveChanges": "Save changes",
"errorDescriptionRequired": "Description is required.",
"errorInvalidAmount": "Enter a valid amount.",
"errorSelectParticipant": "Select at least one participant to split with."
},
"settings": {
"title": "Pot settings",
"backToPot": "Back to Pot",
"participants": "Participants",
"remove": "Remove",
"removing": "Removing…",
"removeConfirm": "Remove {name} from this Pot?",
"removeError": "Couldn't remove {name}. They may have expenses or payments recorded.",
"noParticipants": "No one's in this Pot yet.",
"addParticipant": "Add a participant",
"nameLabel": "Name",
"add": "Add",
"adding": "Adding…"
},
"setup": {
"title": "Add the rest of the group",
"subtitle": "Add everyone else's name now, or skip and add them later from settings.",
"placeholder": "Participant name",
"addAnother": "+ Add another",
"skip": "Skip",
"continue": "Continue",
"saving": "Saving…"
}
}
+14
View File
@@ -4,6 +4,7 @@ import tailwindcss from '@tailwindcss/vite';
export default defineNuxtConfig({
compatibilityDate: '2026-08-07',
devtools: { enabled: true },
modules: ['@nuxtjs/i18n'],
css: ['~/assets/css/tailwind.css'],
vite: {
plugins: [tailwindcss()],
@@ -14,4 +15,17 @@ export default defineNuxtConfig({
authToken: '',
},
},
i18n: {
locales: [
{ code: 'en', name: 'English', file: 'en.json' },
{ code: 'de', name: 'Deutsch', file: 'de.json' },
],
defaultLocale: 'en',
strategy: 'no_prefix',
detectBrowserLanguage: {
useCookie: true,
cookieKey: 'locale',
redirectOn: 'root',
},
},
});
+1
View File
@@ -14,6 +14,7 @@
},
"dependencies": {
"@libsql/client": "^0.17.4",
"@nuxtjs/i18n": "^10.6.0",
"drizzle-orm": "^0.45.2",
"nanoid": "^6.0.1",
"nuxt": "^4.5.2"
+2937 -4021
View File
File diff suppressed because it is too large. Load diff