Skip to content

v0.6.16 — 6 more i18n cleanups + 1 UX polish (4-button range picker)

Choose a tag to compare

@wwppee wwppee released this 15 Jul 18:26

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 uses RichT with profiles.createdBanner = "✓ Created {name}." (en) / "✓ 已创建 {name}。" (zh).
  • profiles/[name]/page.tsx:83 not-found error card. Was <div>Profile <code>{name}</code> not found.</div>. Now RichT with profiles.notFound = "Profile {name} not found." / "未找到 Profile {name}。".
  • profiles/[name]/page.tsx:195 env section heading. Was <h2>env (read-only — edit TOML directly)</h2> — English-only. New key profiles.envHeading (en/zh).
  • policy/page.tsx:150 load error title. Was <h2><T k="error.couldntLoad.title" />: policies</h2><T> part was i18n'd but the trailing raw : policies rendered 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-737 formatRelative() 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't useT(); the callers (the session-detail inspector block) pass their t in explicitly: formatRelative(iso, t).

P3 — translation consistency (1 fix)

  • dict.zh.ts "fork" 翻译不一致. try.session.forkHere was "从此处派生" and try.hint.forkFromHere was "从这里分叉". Aligned to "从此处派生" in both.

P3 — placeholder parameter drift (deferred)

  • dict.zh.ts has 15 keys where the placeholder list doesn't match dict.en.ts exactly. 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 gets font-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

  • 1ee471f v0.6.16: 6 more i18n cleanups + /usage 4-button UX polish