[Bug] Reject duplicate keys in generated Campaign translation catalogs #84

Closed
opened 2026-07-29 14:35:14 +02:00 by zemion · 1 comment
Owner

Context

The full-product WebUI build currently warns that i18n:govoplan-campaign.share.09ca55ca is declared twice in each locale object. The German declarations conflict (Freigabe and Freigeben), so object-literal overwrite order determines the visible translation. This is a bounded child of #74.

Acceptance Criteria

  • Keep one intentional translation per locale for every generated key.
  • Make the translation generation or validation step fail on duplicate keys before TypeScript/Vite compilation.
  • Resolve the Share noun/verb context without relying on duplicate object keys.
  • Add a focused regression test for duplicate generated translation keys.
  • The full-product WebUI build completes without duplicate-object-key warnings.
## Context The full-product WebUI build currently warns that `i18n:govoplan-campaign.share.09ca55ca` is declared twice in each locale object. The German declarations conflict (`Freigabe` and `Freigeben`), so object-literal overwrite order determines the visible translation. This is a bounded child of #74. ## Acceptance Criteria - [ ] Keep one intentional translation per locale for every generated key. - [ ] Make the translation generation or validation step fail on duplicate keys before TypeScript/Vite compilation. - [ ] Resolve the `Share` noun/verb context without relying on duplicate object keys. - [ ] Add a focused regression test for duplicate generated translation keys. - [ ] The full-product WebUI build completes without duplicate-object-key warnings.
Author
Owner

Codex State: done

Summary

  • Removed the duplicate Share key and retained the intentional German verb translation Freigeben (Campaign 23b9a53).
  • Core now rejects duplicate locale keys during the automatic pre-build i18n audit (Core 0beb9ff).

Changed Files

  • webui/src/i18n/generatedTranslations.ts
  • ../govoplan-core/webui/scripts/i18n-catalog-validation.mjs
  • ../govoplan-core/webui/scripts/audit-i18n-structural.mjs
  • ../govoplan-core/webui/tests/i18n-catalog-validation.test.mjs

Verification

  • npm run test:i18n-catalog: 2 passed
  • npm run audit:i18n-structural: passed
  • npm run build: passed without duplicate-object-key warnings
## Codex State: done ### Summary - Removed the duplicate Share key and retained the intentional German verb translation Freigeben (Campaign 23b9a53). - Core now rejects duplicate locale keys during the automatic pre-build i18n audit (Core 0beb9ff). ### Changed Files - `webui/src/i18n/generatedTranslations.ts` - `../govoplan-core/webui/scripts/i18n-catalog-validation.mjs` - `../govoplan-core/webui/scripts/audit-i18n-structural.mjs` - `../govoplan-core/webui/tests/i18n-catalog-validation.test.mjs` ### Verification - `npm run test:i18n-catalog: 2 passed` - `npm run audit:i18n-structural: passed` - `npm run build: passed without duplicate-object-key warnings`
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: GovOPlaN/govoplan-campaign#84