v0.6.16 — 6 more i18n cleanups + 1 UX polish (4-button range picker)
v0.6.16 — 6 more i18n cleanups + 1 UX polish (4-button range picker)
A focused cleanup release that closes a small user-reported backlog of i18n hardcoded strings + one toolbar visual issue flagged from the /usage page screenshot.
P1 — i18n hardcoded strings (4 fixes)
profiles/[name]/page.tsx:61"✓ Created" banner. Was<div>✓ Created <code>{name}</code>.</div>— the leading "✓ Created" string was raw English. Now usesRichTwithprofiles.createdBanner = "✓ Created {name}."(en) /"✓ 已创建 {name}。"(zh).profiles/[name]/page.tsx:83not-found error card. Was<div>Profile <code>{name}</code> not found.</div>. NowRichTwithprofiles.notFound = "Profile {name} not found."/"未找到 Profile {name}。".profiles/[name]/page.tsx:195env section heading. Was<h2>env (read-only — edit TOML directly)</h2>— English-only. New keyprofiles.envHeading(en/zh).policy/page.tsx:150load error title. Was<h2><T k="error.couldntLoad.title" />: policies</h2>—<T>part was i18n'd but the trailing raw: policiesrendered as English even in zh, producing "加载失败: policies". Folded the noun into a single i18n key:policy.loadErrorTitle.
P2 — relative-time suffix hardcoded English (1 fix)
Inspector.tsx:726-737formatRelative()was English shorthand only. Returned${sec}s ago/${min}m ago/ etc. — the postfix "ago" was always English. Now each suffix is an i18n key:compose.inspector.time.{second,minute,hour,day,month,year}. The helper is module-level so it can'tuseT(); the callers (the session-detail inspector block) pass theirtin explicitly:formatRelative(iso, t).
P3 — translation consistency (1 fix)
dict.zh.ts"fork" 翻译不一致.try.session.forkHerewas "从此处派生" andtry.hint.forkFromHerewas "从这里分叉". Aligned to "从此处派生" in both.
P3 — placeholder parameter drift (deferred)
dict.zh.tshas 15 keys where the placeholder list doesn't matchdict.en.tsexactly. None of these impact the rendered output. Cleaning this up would require auditing every call site; punted to v0.6.17+ (or whenever someone next adds a new locale).
UX — /usage range picker
- Active tab no longer "shrinks". Added
min-w-[5rem]so all four pills share a minimum width (5rem fits the longest current label in any locale; longer future labels grow as needed). - Active state visual +
aria-current="page". The active button now also getsfont-semibold.aria-current="page"makes the active tab discoverable to screen readers. - Non-active hover gains color + bg.
text-[var(--text-muted)] hover:text-[var(--text)] hover:bg-[var(--surface-2)]— hover gives both a brighter text color and a subtle bg fill.
Stats
- root tests: 543/543 ✓ (unchanged)
- web tests: 214/214 ✓ (unchanged)
- format:check root + web: ✓
- tsc root + web: ✓
- production build (
next build): ✓
Deliberately NOT done (v0.6.17+ backlog)
- multiple connections (A↔B 双向)
- connection color 自定义
- auto-route 避开 block 中心
- ComposeBoard.tsx hooks/state 抽离
- full placeholder parameter audit (15 keys) — see P3 above
Commit
1ee471fv0.6.16: 6 more i18n cleanups + /usage 4-button UX polish