Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins
TypeScript ai-agentcoding-agentdesktop-appelectronglobali18nlocal-firstmcppipi-agentpi-desktoppluginsreactrusttypescript
ADR 0267: Plugin Labels Follow the App Language
- Status: Accepted
- Date: 2026-09-16
- Related: ADR 0009 · ADR 0160 · ADR 0182 · ADR 0280 · 07-plugins/02-plugin-manifest-schema
Context
A plugin's display name and description come from its manifest, and a marketplace
card's from its catalog entry, both as single strings in whatever language the author
used, so the Extensions page, launcher, and marketplace showed Chinese names under an
English shell and English names under a Chinese one. The plugin repository's validator
had required a top-level i18n block with name, description, and safetyNotes per
locale since its first release, but the desktop shell read none of it.
Decision
manifest.i18nand the same block on a catalog entry become part of the plugin contract;enandzh-CNare the contract locales, and a plugin need not translate itself into every shipped shell locale.- Every Chinese shell locale reads
zh-CNand every other locale readsen, sozh-TWreads English rather than a half-sharedzh-CNguess (ADR 0182). - Resolution happens in the host, not the renderer: rows leave the process as
finished strings, and a missing locale, field, or empty string falls back per field
to the other contract locale and then to the author's flat
name/description. - The shell pushes the language down through
plugins.setLocaleon change and emitspluginChanged, so persisted rows are never rewritten and thei18nblock is neither persisted nor sent over RPC. - A malformed block fails
validateManifest, while unknown locales and unknown fields are ignored so a publisher may carry more than the contract requires.
Consequences
- A translated plugin reads in the user's language on the Extensions page, launcher,
and marketplace,
safetyNotesincluded. - Catalog search matches every locale's name and description.
- Authors may keep shipping a single-language manifest, because the flat fields remain the fallback and no field of the block is mandatory to load.
Alternatives
- Resolve in the renderer — rejected: it would receive every manifest's
i18nblock and duplicate fallback rules the host owns.