You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(cli,spec): gate the whole declared surface for i18n; translate inline object actions (#3370) (#3753)
A zh-CN workspace localized the platform chrome but leaked English from
author-declared labels: the approval drawer rendered Approve / Reject /
Reassign beside the inbox's own 通过 / 拒绝. Two independent holes.
The lint gate could not see them. `os lint`'s coverage detector kept its own
walk of the metadata, separate from the walker `os i18n extract` uses to
scaffold bundles, and the two had drifted — coverage only walked the top-level
`actions` array, while `sys_approval_request` declares its decision actions
inline on the object. Those labels were extractable but ungated. Coverage now
derives its expected keys from `collectExpectedEntries()`, so the gated surface
and the scaffolded surface cannot disagree again. Newly gated: inline object
actions, action params and resultDialog copy, object-nested listViews, object
description, field help/placeholder, and apps/dashboards/pages. Extract output
is byte-identical against the committed plugin bundles.
It stays silent for projects that do not translate. `os lint`, `os i18n check`
and `os i18n extract` now read the stack's own `i18n.defaultLocale` /
`i18n.supportedLocales`, falling back to the locales a bundle already covers,
then to `en`. A project declaring neither is checked against its default locale
alone, which its inline labels already satisfy — zero issues. This also stops a
monolingual non-English project being told it owes `en` translations.
The server sent English regardless of locale. `translateObject` walked an
object's label/pluralLabel/description/fields but never its inline `actions`,
so the meta endpoint returned the authored literals even though
plugin-approvals ships `_actions` translations for all eight decision actions.
The Console compensated client-side; every other consumer rendered the source
language. Inline actions now run through `translateAction`.
Adds `os i18n extract --no-metadata-forms` so a package that owns only its own
objects stops being asked to commit the registry-driven Studio baseline, which
exactly one package should carry. Defaults to on: deriving it from
`--objects-only` instead took `pnpm check:i18n` from 8 bundles to 4 while still
reporting green, so the emit set is now pinned to the flags by a test.
Follow-up filed as #3762: platform-objects declares 55 inline actions across 12
objects with no objects translation bundle at all.
'Also write <locale>.metadata-forms.generated.ts for the Studio metadata-form baseline (default). Pass --no-metadata-forms in a package that owns only its own objects — that baseline belongs to one package, not every plugin.',
87
+
default: true,
88
+
allowNo: true,
89
+
}),
84
90
'dry-run': Flags.boolean({
85
91
description: 'Print to stdout instead of writing to --out',
0 commit comments