From 7d81d47b3cbc3284014fff83528855896c2f989f Mon Sep 17 00:00:00 2001 From: kayjaydee Date: Wed, 8 Apr 2026 15:17:12 +0200 Subject: [PATCH] fix(01): WR-02 use te() to detect missing i18n keys in useProjects --- app/composables/useProjects.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/app/composables/useProjects.ts b/app/composables/useProjects.ts index 27aacac..58466cf 100644 --- a/app/composables/useProjects.ts +++ b/app/composables/useProjects.ts @@ -6,14 +6,16 @@ import type { Project } from '~~/shared/types' * Titles, descriptions, and long descriptions are resolved via i18n keys. */ export function useProjects() { - const { t } = useI18n() + const { t, te } = useI18n() const projects = computed(() => projectsData.map((p) => ({ ...p, title: t(`projects.${p.id}.title`), description: t(`projects.${p.id}.description`), - longDescription: t(`projects.${p.id}.longDescription`) || undefined, + longDescription: te(`projects.${p.id}.longDescription`) + ? t(`projects.${p.id}.longDescription`) + : undefined, })), )