Skip to content

List-view tab labels have no translation surface — 59 hardcoded English labels render untranslated in every non-en locale #661

Description

@yinlianghui

Found while scoping the zh-CN work in #645. Not covered by #494 or #645 — different root cause, and it is not fixable in this repo.

What happens

Every list view declares a tab strip, and each tab carries an inline English label:

// src/views/account.view.ts:88-94
tabs: [
  { name: 'all',        label: 'All',         view: 'all_accounts', isDefault: true, pinned: true },
  { name: 'cards',      label: 'Cards',       icon: 'gallery-thumbnails', view: 'account_gallery' },
  { name: 'map',        label: 'Map',         icon: 'map',   view: 'account_map' },
  { name: 'enterprise', label: 'Enterprise',  icon: 'crown', view: 'enterprise_accounts' },
  { name: 'mine',       label: 'My Accounts', icon: 'user',  view: 'my_accounts' },
  { name: 'renewals',   label: 'Renewals',    icon: 'refresh-cw',     view: 'renewals_due' },
  { name: 'at_risk',    label: 'At Risk',     icon: 'triangle-alert', view: 'at_risk_accounts' },
],

59 such labels across all 15 objects. They sit at the top of every list page — the first thing a user sees on entering any object — and they render in English regardless of locale.

This is more visible than the picklist gaps in #645: a Chinese user gets a fully translated sidebar, fully translated column headers, and an English tab strip between them.

Why this repo cannot fix it

There is no translation key for a tab. Verified against @objectstack/spec@17.0.0-rc.1:

  • ObjectTranslationDataSchema (dist/translation.zod-CLbo6zbE.d.ts:60-101) carries exactly label, pluralLabel, description, fields, _views, _actions, _sections. There is no _tabs.
  • @objectstack/lint — the tool that produces the i18n warnings — has handling for _views, _sections, _actions and navigation, and zero references to tabs. So these 59 labels are not merely untranslated; they are not counted as translatable, which is why they never appeared in i18n: 205 warnings hidden by --skip-i18n; broken option keys and untranslated navigation #494's 205-warning survey.

Adding a _tabs block to src/translations/*.ts would be stripped by z.core.$strip and silently do nothing.

Possible resolutions

Listing these for whoever takes it upstream — I have not verified which the console actually implements.

  1. Tab inherits its view's label. tabs[].label is already optional in the schema, and every tab here carries view: '<view_name>' pointing at a view whose label is translatable via _views. If the console falls back to the referenced view's resolved label when label is absent, this repo can fix it today by deleting all 59 inline labels — no upstream change needed. This should be checked first, since it would turn an upstream request into a one-PR app-side fix. Note the fallback would change some display text (All全部客户, Map客户地图), which may be desirable anyway.
  2. Add _tabs to ObjectTranslationDataSchema, keyed by tabs[].name, mirroring _views. Correct but needs a spec change plus console resolver support.
  3. Leave tab labels English by design and document it. Not viable for a localized product.

Priority note

Filed prio:p1 because of the Simplified Chinese customer trial: zh-CN is otherwise the most complete locale (32/32 navigation nodes, and after #660 the only locale with complete select-option coverage), so the English tab strip is now the most visible remaining i18n defect on a Chinese screen. Downgrade if the trial timeline says otherwise.

Full inventory

src/views/account.view.ts:88-94, campaign.view.ts:36-39, case.view.ts:50-56, contact.view.ts:38-40, contract.view.ts:38-41, forecast.view.ts:41-43, knowledge_article.view.ts:43-…, plus the remaining object view files — 59 labels total (grep -rn "tabs:" -A12 src/views/*.ts | grep -c "label: '").

Related: #494 (i18n umbrella), #645 (select option labels), #660 (zh-CN select options).

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingmetadataDeclarative metadata — schema, security posture, UI surfacesprio:p1Next in line once P0s clearupstream:objectstackBlocked on / caused by the ObjectStack platform — tracked upstream

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions