Translate the remaining shell text at display and keep translated values out of logic

This commit is contained in:
ZacharyZhang-NY committed 2026-10-06 21:50:11 -04:00
1 parent e236713d9f
commit 2b2302a279
17 files changed
+112 -25

No files matched your search

@@ -320,10 +320,12 @@ pass "Claude collector caches a successful probe"
# The panel reads a window out of a label, and that guess cannot survive a
# model name — "Opus 5 (1M context)" parses as a one-minute window. A collector
# that states the title outright is taken at its word.
run_node_test <<'JS'
run_node_test <<'JS' || exit 1
const fs = require('fs')
const source = fs.readFileSync(root + '/shell/plugins/agents/Panel.qml', 'utf8')
const panelRoot = { nowMs: Date.now() }
// The panel's text goes through I18n; English here, with its %1 arguments filled.
const I18n = { tr: (text, ...args) => text.replace(/%(\d)/g, (m, n) => (n > 0 && n <= args.length ? String(args[n - 1]) : m)) }
const start = source.indexOf('function windowIsLong')
const end = source.indexOf('// The window that decides')
assert(start > 0 && end > start, 'agents panel exposes its limit-window helpers')