P3-3b: Internationalisation — four languages from the start #41
Labels
No labels
data-integrity
engine
platform
procurement
remote
scaffold
ui
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Cordy/cairn-desktop#41
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Do this immediately after P3-3 (shell) and before P3-4 (setup wizard).
Sequencing matters more than usual here. Retrofitting i18n after three screens of hardcoded English means revisiting every string, every layout, and every test. Doing it first costs almost nothing.
Languages
English, German, French, Italian — English plus the three Swiss official languages. Appropriate for a Swiss company selling to Swiss organisations and public authorities, and it means the product is usable in every canton on day one.
(If you meant a different four — say, dropping Italian for Spanish — change it now, before the catalogues exist.)
Files
frontend/i18n/en.json,de.json,fr.json,it.json,frontend/i18n/i18n.ts,internal/app/i18n.go,frontend/i18n/i18n_test.ts(or a Go test that validates the catalogues)Reuse Cairn's conventions
The Cairn web UI already has a
t()helper and key-naming conventions. Match them — same key style, same catalogue shape. The Wails frontend is web technology, so catalogues can be shared or at least kept structurally identical. Two divergent i18n systems in one product is a maintenance tax for no benefit.The failure mode to guard against
From Cairn's own experience:
t()returns the key verbatim when a translation is missing. A button labelledpeeringClosein production is a missing key, not a rendering bug — and it ships silently, because nothing errors.Guard it with a test:
en.jsonmust exist in all three other catalogues. Fail the build otherwise. This is the single most valuable test in this task.en.json(catches stale keys after a rename).Scope — translate the user-facing surface
Setup wizard · tray menu and status lines · main window · conflict UI · skip reasons · settings · notifications · error messages.
Skip reasons and error text matter most. They are what a confused user reads at the worst moment, and they are exactly the strings a developer forgets to externalise because they were written as debug output. The engine's
Skip.Reasonstrings come from Go, not the frontend — decide now whether they are translated server-side in Go, or emitted as structured codes the frontend translates. Codes are the better answer:sync.Skipgains aCodefield, and the reason string becomes a fallback for logs and diagnostics.What is not translated
Log files, the diagnostics bundle, and
cairnsyncCLI output stay in English. They exist to be pasted into a support conversation, and a German stack trace helps nobody.Locale detection
Follow the OS locale by default; allow an explicit override in settings; make it policy-settable (P3-1) so an organisation can standardise. Fall back to English for any unsupported locale.
Steps
Codetosync.Skipand map every existing reason to a code.de/fr/it.jsonare empty.git commit -s -m "feat(i18n): English, German, French and Italian catalogues"Acceptance criteria