@micha.bigler/ui-core-micha 2.41.0 → 2.41.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,139 @@
1
+ # I18N-3 — Backfill Swahili in `messagingTranslations` and restore the four-locale shape test
2
+
3
+ **Target repo:** `ui-core-micha` (branch `main`)
4
+ **Tier:** 3 — shared-core, and it re-tightens a test the estate deliberately loosened.
5
+
6
+ ---
7
+
8
+ ## A. Envelope
9
+
10
+ ### Goal
11
+
12
+ `src/i18n/messagingTranslations.ts` carries **116 keys with `de`/`fr`/`en` and zero `sw`**. Every one of the
13
+ other six bundles carries all four locales:
14
+
15
+ | bundle | de | fr | en | sw |
16
+ |---|---|---|---|---|
17
+ | `auth` | ✓ | ✓ | ✓ | ✓ |
18
+ | `charts` | 12 | 12 | 12 | 12 |
19
+ | **`messaging`** | **116** | **116** | **116** | **0** |
20
+ | `notifications` | 30 | 30 | 30 | 30 |
21
+ | `onboarding` | 27 | 27 | 27 | 27 |
22
+ | `sectionNav` | 3 | 3 | 3 | 3 |
23
+ | `userMenu` | 3 | 3 | 3 | 3 |
24
+
25
+ `I18N-1` hit this while writing its aggregate test: the required "every value keeps its `{de,fr,en,sw}` shape"
26
+ assertion failed, the gap was confirmed as pre-existing rather than caused by the merge, and the operator
27
+ scoped the test down to `{de,fr,en}` with the backfill recorded as a follow-up. **The follow-up was never
28
+ written, and a scoped-down test tends to stay scoped down.** That is what this WO closes.
29
+
30
+ ### Scope
31
+
32
+ 1. **`src/i18n/messagingTranslations.ts`** — add `sw` to all 116 keys.
33
+ 2. **`tests/i18nAggregate.test.js`** — restore the shape assertion to `{de,fr,en,sw}` and **remove the comment
34
+ recording the scope-down**, since it no longer describes the state.
35
+ 3. Nothing else. No other bundle is touched; they already conform.
36
+
37
+ ### The translation quality question, which is this WO's real risk
38
+
39
+ **Machine-translated UI strings that nobody on the team can check are a worse outcome than an honest gap.**
40
+ Messaging strings are user-facing and include the kinds of phrase that go wrong invisibly — actions,
41
+ confirmations, error states, relative time. So:
42
+
43
+ - **Name the source of the translations in the register note.** If they are machine-produced, say so plainly
44
+ rather than shipping them as if reviewed.
45
+ - **Flag any key the translator was unsure of** rather than guessing. A `sw` value that is wrong is harder to
46
+ find later than one that is missing, because the shape test will then pass.
47
+ - **Do not invent terminology.** Where `notifications` or `onboarding` already has a Swahili term for the same
48
+ concept — send, reply, unread, conversation, attachment — **reuse their wording** rather than coining a
49
+ second one. Those bundles are the existing precedent and consistency across them matters more than any
50
+ individual phrasing.
51
+
52
+ ### Who this is actually for
53
+
54
+ `sw` is configured as a locale in **hram** and in no other app measured. hram does **not** register
55
+ `messagingTranslations` today, so nothing is currently broken for a user — this is prevention, and the honest
56
+ framing is: it closes an inconsistency and re-arms a test, rather than fixing a live defect.
57
+
58
+ That matters for the effort trade-off, and it is why the quality bar above is not negotiable: there is no
59
+ urgency justifying unreviewed strings.
60
+
61
+ ### Non-goals / do not touch
62
+
63
+ - **The other six bundles.** They conform.
64
+ - **The aggregate itself, the directory ratchet, or the key/value fidelity and collision checks.** Only the
65
+ locale-shape assertion changes.
66
+ - **`de`/`fr`/`en` values.** Not a re-translation pass.
67
+ - **Adding an eighth locale**, or any change to how consumers register strings (`I18N-2`'s territory).
68
+
69
+ ### Risks
70
+
71
+ - **116 unreviewable strings.** The mitigation is disclosure, not confidence — see above.
72
+ - **Re-tightening the test is the irreversible half.** Once the assertion demands four locales, any future
73
+ bundle addition must supply `sw` or fail CI. That is the intent, and it is worth stating so the next person
74
+ adding a bundle is not surprised.
75
+ - **A push to `main` publishes.** See Part C.
76
+
77
+ ### Required tests to WRITE
78
+
79
+ None new — **`tests/i18nAggregate.test.js`'s restored four-locale assertion IS the test**, and re-arming it is
80
+ scope item 2. It will fail until the backfill is complete, which is the correct behaviour and the reason it
81
+ belongs in the same change.
82
+
83
+ Scoped run: `i18nAggregate` plus the messaging export specs. Not the full suite — no dependency or theme
84
+ change.
85
+
86
+ ### Parity guardrail
87
+
88
+ No API, behaviour or visual change for `de`/`fr`/`en` consumers. Purely additive.
89
+
90
+ ---
91
+
92
+ ## B. Implementation map
93
+
94
+ *Filled by the Orchestrator on `git pull` — see `AGENTS.md` → "Work Order".*
95
+
96
+ ---
97
+
98
+ ## C. Orchestrator only
99
+
100
+ > **STOP — if you are the implementer reading this work order as your own specification, this section is NOT
101
+ > addressed to you. Skip it entirely.** It tells the Orchestrator how to invoke you. **You ARE that
102
+ > invocation — do NOT shell out to `codex exec`, do NOT spawn reviewers, do NOT edit `WORK_ORDERS.md`, and do
103
+ > NOT `git add`/`commit`/`push`.**
104
+
105
+ ### Execution directive
106
+
107
+ Check `.claude/codex-status.md` first. **No line for the current date means use Codex.** A dated `unavailable`
108
+ line for today means skip the attempt, implement directly in Claude and name the record — that flips
109
+ authorship. Otherwise one probe, outcome written back either way.
110
+
111
+ ### Review routing
112
+
113
+ Tier 3: **independent `reviewer`** — mandatory. Ask it specifically to check **terminology consistency against
114
+ `notifications` and `onboarding`**, and to confirm that no `de`/`fr`/`en` value was altered in passing. **No
115
+ `ui_reviewer`** — nothing renders. No `sec_reviewer`.
116
+
117
+ Neither reviewer can validate Swahili. **Say that in the note** rather than letting a clean verdict imply the
118
+ translations were checked.
119
+
120
+ ### Verification
121
+
122
+ The restored four-locale assertion passing is the verification. Nothing renders, so no gate.
123
+
124
+ **A push to `main` here IS the npm publish** — `publish.yml` triggers on `push: branches: [main]` with `src/**`
125
+ in its paths, and publishes cannot be undone. Additive strings, so a **patch** by scope.
126
+
127
+ ### Register + commit
128
+
129
+ One row, `I18N-3`. `done` only with the reviewer and verdict named, **the translation source stated**, and any
130
+ uncertain keys listed. Also update `I18N-1`'s note: its recorded follow-up is now closed, and leaving it open
131
+ there is how the same gap gets rediscovered.
132
+
133
+ ### Mini-handover
134
+
135
+ Repo: `ui-core-micha`, branch `main`. WO: `work-orders/I18N-3.md`. 116 `sw` values into
136
+ `messagingTranslations.ts`, then restore `i18nAggregate.test.js` to `{de,fr,en,sw}` and drop the scope-down
137
+ comment. **Reuse `notifications`/`onboarding` terminology; disclose the translation source; flag uncertain
138
+ keys instead of guessing.** No app is broken today — this closes an inconsistency and re-arms a test. Tier 3,
139
+ `reviewer` mandatory. **Pushing to main publishes.** Follow `orchestrate-codex`.