From 2b6f131f43c0f2d489b99f1e9e0f25bfbfe67a84 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89mile=20R=C3=A9?= Date: Thu, 23 Apr 2026 23:41:37 +0400 Subject: [PATCH] Fix PR review comments on cookie banner i18n MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Address locale normalization for region-tagged values, guard language detection for non-DOM runtimes, validate DefaultLanguage on update, pass translated texts through the deactivation flow, handle slug collisions in migration, add organizations FK, fix consent migration from name-keyed to slug-keyed data, render all template placeholders in previews, and wrap helper text for i18n. Signed-off-by: Émile Ré --- .../cookies/_components/EditCategoryForm.tsx | 5 ++- .../CookieBannerTranslationsPage.tsx | 11 +----- .../_components/BannerPreview.tsx | 35 ++++++++++--------- .../_components/PanelTranslationSection.tsx | 10 ++++-- .../_components/PlaceholderPreview.tsx | 15 ++++---- .../PlaceholderTranslationSection.tsx | 2 +- packages/cookie-banner/src/activation.ts | 7 ++-- packages/cookie-banner/src/client.ts | 2 +- .../src/components/cookie-banner-root.ts | 4 +-- .../src/components/settings-button.ts | 9 +++++ packages/cookie-banner/src/i18n.ts | 16 ++++++--- .../cookie-banner/src/themed-banner/iife.ts | 2 +- .../src/themed-banner/themed-banner.ts | 4 +-- pkg/cookiebanner/defaults.go | 2 ++ pkg/cookiebanner/service.go | 1 + pkg/coredata/migrations/20260422T145821Z.sql | 2 +- pkg/coredata/migrations/20260423T144457Z.sql | 17 ++++++++- 17 files changed, 89 insertions(+), 55 deletions(-) diff --git a/apps/console/src/pages/organizations/cookie-banners/configuration/cookies/_components/EditCategoryForm.tsx b/apps/console/src/pages/organizations/cookie-banners/configuration/cookies/_components/EditCategoryForm.tsx index 0b35de7f9..f861357a1 100644 --- a/apps/console/src/pages/organizations/cookie-banners/configuration/cookies/_components/EditCategoryForm.tsx +++ b/apps/console/src/pages/organizations/cookie-banners/configuration/cookies/_components/EditCategoryForm.tsx @@ -59,7 +59,10 @@ export function EditCategoryForm({ />