daw_i18n/v1: one resource_id per site, also within a file #22

Closed
opened 2026-11-17 18:58:56 +01:00 by michael · 1 comment
Owner

Problem

daw_i18n/v1 (section 4) says that independent construction sites MUST
NOT share a resource_id only because their text is identical. It does
not say whether two sites in one file are independent. In practice
resource_ids are used at several sites: a count over the sources found
13 ids used more than once in DAW/daw-module-manager and 2 in
DAW/daw-modul-berhtjan-core, copy-pasted boilerplate for the most part.

The resource_id also marks the place where a message arises. That only
works if it is unique per site; translating a text twice is a one-time
cost.

Scope

  • section 4 of specification.md, validation_rules in contract.json:
    every site that produces a message (an error construction, an event
    sent) has its own resource_id, also within one file
  • rationale.md: why, and that it can be checked by counting
  • changelog (draft, no version bump)

Acceptance criteria

  • specification, contract.json and rationale agree
  • the rule is checked by fragjan code . (DAW/fragjan#152, done)

DAW/fragjan#152, DAW/daw-module-manager and DAW/daw-modul-berhtjan-core
(duplicates to fix, separate issues)

## Problem `daw_i18n/v1` (section 4) says that independent construction sites MUST NOT share a `resource_id` only because their text is identical. It does not say whether two sites in one file are independent. In practice `resource_id`s are used at several sites: a count over the sources found 13 ids used more than once in DAW/daw-module-manager and 2 in DAW/daw-modul-berhtjan-core, copy-pasted boilerplate for the most part. The `resource_id` also marks the place where a message arises. That only works if it is unique per site; translating a text twice is a one-time cost. ## Scope - section 4 of `specification.md`, `validation_rules` in `contract.json`: every site that produces a message (an error construction, an event sent) has its own `resource_id`, also within one file - `rationale.md`: why, and that it can be checked by counting - changelog (draft, no version bump) ## Acceptance criteria - [ ] specification, contract.json and rationale agree - [ ] the rule is checked by `fragjan code .` (DAW/fragjan#152, done) ## Related DAW/fragjan#152, DAW/daw-module-manager and DAW/daw-modul-berhtjan-core (duplicates to fix, separate issues)
Author
Owner

Implemented on main

Commits: f1fbbd9

Pushed. Follow-up points, if any, are tracked in their own issues.

## Implemented on main Commits: f1fbbd9 Pushed. Follow-up points, if any, are tracked in their own issues.
michael 2026-11-18 11:56:03 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
DAW/daw-contracts#22
No description provided.