ADR 0005 — Interface language: English by default, French available
Context
Until the end of milestone M2, every label of the interface was written in French in the Svelte components, and ui.language defaulted to fr; only the configuration error messages had an English catalogue. The owner asked for an English interface. French remains useful: the owner and the first users speak it, and the test prompts of the agents are in French.
Decision
- English is the default language:
ui.languagedefaults toen(schema andconfig.DefaultLanguage), and the default configuration file is written in English (comments, channelgeneral). - French stays available with
ui: language: fr. The switch applies live, like any configuration change. - Every text of the interface lives in one catalogue,
frontend/src/lib/i18n/messages.ts: anenobject whose keys are the reference, and afrobject typedRecord<MessageKey, string>, so a missing French key failssvelte-check. A unit test checks that both catalogues have the same keys and the same{variables}. t(key, vars)reads a reactive$statelocale;setLanguageis called each time the configuration is read. Configuration errors keep their Go catalogue (internal/config/problems.go), in the same language.- Agent titles, descriptions and channel names come from the user's file and are never translated.
Rejected alternatives
- An i18n library (svelte-i18n, Paraglide): a dependency and a build step for two languages and about 130 keys; a typed object does the same with no runtime cost.
- English only: simpler, but loses the French interface that the first users want.
- Following the operating system's language: unpredictable for screenshots and test guides; an explicit key in the file is visible and versioned.
Consequences
- Test guides and tutorials quote the English labels; the French tutorial that writes its own configuration sets
language: frand quotes the French ones. - Adding a label means adding an
enkey and itsfrtranslation; the type checker and the test refuse anything less.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
|