Skip to content

feat(i18n): full Chinese coverage — datasets, hidden routes, metric names, legend toggles / 中文全覆盖——数据集、隐藏路由、指标名称与图例开关#525

Merged
functionstackx merged 6 commits into
masterfrom
feat/zh-full-coverage
Jul 4, 2026
Merged

feat(i18n): full Chinese coverage — datasets, hidden routes, metric names, legend toggles / 中文全覆盖——数据集、隐藏路由、指标名称与图例开关#525
functionstackx merged 6 commits into
masterfrom
feat/zh-full-coverage

Conversation

@functionstackx

@functionstackx functionstackx commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

Summary

Round 3 of the Chinese site (follows #523): every route and every user-visible UI string now has a Simplified Chinese equivalent, closing the gaps flagged in review — /datasets, the Y-axis metric dropdown, the graph option toggles, the evaluation "Prompts" surface, and all hidden/feature-gated routes.

New /zh routes

Route Notes
/zh/datasets Fully translated prose (trace capture, cached prefix/suffix, variants) + localized dataset list
/zh/datasets/[slug] Localized detail chrome (stats, distributions, table, pagination); dataset content stays DB data
/zh/datasets/[slug]/conversations/[convId] Mirrored with noindex preserved; flamegraph legend/tooltips localized
/zh/ai-chart, /zh/current-inferencex-image, /zh/feedback Feature-gated tabs mirrored (feedback keeps noindex,nofollow); gated TabNav labels now Chinese
/zh/inference/agentic/[id] noindex mirrored; detail view, sibling nav, request timeline toggles, warmup note localized

/datasets was also missing from the sitemap entirely — both languages are now emitted as an hreflang pair.

Metric names & chart options (the screenshots)

  • Y-axis metrics: every metric in inference-chart-config.json gained _labelZh/_titleZh; new metricTitle()/metricLabel() helpers resolve by locale and are wired through the dropdown options + group headers ("Throughput" → 吞吐量, "Cost per Million Total Tokens" → 每百万总 token 成本, …), chart headings, D3 axis labels, and tooltips (units stay English). X-axis mode labels (Interactivity → 交互性, E2E Latency → 端到端延迟) localized too.
  • Legend toggles: Log Scale 对数缩放, Optimal Only 仅最优, Labels 标签, High Contrast 高对比度, Parallelism/Gradient/Line Labels, Reset filter 重置筛选 across ScatterGraph, GPUGraph, evaluation/reliability bar charts, radar chart, submissions; Advanced 高级 / Collapse 收起 / Expand 展开, the legend Search… placeholder, and the ATOM footnote.
  • Evaluation "Prompts": button → 提示词, plus the full per-sample drawer (filters, search, block labels, pagination in natural Chinese word order).
  • Shared primitives (searchable-select, multi-select, data-table) take optional localized placeholder/no-results props — English defaults untouched so their unit tests stay green.

AGENTS.md mandate hardened

  • Rule 5: ALL user-visible UI strings MUST have a Chinese equivalent — no more carve-outs for chart internals or option labels; mechanism documented (useLocale() + STRINGS, labelZh registry fields).
  • Rule 8: every route gets a /zh sibling, including hidden/feature-gated ones. Only feed.xml/llms.txt, per-post OG images (Satori has no CJK font), and DB-stored content remain exempt.

Test plan

  • pnpm typecheck, pnpm lint, pnpm fmt — clean
  • pnpm test:unit — 2,443 pass (new: metricTitle/metricLabel helper tests, expanded i18n route tests, tab-meta-zh completeness now covers the gated tabs)
  • Full local Cypress integration run against the dev server: 461/462 — the one failure (throughput-calculator.cy.ts "table row count matches bar count") also fails on master with the live DB (pre-existing, data-dependent; CI fixtures pass), verified by stashing and re-running on master
  • pnpm build — all 1,055 pages generate, new zh routes present
  • English pages remain byte-identical (all en dict values are the exact original strings)

中文说明

中文站第三轮(继 #523 之后):所有路由与所有用户可见界面文案均已提供中文版本,补齐了评审中指出的缺口——/datasets、Y 轴指标下拉菜单、图表选项开关、评估"提示词"入口以及全部隐藏/功能门控路由。

  • 新增路由/zh/datasets 页面树(正文全文翻译,数据集内容保留为数据库数据)、/zh/ai-chart/zh/current-inferencex-image/zh/feedback(保留 noindex)、/zh/inference/agentic/[id]/datasets 同时补入站点地图(中英 hreflang 成对)
  • 指标与图表选项:图表配置中每个指标新增 _labelZh/_titleZh 字段,通过 metricTitle()/metricLabel() 辅助函数贯通下拉选项、分组标题、图表标题、坐标轴与悬浮提示(单位保留英文);图例开关(对数缩放、仅最优、高对比度、渐变标签、重置筛选等)、"高级/收起/展开"、搜索占位符、ATOM 脚注全部翻译;评估表格"提示词"按钮与逐样本抽屉完整本地化
  • 规则升级:AGENTS.md 明确要求所有用户可见文案与所有路由(含隐藏路由)必须提供中文版本,仅机器订阅源、OG 图片与数据库内容除外
  • 测试:2,443 个单元测试通过;本地完整 Cypress 集成测试 461/462(唯一失败项在 master 上同样失败,属既有的数据依赖性问题,CI fixtures 环境通过);生产构建 1,055 个页面全部生成;英文页面逐字节不变

🤖 Generated with Claude Code


Note

Medium Risk
Large, cross-cutting UI and routing change with many string touchpoints; regressions would show as wrong locale, broken /zh links, or English/chinese SEO drift, but no auth or data-layer changes.

Overview
Expands Simplified Chinese (/zh) to routes and UI that were still English-only, and tightens repo rules so new work must ship Chinese siblings and localized strings.

Adds /zh pages for the datasets tree (list, detail, conversation views), feature-gated dashboard tabs (ai-chart, current-inferencex-image, feedback), and agentic point detail. English dataset pages now use enAlternates / languageAlternates; /datasets is registered in ZH_MIRRORED_ROUTES and the sitemap as an hreflang pair.

Inference charts gain _labelZh / _titleZh on metrics in inference-chart-config.json, resolved via metricTitle() / metricLabel() for Y-axis dropdown groups, axis labels, headings, and captions (including dynamic “vs. …” headings on zh). Legend and control toggles (log scale, optimal only, reset filter, etc.) are localized across scatter/GPU/eval/radar surfaces.

Shared client components (datasets flamegraph/list/detail, AI chart, eval samples drawer/table, feedback viewer, agentic nav/timeline) switch to useLocale() + STRINGS and /zh-aware links so navigation stays in the Chinese tree.

AGENTS.md and docs/i18n.md now require all user-visible UI strings to have Chinese equivalents and every route (including hidden/gated) to have a /zh sibling, plus a Cursor Bugbot re-review loop before merge.

Reviewed by Cursor Bugbot for commit 1716e16. Bugbot is set up for automated code reviews on this repo. Configure here.

…ames, legend toggles

Round 3 of the Chinese site: every route and every user-visible UI
string now has a Simplified Chinese equivalent.

- /zh/datasets, /zh/datasets/[slug], /zh/datasets/[slug]/conversations/
  [convId] (noindex preserved) with fully translated prose and localized
  dataset components (list, detail, conversation view, distribution
  cards, flamegraph legend); /datasets added to sitemap as EN+zh pair
- Hidden/gated routes mirrored: /zh/ai-chart, /zh/current-inferencex-
  image, /zh/feedback (noindex preserved), /zh/inference/agentic/[id];
  gated TabNav labels + 'Hidden' group localized; agentic detail,
  sibling nav, request timeline (phase/row toggles, warmup note) in
  Chinese
- Y-axis metric display names localized end-to-end: _labelZh/_titleZh
  fields in inference-chart-config.json + metricTitle/metricLabel
  helpers wired through the dropdown (options + group headers), chart
  headings, D3 axis labels, and tooltips; x-axis mode labels too
- Chart legend fully localized: Log Scale/Optimal Only/Labels/High
  Contrast/Parallelism/Gradient/Line Labels toggles across all graphs,
  Advanced/Collapse/Expand, Search placeholder, ATOM footnote, Reset
  filter everywhere
- Evaluation Prompts button + per-sample drawer localized; shared
  select/table primitives take localized placeholder/no-results props
- AGENTS.md rules hardened: ALL user-visible strings and ALL routes
  (incl. hidden) MUST ship Chinese equivalents; only feeds, OG images,
  and DB content are exempt; i18n tests updated for the expanded
  mirror set

Note: throughput-calculator.cy.ts 'table row count matches bar count'
fails locally against the live DB on master too (pre-existing,
data-dependent); CI fixtures pass.

中文:中文站第三轮——所有路由与所有用户可见界面文案均已提供中文版本。
新增 /zh/datasets 数据集页面树与全部隐藏路由(AI 图表、镜像、反馈、
agentic 追踪详情)的中文镜像;Y 轴指标名称(下拉选项、分组标题、图表
标题、坐标轴、悬浮提示)全链路本地化;图例开关(对数缩放、仅最优、
高对比度、渐变标签等)、搜索占位符、ATOM 脚注、评估"提示词"按钮与逐
样本抽屉全部翻译;AGENTS.md 规则升级为:所有用户可见文案与所有路由
(含隐藏路由)必须提供中文版本,仅机器订阅源、OG 图片与数据库内容除外。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@functionstackx functionstackx requested a review from adibarra as a code owner July 4, 2026 22:54
@vercel

vercel Bot commented Jul 4, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
inferencemax-app Ready Ready Preview, Comment Jul 4, 2026 11:17pm

Request Review

Comment thread packages/app/src/components/feedback-viewer/FeedbackViewer.tsx
…zh tree

Two locale drops flagged by Cursor: the request-timeline click-through
built /datasets/... conversation URLs and the feedback re-lock always
pushed /inference — both now prefix /zh when rendered on Chinese pages.

中文:修复 Cursor 指出的两处 /zh 前缀丢失——agentic 请求时间线点击跳转
的对话链接与反馈页重新上锁后的跳转现均保持在中文页面树内。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread packages/app/src/components/feedback-viewer/FeedbackViewer.tsx
The encrypted-rows banner and the decrypted row-count footer mixed
English counts with Chinese instructions on /zh/feedback; both now use
locale-aware template functions. Flagged by Cursor Bugbot.

中文:修复 /zh/feedback 中英文混排的记录计数文案——加密记录横幅与解密
行数统计现均使用中文模板。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Comment thread packages/app/src/components/inference/ui/ChartDisplay.tsx
…ading suffixes

The chart caption classified "input throughput" metrics by searching
the LOCALIZED metric title for the substring 'input', which never
matches the Chinese 输入 — zh pages showed the wrong "vs. …" suffix.
Classification now uses the English title; the vs-suffix strings
(TTFT, End-to-end Latency, derived x-modes, config fallbacks) are
localized. Flagged by Cursor Bugbot.

中文:修复图表标题后缀逻辑——输入类指标此前通过在本地化标题中查找英文
'input' 来识别,中文标题(输入)无法匹配导致后缀错误;现改用英文标题
判定,并将各 "vs. …" 后缀(TTFT、端到端延迟、派生 X 轴模式、配置回退
值)本地化为中文。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Document the review-merge loop: each push can surface new Bugbot
comments, so iterate until a push produces no new findings, and resolve
addressed threads (branch rules require thread resolution to merge).

中文:在 AGENTS.md 中说明 Cursor Bugbot 会在每次 push 后重新评审并可能
新增评论;合并前需循环处理直至不再出现新发现,并及时将已处理的评论
线程标记为已解决(分支规则要求全部线程解决后方可合并)。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 2 potential issues.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit fd51aa6. Configure here.

Comment thread packages/app/src/components/inference/ui/ChartDisplay.tsx Outdated
Comment thread packages/app/src/components/inference/ui/ChartControls.tsx
…axis placeholder

useChartData rewrites the chart heading with the selected percentile for
agentic sequences (e.g. "vs. P90 Interactivity"), which the previous
static zh lookup could not match — replace it with a pattern-based
translator. Also localize the Y-axis SearchableSelect placeholder that
still hardcoded English next to a localized label. Flagged by Cursor.

中文:useChartData 会将所选分位数写入图表标题(如 "vs. P90
Interactivity"),此前的静态中文映射无法匹配——改为基于模式的翻译函数;
同时修复 Y 轴下拉框占位符仍为英文的问题。

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@functionstackx functionstackx merged commit b85edca into master Jul 4, 2026
25 checks passed
@functionstackx functionstackx deleted the feat/zh-full-coverage branch July 4, 2026 23:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants