Skip to content

fix(views): zh-CN Leads and Opportunities column headers follow the field labels - #2098

Merged
objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-2094-zh-cn-list-column-labels
Oct 14, 2026
Merged

objectstack-fleet[bot] merged 2 commits into
mainfrom
claude/issue-2094-zh-cn-list-column-labels

Conversation

@objectstack-fleet

Copy link
Copy Markdown
Contributor

Fixes #2094
Clause-②: no

What changed

The All Leads list (src/sales/views/lead.view.ts) gave all nine of its columns their own English label:. Both Opportunities grids (src/sales/views/opportunity.view.ts, Open Deals and All Opportunities) did the same for the Account column. A column label: is the spec's "Display label override", and the renderer serves it verbatim in every locale. The translation schema has no per-column key, so nothing could translate these headers. This PR removes all 11 overrides. Each header is now the field's label, which all four locale packs already translate. The other lists already work this way.

The 11 overrides removed here were the only column-level label:s in the app. An enumeration over the four views barrels finds 11 before this change and 0 after.

content/docs/sales/leads{,.zh-Hans,.zh-Hant}.mdx said the list views show the rating in a Score column. Without the override, every list shows the field label (Lead Score, zh-CN 线索评分), so those three sentences now say that. This is the only doc text the change made false.

Per column (measured, sales.manager, console on this branch)

object.field en before (column label:) en after (= field label) zh-CN before zh-CN after
crm_lead.full_name Name Full Name Name 全名
crm_lead.company Company Company Company 公司
crm_lead.email Email Email Email 邮箱
crm_lead.status Status Status Status 状态
crm_lead.rating Score Lead Score Score 线索评分
crm_lead.lead_source Source Lead Source Source 线索来源
crm_lead.need_type Need Type Need Type Need Type 需求类型
crm_lead.estimated_amount Est. Amount Estimated Amount Est. Amount 预计金额
crm_lead.owner_id Owner Lead Owner Owner 线索负责人
crm_opportunity.crm_account (×2 grids) Account Account Account 所属客户

Five en headers are unchanged. Five (bold) now read exactly the field label. That is the acceptance's second branch: "measured equal to the field labels". crm_lead.status is Lead Status on the object, but the en pack carries Status, and the console serves the pack's value. So that en header does not change.

No column needed a wording its field label cannot carry. Est. Amount was the candidate. At the authored 130 px, the grid widens the column to 144 px to fit Estimated Amount. A DOM probe found no header text clipped (scrollWidth == clientWidth on every header's text element) in en-US, es-ES or zh-CN. So no field label moves, no width changes, and no platform gap blocks this card.

Measurement (DOM probe, header textContent, Playwright + /opt/pw-browsers/chromium)

Before (2f3d898d), zh-CN:

  • All Leads: Name · Company · Email · Status · Score · Source · Need Type · Est. Amount · Owner
  • Open Deals: 商机名称 · Account · 阶段 · 金额 · 成交概率 (%) · 预期收入 · 预计成交日期
  • All Opportunities: 商机名称 · Account · 阶段 · … · 商机负责人

After (bd4f2204), zh-CN:

  • All Leads: 全名 · 公司 · 邮箱 · 状态 · 线索评分 · 线索来源 · 需求类型 · 预计金额 · 线索负责人
  • Open Deals: 商机名称 · 所属客户 · 阶段 · 金额 · 成交概率 (%) · 预期收入 · 预计成交日期
  • All Opportunities: 商机名称 · 所属客户 · 阶段 · … · 商机负责人

After, the other packs:

  • es-ES All Leads: Nombre Completo · Empresa · Correo Electrónico · Estado · Puntuación de Prospecto · Origen del Prospecto · Tipo de Necesidad · Importe Estimado · Propietario
  • ja-JP All Leads: 氏名 · 会社名 · メール · ステータス · リードスコア · リードソース · ニーズ種別 · 予想金額 · リード所有者
  • Account column: es-ES reads Cuenta and ja-JP reads 取引先.

The card's mechanism, re-measured

  • H1 holds. A column with no label: renders its field's translated label. On the same Opportunities grids, before this change, stage / amount / close_date (no override) already read 阶段 / 金额 / 预计成交日期 next to the English Account. objectui's plugin-grid ObjectGrid.tsx picks the authored label first, and uses the translated field label only when there is none.
  • H2 holds on the installed @objectstack/spec 18.0.0-next.0. In dist/translation.zod-CQy34Ce1.d.ts, the _views record value is a strict object of label, description, emptyState and bulkActions, with no column slot. objectstack main b5b1bf72 is the same.
  • The spec's other label form does not help here either. I18nLabelSchema also authorizes an inline locale map. As a one-off experiment, I gave the Est. Amount column the label { en: 'MAPEN Est', 'zh-CN': 'MAPZH 预计' } and rebuilt. The marker reached dist/objectstack.json (1 hit). The header still read the field label: 预计金额 in zh-CN and Estimated Amount in en. I restored the file from HEAD and proved the restore with git diff HEAD empty and the blob hash equal to HEAD's (2493440a). This is reported for the seat to file upstream, and it does not block this card.

Verification (head a16ea2ae)

  • pnpm validate: ✓ Validation passed. os-verify-lock reports VERDICT command-exit 0.
  • pnpm typecheck: exit 0.
  • pnpm lint: exit 0, with 18 suggestion(s).
  • pnpm lint:i18n-gate: ✓ i18n lint gate: 0 i18n/missing-* issues.
  • pnpm hygiene: ✓ source hygiene clean.
  • pnpm hygiene:tokens: ✓ source token ratchet clean. The src/sales interaction layer went from ~28,377 to ~28,311 tokens, and the authored total from ~102,599 to ~102,532.
  • pnpm build: ✓ Build complete. os-verify-lock reports VERDICT command-exit 0.
  • pnpm test: Test Files 179 passed (179), Tests 3659 passed | 1 skipped (3660). os-verify-lock reports VERDICT command-exit 0.

Playwright e2e is left to CI.

Acceptance notes (observed, not filed)

  • The en pack's crm_lead.fields.status.label is Status, while lead.object.ts says Lead Status. The console serves the pack's value. This was already true before this PR.
  • content/docs/sales/pipeline-management.mdx L49 says All Opportunities "carries an Owner column". That column never had an override, and its header reads Opportunity Owner in en. This was already true before this PR.
  • os lint's i18n coverage says nothing about a plain-string column label: that has no translation slot. lint:i18n-gate read 0 on main with all 11 overrides present. A rule for that would be a new gate, so it is recorded here and not filed.

Generated by Claude Code

…umns

The All Leads list gave each of its nine columns its own English `label:`,
and both Opportunities grids did the same for the Account column. A column
label is served verbatim in every locale (the translation schema has no
per-column key), so zh-CN showed those headers in English. Without the
override the header is the field label, which all four locale packs carry.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P8mZuzuyZAHSrgQKmv6ASv
… changeset

The lead scoring section said the list views show the rating in a *Score*
column. With the All Leads override gone, every list shows the field label,
Lead Score (zh-CN 线索评分), so the three locale pages say that.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P8mZuzuyZAHSrgQKmv6ASv
@vercel

vercel Bot commented Oct 14, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated
hotcrm Ignored Ignored Oct 14, 2026 8:12am UTC

Request Review

@github-actions github-actions Bot added documentation Improvements or additions to documentation metadata Declarative metadata — schema, security posture, UI surfaces labels Oct 14, 2026
@objectstack-fleet
objectstack-fleet Bot marked this pull request as ready for review October 14, 2026 08:25
@objectstack-fleet
objectstack-fleet Bot added this pull request to the merge queue Oct 14, 2026
Merged via the queue into main with commit e094ec7 Oct 14, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation metadata Declarative metadata — schema, security posture, UI surfaces

Projects

None yet

2 participants