fix(i18n): stop warning on missing tool.name.* keys for proper-name tools (T-493)

Tool display names are open-ended (Bash, Grep, Glob, ScheduleWakeup, MCP tools,
…) — they intentionally have no catalog key and fall back to the raw name, so a
miss isn't a gap to fix. The conversation pane was logging an i18n "missing key"
warning for each, cluttering the output dock.

Adds a `warnIfMissing` flag to I18nService.string (default true, so fixed UI
strings still warn on a real gap) threaded through the ClideSettings facade;
_toolNameLabel passes false. Display is unchanged — the placeholder already
rendered the raw name.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-28 14:58:12 +02:00
co-authored by Claude Opus 4.8
parent e5976ad6b1
commit 066197c5e1
7 changed files with 55 additions and 8 deletions
+2 -2
View File
@@ -54,9 +54,9 @@ class _I18n {
/// uniform widget-facing lookup (T-462). [placeholder] is the inline English
/// fallback. With no kernel in scope (isolated primitive tests) it returns
/// the placeholder, so a widget never needs one to render.
String string(BuildContext context, String key, {required String namespace, String? placeholder}) {
String string(BuildContext context, String key, {required String namespace, String? placeholder, bool warnIfMissing = true}) {
final i = ClideKernel.maybeOf(context)?.i18n;
return i == null ? (placeholder ?? key) : i.string(key, namespace: namespace, placeholder: placeholder);
return i == null ? (placeholder ?? key) : i.string(key, namespace: namespace, placeholder: placeholder, warnIfMissing: warnIfMissing);
}
/// [string] with `replaceAll` interpolation per replacer (templated labels).