refactor(i18n): route framework + shared chrome through a 'core' catalog (T-469)

Framework strings outside any extension — widget primitives (collapser, toast,
lightbox, multitab, ex-line, spine, pane chrome), the shared reader chrome, the
markdown 'Open in editor' tooltip, and the drag-resize handle a11y labels — now
resolve under a new 'core' namespace (preloaded at boot). Settles the T-469
namespace question: framework chrome gets one 'core' catalog.

Makes ClideSettings.i18n.string/.interpolated null-safe (ClideKernel.maybeOf):
primitives render kernel-less in isolated tests, returning the placeholder —
matching the D-101 fallback contract for fonts. The markdown tooltip threads
via the ClideMarkdownHooks carrier like mono/ui; drag_resize reads the kernel
i18n directly to avoid a kernel→widgets layering inversion. No en_US change.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-18 23:26:02 +02:00
co-authored by Claude Opus 4.8
parent 17bc907415
commit 33a8a74240
16 changed files with 212 additions and 49 deletions
+5
View File
@@ -345,6 +345,11 @@ class ClideKernel extends InheritedWidget {
return w.services;
}
/// Like [of] but returns null instead of throwing when there is no kernel in
/// scope — lets widget-facing facades (e.g. [ClideSettings.i18n]) degrade
/// gracefully so a primitive renders in an isolated test without a kernel.
static KernelServices? maybeOf(BuildContext context) => context.dependOnInheritedWidgetOfExactType<ClideKernel>()?.services;
@override
bool updateShouldNotify(ClideKernel oldWidget) => services != oldWidget.services;
}