From b118343864600d50f46ff201aace6d6e5f0228af Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 18 Sep 2026 02:35:50 +0000 Subject: [PATCH] refactor(website): stop using i18n keys as prefixes of other keys Eleven website translation keys were both a message and the parent of other messages (learning.categories.all next to learning.categories.all.blurb), which a nested catalog cannot express. Give each such leaf its own segment (label, text or message) and update the consumers, and add a test that keeps the key set prefix-free so the catalogs can take the same nested shape as the app's. --- apps/website/e2e/learning.spec.ts | 2 +- .../src/components/demos/ArcadeEmbed.vue | 2 +- .../learning/LearningCategoryNav.vue | 2 +- .../components/workshop/WorkshopCatalog.vue | 2 +- apps/website/src/data/learningTutorials.ts | 8 +++---- apps/website/src/i18n/translations.test.ts | 15 ++++++++++++- apps/website/src/i18n/translations.ts | 22 +++++++++---------- 7 files changed, 33 insertions(+), 20 deletions(-) diff --git a/apps/website/e2e/learning.spec.ts b/apps/website/e2e/learning.spec.ts index 02a834a8c45..2d83aafa59b 100644 --- a/apps/website/e2e/learning.spec.ts +++ b/apps/website/e2e/learning.spec.ts @@ -317,7 +317,7 @@ test.describe('Learning tutorial page @smoke', () => { ).toHaveAttribute('href', '/learning') await expect( breadcrumb.getByRole('link', { - name: t(`learning.categories.${firstTutorial.category}`, 'en') + name: t(`learning.categories.${firstTutorial.category}.label`, 'en') }) ).toHaveAttribute('href', `/learning/${firstTutorial.category}`) await expect(breadcrumb.getByText(firstTutorial.title.en)).toBeVisible() diff --git a/apps/website/src/components/demos/ArcadeEmbed.vue b/apps/website/src/components/demos/ArcadeEmbed.vue index e6993d3b7fc..819c6212eba 100644 --- a/apps/website/src/components/demos/ArcadeEmbed.vue +++ b/apps/website/src/components/demos/ArcadeEmbed.vue @@ -55,7 +55,7 @@ const loaded = ref(false)