Skip to content

i18n: extract + gate declared action/UI labels (they leak English in a zh-CN workspace) #3370

Description

@os-zhuang

Problem

In a zh-CN workspace, the platform chrome is localized (审批中心, 待审批, 全部标记为已读, toasts…), but author/plugin-declared metadata labels leak English:

  • The sys_approval_request decision actions render Approve / Reject / Reassign / Send back / Request info in the drawer's DeclaredActionsBar, right next to the inbox's own localized 通过 / 拒绝 buttons — mixed and inconsistent within one screen.
  • Some field labels surface raw (e.g. Owner Id on the record card).

Found in the #3358 sweep (§7 i18n). The Console renders a declared action's label verbatim, so an un-translated declared label shows in the source language regardless of the viewer's locale.

Ask — extend i18n coverage + a gate to declared labels

  • os i18n extract covers declared action labels (and other declared UI-facing strings not currently extracted), so they land in the translation bundles.
  • Ship translation bundles for platform/plugin-declared actions — starting with the @objectstack/plugin-approvals decision actions (approval_approve / approval_reject / approval_reassign / /revise / request-info / remind / recall / resubmit).
  • A lint check (natural extension of os lint i18n / --include-platform) that flags a declared action/label string with no translation in a configured target locale — so this can't regress silently.

Why

"Declared metadata is localizable" should hold for the whole declared surface, not just object/field labels. Closes the mixed-language experience and makes it a build-time signal.

Refs: #3358 (sweep, §7 · #3347 covered action result-dialog copy but not action labels). Console symptom tracked in objectstack-ai/objectui#2762.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions