Skip to content

fix(i18n): add view form end_user_controls translations#2016

Merged
os-zhuang merged 2 commits into
mainfrom
fix/i18n-view-form-end-user-controls
Jun 18, 2026
Merged

fix(i18n): add view form end_user_controls translations#2016
os-zhuang merged 2 commits into
mainfrom
fix/i18n-view-form-end-user-controls

Conversation

@baozhoutao

Copy link
Copy Markdown
Contributor

Problem

In the view editor (`编辑视图`), the End-user controls section (ADR-0047, Airtable Interface parity) and its six fields rendered in English even under non-English locales (zh-CN / ja-JP / es-ES).

Root cause: the generated metadata-forms translation bundles were stale relative to `packages/spec/src/ui/view.form.ts`. The `end_user_controls` section and its fields (`userFilters`, `tabs`, `appearance`, `userActions`, `addRecord`, `showRecordCount`) had no entries under `metadataForms.view`, so the server-side localization (`rest-server.ts` → `translateMetadataDocument`) had nothing to apply and the form fell back to the raw English spec strings.

Fix

Add the missing `end_user_controls` section (label + description) and its six fields (label + helpText) to all four generated locale bundles:

  • `en.metadata-forms.generated.ts`
  • `zh-CN.metadata-forms.generated.ts`
  • `ja-JP.metadata-forms.generated.ts`
  • `es-ES.metadata-forms.generated.ts`

The `view` form's section/field key set now matches the spec exactly (verified by diffing section/field names in `view.form.ts` against the generated keys). These generated files are hand-editable per `metadata-translations/index.ts`.

Verification

  • `pnpm --filter @objectstack/platform-objects build` — success
  • `pnpm --filter @objectstack/platform-objects test` — 55 passed
  • view-form section/field keys in the en bundle now match `view.form.ts` 1:1

The view form's `end_user_controls` section (ADR-0047) and its six fields
(userFilters, tabs, appearance, userActions, addRecord, showRecordCount)
were missing from the generated metadata-forms translation bundles, so
they always fell back to English labels/helpText in the view editor even
under non-English locales.

Sync all four locale bundles (en, zh-CN, ja-JP, es-ES) with
packages/spec/src/ui/view.form.ts. The view form's section/field key set
now matches the spec exactly.
@vercel

vercel Bot commented Jun 18, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
spec Ready Ready Preview, Comment Jun 18, 2026 9:28am

Request Review

@github-actions

github-actions Bot commented Jun 18, 2026

Copy link
Copy Markdown
Contributor

📓 Docs Drift Check

This PR changes 1 package(s): @objectstack/platform-objects.

3 hand-written doc(s) reference the affected code and may need an implementation-accuracy re-verification:

  • content/docs/concepts/packages.mdx (via @objectstack/platform-objects)
  • content/docs/concepts/setup-app.mdx (via @objectstack/platform-objects)
  • content/docs/guides/packages.mdx (via @objectstack/platform-objects)

Advisory only. To re-verify, run the docs-accuracy-audit workflow scoped to these files:
node scripts/docs-audit/affected-docs.mjs origin/main → pass the list as args.docs.

@github-actions github-actions Bot added documentation Improvements or additions to documentation tooling labels Jun 18, 2026
@os-zhuang
os-zhuang merged commit 4331adb into main Jun 18, 2026
16 checks passed
@os-zhuang
os-zhuang deleted the fix/i18n-view-form-end-user-controls branch June 18, 2026 13:18
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 size/m tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants