mirror of
https://github.com/sudosylabs/vnidrop.git
synced 2026-08-05 02:29:55 +02:00
docs: make strings.json the documented source of truth for l10n
Record in AGENTS.md that localization/strings.json is the single source of truth and the KMP XML + Apple xcstrings/L10n.swift are generated by the loc CLI and must never be hand-edited — a key present only in a generated file is dropped on the next regeneration (which is how the transfer-cache strings were lost in the merge).
This commit is contained in:
11
AGENTS.md
11
AGENTS.md
@@ -48,6 +48,15 @@ Domain docs (reference, do not paste into PRs):
|
||||
8. **Every bug fix includes a regression test** at the lowest layer that catches it.
|
||||
9. After code changes, run the **relevant** checks in [Build and test](#build-and-test)
|
||||
and fix failures before finishing.
|
||||
10. **`localization/strings.json` is the single source of truth for all localized
|
||||
strings.** The KMP Compose resources (`shared/src/commonMain/composeResources/
|
||||
values*/strings.xml`) and the Apple catalog + accessors
|
||||
(`apple/VniDrop/Resources/Localizable.xcstrings`, `apple/VniDrop/Generated/
|
||||
L10n.swift`) are **generated** by the loc CLI (`cd localization && bun run
|
||||
src/cli.ts generate`) — never hand-edit them. To add/change a string: edit
|
||||
`strings.json` (set `targets` to `kmp`, `apple`, or omit for both), then
|
||||
regenerate. A key referenced in code but only present in a generated file will
|
||||
be silently dropped the next time generation runs.
|
||||
|
||||
---
|
||||
|
||||
@@ -291,6 +300,8 @@ branch from updated `master`.
|
||||
- Flaky multi-minute sleeps in tests
|
||||
- Unsigned commits when signing is required
|
||||
- Force-push or secret commits without explicit user direction
|
||||
- Hand-editing generated localization files (`values*/strings.xml`,
|
||||
`Localizable.xcstrings`, `L10n.swift`) instead of `localization/strings.json`
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user