Skip to content

fix(frontend): interpolate the loaded-record count in the node session panel - #235

Merged
EricWvi merged 1 commit into
ora-space:mainfrom
Zpc001:fix/805-session-records-count
Oct 30, 2026
Merged

EricWvi merged 1 commit into
ora-space:mainfrom
Zpc001:fix/805-session-records-count

Conversation

@Zpc001

@Zpc001 Zpc001 commented Oct 30, 2026

Copy link
Copy Markdown
Contributor

Summary

节点详情「会话」区底部的计数文案一直显示未插值的占位符 {{records}}(中英文都是)。文案用的是 {{records}},调用处传的是 count(run-node-session.tsx:149),i18next 找不到 records,就把占位符原样输出。

本 PR 把中英文两条文案的 {{records}} 改成 i18next 内置的 {{count}},调用处不动;与仓库里其他计数文案(如 history-translations.ts)保持一致。

Evidence

  • Before: 中文「已加载 {{records}} 条记录」,英文「{{records}} records loaded」。
    After: 中文「已加载 5 条记录」,英文「5 records loaded」。
  • run-node-session.test.tsx 新增中英文两条用例,断言插值后的完整文本,并断言区域内不再出现 {{。
  • 反向验证:把文案改回 {{records}},两条用例失败;把调用处改成 { records: … },两条用例同样失败(验证后均已恢复)。
  • task frontend:check 通过(格式、lint、类型、测试、模块检查、死代码、重复、构建)。

ADR

不涉及 ADR。

Refs ora-space/circus#805

🤖 Generated with Claude Code

…n panel

The copy asked for {{records}} while the caller passed count, so i18next
left the placeholder unresolved in both locales. Use the count variable
the call site already provides and assert the interpolated text in the
component test for zh-CN and en-US.

Co-Authored-By: Claude Code <noreply@anthropic.com>
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