refactor(i18n): route command + settings manifest labels through the catalog (T-462)

Apply the manifest-i18n foundation across every extension: each
CommandContribution (45, command-palette + menu) gains titleKey + i18nNamespace,
and each SettingsCategory/section/field/option gains its key — with the English
text added to the owning extension's catalog. The settings renderer
(settings_category_view + settings_modal) threads the category's i18nNamespace
down and resolves every label/help/option through it; new catalogs created for
view, cli-install, keybindings-ui. No en_US behaviour change — the command
palette, menus, and settings panel now localize from the catalog (D-21).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-19 10:20:19 +02:00
co-authored by Claude Opus 4.8
parent 198c8b18b5
commit 37fa255a63
28 changed files with 419 additions and 72 deletions
+24 -6
View File
@@ -28,7 +28,15 @@ class ThemePickerExtension extends ClideExtension {
// "Theme…" to disambiguate from the schema-driven Settings panel's
// `settings.open` (T-444); the theme picker folds into that panel's
// Appearance category in T-452.
CommandContribution(id: 'theme.pick', command: 'theme.pick', title: 'Theme…', defaultBinding: 'ctrl+k', run: _pick),
CommandContribution(
id: 'theme.pick',
command: 'theme.pick',
title: 'Theme…',
titleKey: 'command.pick',
i18nNamespace: id,
defaultBinding: 'ctrl+k',
run: _pick,
),
// Always-visible switcher in the far-right status bar (T-234).
// priority >= 100 places it in the right group; registered after
// ipc-status so it sits to its right.
@@ -36,49 +44,59 @@ class ThemePickerExtension extends ClideExtension {
// Appearance settings category (T-452) — the theme picker as the schema
// engine's one custom control, registered against the control registry.
SettingsControlContribution(id: 'theme-picker.appearance-control', customId: 'theme.picker', builder: (_) => const AppearanceThemeControl()),
const SettingsCategoryContribution(
SettingsCategoryContribution(
id: 'appearance',
category: SettingsCategory(
id: 'appearance',
title: 'Appearance',
titleKey: 'settings.appearance.title',
i18nNamespace: id,
iconName: 'palette',
priority: 10,
sections: [
SettingsSection(
label: 'Theme',
labelKey: 'settings.appearance.section.theme',
fields: [
SettingsField(
key: 'app.theme',
kind: SettingsFieldKind.custom,
label: 'Theme',
labelKey: 'settings.appearance.field.theme.label',
help: 'Color theme; high contrast switches to the accessible variant.',
helpKey: 'settings.appearance.field.theme.help',
customId: 'theme.picker',
),
],
),
SettingsSection(
label: 'Typography',
labelKey: 'settings.appearance.section.typography',
fields: [
SettingsField(
key: kUiFontSettingKey,
kind: SettingsFieldKind.select,
label: 'UI font',
labelKey: 'settings.appearance.field.uiFont.label',
help: 'Typeface for the app interface; applies live.',
helpKey: 'settings.appearance.field.uiFont.help',
defaultValue: 'JosefinSans',
options: [
SettingsOption(value: 'JosefinSans', label: 'Josefin Sans'),
SettingsOption(value: 'Inter', label: 'Inter'),
SettingsOption(value: 'JosefinSans', label: 'Josefin Sans', labelKey: 'settings.appearance.field.uiFont.option.josefinSans'),
SettingsOption(value: 'Inter', label: 'Inter', labelKey: 'settings.appearance.field.uiFont.option.inter'),
],
),
SettingsField(
key: kMonoFontSettingKey,
kind: SettingsFieldKind.select,
label: 'Monospace font',
labelKey: 'settings.appearance.field.monoFont.label',
help: 'Terminal, diffs, code, and IDs; applies live.',
helpKey: 'settings.appearance.field.monoFont.help',
defaultValue: 'JetBrainsMono',
options: [
SettingsOption(value: 'JetBrainsMono', label: 'JetBrains Mono'),
SettingsOption(value: 'FiraMono', label: 'Fira Mono'),
SettingsOption(value: 'JetBrainsMono', label: 'JetBrains Mono', labelKey: 'settings.appearance.field.monoFont.option.jetBrainsMono'),
SettingsOption(value: 'FiraMono', label: 'Fira Mono', labelKey: 'settings.appearance.field.monoFont.option.firaMono'),
],
),
],