Add cookie banner i18n service logic

Seed default English UI strings on banner creation, include
translations in version snapshots, and resolve language at
config-serving time. Add translation CRUD methods and the
language-aware buildBannerConfig helper. Extract default
categories and UI strings into defaults.go.

Signed-off-by: Émile Ré <emile@getprobo.com>
This commit is contained in:
Émile Ré
2026-04-23 10:04:45 +04:00
parent d189913ba3
commit de47fb0702
3 changed files with 381 additions and 31 deletions

View File

@@ -32,4 +32,6 @@ var (
ErrCookieNameAlreadyExists = errors.New("a cookie with this name already exists in this banner")
ErrCategoriesBannerMismatch = errors.New("source and target categories belong to different banners")
ErrSameCategoryMove = errors.New("source and target cookie categories must be different")
ErrTranslationNotFound = errors.New("cookie banner translation not found")
ErrTranslationAlreadyExists = errors.New("translation for this language already exists")
)