fix(trips): the journal link's toast and tab texts as literal keys

lint:i18n-keys only reaches a key through a literal t() or a *Key property: the three save toasts were passed to run() as bare keys and the tab label came out of TRIP_TAB_LABEL_KEYS, so four new en keys counted as unused. They are translated where they are named now.
This commit is contained in:
Maurice
2026-10-18 19:04:10 +02:00
parent 4a074ec93c
commit 0751b3e8c9
2 changed files with 8 additions and 8 deletions
@@ -193,7 +193,7 @@ export function useTripJournalLink(tripId: number) {
setBusy(true);
try {
await write();
toast.success(t(done));
toast.success(done);
cancel();
} catch (err: unknown) {
fail(err);
@@ -201,20 +201,20 @@ export function useTripJournalLink(tripId: number) {
setBusy(false);
}
},
[cancel, fail, t, toast]
[cancel, fail, toast]
);
const save = useCallback(async () => {
if (mode === 'pick' && pickedId != null) {
await run(() => store().link(tripId, pickedId, chosenMembers), 'trip.journal.linked');
await run(() => store().link(tripId, pickedId, chosenMembers), t('trip.journal.linked'));
} else if (mode === 'members') {
await run(() => store().setMembers(tripId, chosenMembers), 'trip.journal.membersSaved');
await run(() => store().setMembers(tripId, chosenMembers), t('trip.journal.membersSaved'));
}
}, [mode, pickedId, run, store, tripId, chosenMembers]);
}, [mode, pickedId, run, store, tripId, chosenMembers, t]);
const unlink = useCallback(async () => {
await run(() => store().unlink(tripId), 'trip.journal.unlinked');
}, [run, store, tripId]);
await run(() => store().unlink(tripId), t('trip.journal.unlinked'));
}, [run, store, tripId, t]);
return {
/** The section shows at all: the addon is on and this person may link, or the trip has a journal they see. */