diff --git a/app/app.vue b/app/app.vue
index e761185..dde1dc1 100644
--- a/app/app.vue
+++ b/app/app.vue
@@ -1,9 +1,28 @@
+
+
+
+
+
diff --git a/app/components/AddExpenseForm.vue b/app/components/AddExpenseForm.vue
index 24f1c5f..f14f9da 100644
--- a/app/components/AddExpenseForm.vue
+++ b/app/components/AddExpenseForm.vue
@@ -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() {
{{ t('expenseForm.descriptionLabel') }}
@@ -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 }) }}
@@ -110,7 +112,7 @@ function onSubmit() {
{{ t('expenseForm.paidByLabel') }}
- {{ nameOf(expense.payerId) }} paid
- {{ nameOf(expense.participantIds[0]!) }}
+ {{
+ t('expenses.paymentDescription', {
+ payer: nameOf(expense.payerId),
+ recipient: nameOf(expense.participantIds[0]!),
+ })
+ }}
@@ -82,7 +94,7 @@ const sorted = computed(() =>
{{ expense.description }}
- paid by {{ nameOf(expense.payerId) }}
+ {{ t('expenses.paidBy', { name: nameOf(expense.payerId) }) }}
@@ -120,12 +132,19 @@ const sorted = computed(() =>
: 'border-stone-100 dark:border-stone-800'
"
>
-
- split among {{ namesOf(expense.participantIds) }}
-
+
+ {{ share.name }}
+ {{ formatCurrency(share.amountCents, currency) }}
+
+
diff --git a/app/components/NameForm.vue b/app/components/NameForm.vue
index d341f45..ce8c8fb 100644
--- a/app/components/NameForm.vue
+++ b/app/components/NameForm.vue
@@ -1,6 +1,7 @@