ObjectStackObjectStack

Translation

Translation protocol schemas

Source: packages/spec/src/system/translation.zod.ts

TypeScript Usage

import { ActionResultDialogTranslationSchema, CoverageBreakdownEntrySchema, FieldTranslationSchema, LocaleSchema, ObjectTranslationDataSchema, TranslationBundleSchema, TranslationConfigSchema, TranslationCoverageResultSchema, TranslationDataSchema, TranslationDiffItemSchema, TranslationDiffStatusSchema, TranslationItemSchema } from '@objectstack/spec/system';
import type { ActionResultDialogTranslation, CoverageBreakdownEntry, FieldTranslation, Locale, ObjectTranslationData, TranslationBundle, TranslationConfig, TranslationCoverageResult, TranslationData, TranslationDiffItem, TranslationDiffStatus, TranslationItem } from '@objectstack/spec/system';

// Validate data
const result = ActionResultDialogTranslationSchema.parse(data);

ActionResultDialogTranslation

Translations for an action result dialog

Properties

PropertyTypeRequiredDescription
titlestringoptionalTranslated result dialog title
descriptionstringoptionalTranslated result dialog description
acknowledgestringoptionalTranslated acknowledge button label
fieldsRecord<string, string>optionalResult field labels keyed by the literal field path declared in the action metadata (keys may contain dots)

CoverageBreakdownEntry

Coverage breakdown for a single translation group

Properties

PropertyTypeRequiredDescription
groupstringTranslation group category
totalKeysintegerTotal keys in this group
translatedKeysintegerTranslated keys in this group
coveragePercentnumberCoverage percentage for this group

FieldTranslation

Translation data for a single field

Properties

PropertyTypeRequiredDescription
labelstringoptionalTranslated field label
helpstringoptionalTranslated help text
placeholderstringoptionalTranslated placeholder text for form inputs
optionsRecord<string, string>optionalOption value to translated label map

Locale

BCP-47 Language Tag (e.g. en-US, zh-CN)

Type: string


ObjectTranslationData

Translation data for a single object

Properties

PropertyTypeRequiredDescription
labelstringoptionalTranslated singular label
pluralLabelstringoptionalTranslated plural label
descriptionstringoptionalTranslated object description
fieldsRecord<string, { label?: string; help?: string; placeholder?: string; options?: Record<string, string> }>optionalField-level translations
_viewsRecord<string, { label?: string; description?: string; emptyState?: object }>optionalView translations keyed by view name
_actionsRecord<string, { label?: string; description?: string; confirmText?: string; successMessage?: string; … }>optionalAction translations keyed by action name
_sectionsRecord<string, { label?: string; description?: string }>optionalSection translations keyed by section name
_tabsRecord<string, { label?: string }>optionalFilter-preset tab translations keyed by tab name

Nested Shape: ObjectTranslationData.fields[string]

Translation data for a single field

PropertyTypeRequiredDescription
labelstringoptionalTranslated field label
helpstringoptionalTranslated help text
placeholderstringoptionalTranslated placeholder text for form inputs
optionsRecord<string, string>optionalOption value to translated label map

Nested Shape: ObjectTranslationData._views[string]

PropertyTypeRequiredDescription
labelstringoptionalTranslated view label
descriptionstringoptionalTranslated view description
emptyState{ title?: string; message?: string }optionalTranslated empty-state copy shown when the view has no rows

Nested Shape: ObjectTranslationData._actions[string]

PropertyTypeRequiredDescription
labelstringoptionalTranslated action label
descriptionstringoptionalTranslated action description — the explanatory line under the title in the action's param dialog
confirmTextstringoptionalTranslated confirmation prompt
successMessagestringoptionalTranslated success toast/message
paramsRecord<string, { label?: string; helpText?: string; placeholder?: string; options?: Record<string, string> }>optionalAction parameter translations keyed by parameter name
resultDialog{ title?: string; description?: string; acknowledge?: string; fields?: Record<string, string> }optionalTranslations for the action result dialog

Nested Shape: ObjectTranslationData._sections[string]

PropertyTypeRequiredDescription
labelstringoptionalTranslated section label
descriptionstringoptionalTranslated section description

Nested Shape: ObjectTranslationData._tabs[string]

PropertyTypeRequiredDescription
labelstringoptionalTranslated tab label

TranslationBundle

Map of locale codes to translation data

Type: Record<string, { objects?: Record<string, object>; apps?: Record<string, object>; messages?: Record<string, string>; globalActions?: Record<string, object>; … }>


TranslationConfig

Internationalization configuration

Properties

PropertyTypeRequiredDescription
defaultLocalestringDefault locale (e.g., "en")
supportedLocalesstring[]Supported BCP-47 locale codes
fallbackLocalestringoptionalFallback locale code

TranslationCoverageResult

Aggregated translation coverage result

Properties

PropertyTypeRequiredDescription
localestringBCP-47 locale code
objectNamestringoptionalObject name scope (omit for full bundle)
totalKeysintegerTotal translatable keys from metadata
translatedKeysintegerNumber of translated keys
missingKeysintegerNumber of missing translations
redundantKeysintegerNumber of redundant translations
staleKeysintegerNumber of stale translations
coveragePercentnumberTranslation coverage percentage
items{ key: string; status: Enum<'missing' | 'redundant' | 'stale'>; objectName?: string; locale: string; … }[]Detailed diff items
breakdown{ group: string; totalKeys: integer; translatedKeys: integer; coveragePercent: number }[]optionalPer-group coverage breakdown

Nested Shape: TranslationCoverageResult.items[number]

A single translation diff item

PropertyTypeRequiredDescription
keystringDot-path translation key
statusEnum<'missing' | 'redundant' | 'stale'>Diff status of this translation key
objectNamestringoptionalAssociated object name (snake_case)
localestringBCP-47 locale code
sourceHashstringoptionalHash of source metadata for precise stale detection
aiSuggestedstringoptionalAI-suggested translation for this key
aiConfidencenumberoptionalAI suggestion confidence score (0–1)

Nested Shape: TranslationCoverageResult.breakdown[number]

Coverage breakdown for a single translation group

PropertyTypeRequiredDescription
groupstringTranslation group category
totalKeysintegerTotal keys in this group
translatedKeysintegerTranslated keys in this group
coveragePercentnumberCoverage percentage for this group

TranslationData

Translation data for objects, apps, and UI messages

Properties

PropertyTypeRequiredDescription
objectsRecord<string, { label?: string; pluralLabel?: string; description?: string; fields?: Record<string, object>; … }>optionalObject translations keyed by object name
appsRecord<string, { label: string; description?: string; navigation?: Record<string, object> }>optionalApp translations keyed by app name
messagesRecord<string, string>optionalUI message translations keyed by message ID
globalActionsRecord<string, { label?: string; description?: string; confirmText?: string; successMessage?: string; … }>optionalGlobal action translations keyed by action name
dashboardsRecord<string, { label?: string; description?: string; actions?: Record<string, object>; widgets?: Record<string, object> }>optionalDashboard translations keyed by dashboard name
pagesRecord<string, { label?: string; description?: string; title?: string; subtitle?: string; … }>optionalPage translations keyed by page name
flowsRecord<string, { label?: string; screens?: Record<string, object> }>optionalScreen-flow translations keyed by flow name
settingsRecord<string, { title?: string; description?: string; groups?: Record<string, object>; keys?: Record<string, object>; … }>optionalSettings manifest translations keyed by namespace
metadataFormsRecord<string, { label?: string; description?: string; sections?: Record<string, object>; fields?: Record<string, object> }>optionalTranslations for metadata-type configuration forms keyed by metadata type
settingsCommon{ sourceLabels?: object }optionalCross-namespace Settings UI strings

Nested Shape: TranslationData.objects[string]

Translation data for a single object

PropertyTypeRequiredDescription
labelstringoptionalTranslated singular label
pluralLabelstringoptionalTranslated plural label
descriptionstringoptionalTranslated object description
fieldsRecord<string, { label?: string; help?: string; placeholder?: string; options?: Record<string, string> }>optionalField-level translations
_viewsRecord<string, { label?: string; description?: string; emptyState?: object }>optionalView translations keyed by view name
_actionsRecord<string, { label?: string; description?: string; confirmText?: string; successMessage?: string; … }>optionalAction translations keyed by action name
_sectionsRecord<string, { label?: string; description?: string }>optionalSection translations keyed by section name
_tabsRecord<string, { label?: string }>optionalFilter-preset tab translations keyed by tab name

Nested Shape: TranslationData.apps[string]

PropertyTypeRequiredDescription
labelstringTranslated app label
descriptionstringoptionalTranslated app description
navigationRecord<string, { label: string }>optionalNavigation group translations keyed by group ID

Nested Shape: TranslationData.globalActions[string]

PropertyTypeRequiredDescription
labelstringoptionalTranslated action label
descriptionstringoptionalTranslated action description — the explanatory line under the title in the action's param dialog
confirmTextstringoptionalTranslated confirmation prompt
successMessagestringoptionalTranslated success toast/message
paramsRecord<string, { label?: string; helpText?: string; placeholder?: string; options?: Record<string, string> }>optionalAction parameter translations keyed by parameter name
resultDialog{ title?: string; description?: string; acknowledge?: string; fields?: Record<string, string> }optionalTranslations for the action result dialog

Nested Shape: TranslationData.dashboards[string]

PropertyTypeRequiredDescription
labelstringoptionalTranslated dashboard title
descriptionstringoptionalTranslated dashboard description
actionsRecord<string, { label?: string }>optionalHeader action label translations keyed by action url/key
widgetsRecord<string, { title?: string; description?: string; subCaption?: string }>optionalWidget translations keyed by widget id

Nested Shape: TranslationData.pages[string]

PropertyTypeRequiredDescription
labelstringoptionalTranslated page label (nav / breadcrumb)
descriptionstringoptionalTranslated page description
titlestringoptionalTranslated page:header title (defaults to label)
subtitlestringoptionalTranslated page:header subtitle
componentsRecord<string, { title?: string; description?: string; label?: string; placeholder?: string; … }>optionalPer-component copy keyed by component id (PageComponentSchema.id)

Nested Shape: TranslationData.flows[string]

PropertyTypeRequiredDescription
labelstringoptionalTranslated flow label
screensRecord<string, { title?: string; fields?: Record<string, object> }>optionalScreen translations keyed by screen node id (FlowNode.id, the client's ScreenSpec.nodeId)

Nested Shape: TranslationData.settings[string]

PropertyTypeRequiredDescription
titlestringoptionalTranslated settings manifest title
descriptionstringoptionalTranslated settings manifest description
groupsRecord<string, { title?: string; description?: string }>optionalGroup translations keyed by group key
keysRecord<string, { label?: string; help?: string; placeholder?: string; options?: Record<string, string> }>optionalPer-setting field translations keyed by setting key
actionsRecord<string, { label?: string; confirmText?: string; successMessage?: string }>optionalAction button translations keyed by action id

Nested Shape: TranslationData.metadataForms[string]

PropertyTypeRequiredDescription
labelstringoptionalTranslated metadata-type display label (overrides registry label)
descriptionstringoptionalTranslated metadata-type description
sectionsRecord<string, { label?: string; description?: string }>optionalSection translations keyed by section.name
fieldsRecord<string, { label?: string; helpText?: string; placeholder?: string }>optionalField translations keyed by field path (dot-notation for nested fields)

Nested Shape: TranslationData.settingsCommon

PropertyTypeRequiredDescription
sourceLabels{ env?: string; global?: string; tenant?: string; user?: string; … }optionalSource badge labels by resolution layer

TranslationDiffItem

A single translation diff item

Properties

PropertyTypeRequiredDescription
keystringDot-path translation key
statusEnum<'missing' | 'redundant' | 'stale'>Diff status of this translation key
objectNamestringoptionalAssociated object name (snake_case)
localestringBCP-47 locale code
sourceHashstringoptionalHash of source metadata for precise stale detection
aiSuggestedstringoptionalAI-suggested translation for this key
aiConfidencenumberoptionalAI suggestion confidence score (0–1)

TranslationDiffStatus

Translation diff status: missing from bundle, redundant (no matching metadata), or stale (metadata changed)

Allowed Values

  • missing
  • redundant
  • stale

TranslationItem

One locale of translations — the translation metadata type

Properties

PropertyTypeRequiredDescription
objectsRecord<string, { label?: string; pluralLabel?: string; description?: string; fields?: Record<string, object>; … }>optionalObject translations keyed by object name
appsRecord<string, { label: string; description?: string; navigation?: Record<string, object> }>optionalApp translations keyed by app name
messagesRecord<string, string>optionalUI message translations keyed by message ID
globalActionsRecord<string, { label?: string; description?: string; confirmText?: string; successMessage?: string; … }>optionalGlobal action translations keyed by action name
dashboardsRecord<string, { label?: string; description?: string; actions?: Record<string, object>; widgets?: Record<string, object> }>optionalDashboard translations keyed by dashboard name
pagesRecord<string, { label?: string; description?: string; title?: string; subtitle?: string; … }>optionalPage translations keyed by page name
flowsRecord<string, { label?: string; screens?: Record<string, object> }>optionalScreen-flow translations keyed by flow name
settingsRecord<string, { title?: string; description?: string; groups?: Record<string, object>; keys?: Record<string, object>; … }>optionalSettings manifest translations keyed by namespace
metadataFormsRecord<string, { label?: string; description?: string; sections?: Record<string, object>; fields?: Record<string, object> }>optionalTranslations for metadata-type configuration forms keyed by metadata type
settingsCommon{ sourceLabels?: object }optionalCross-namespace Settings UI strings
localestringBCP-47 locale this item translates (e.g. "zh-CN")
namestringoptionalItem name — conventionally the locale code (zh-CN); the runtime sync falls back to it when locale is absent
labelstringoptionalHuman-readable label shown in metadata lists
_lockEnum<'none' | 'no-overlay' | 'no-delete' | 'full'>optionalItem-level lock — controls overlay & delete (ADR-0010).
_lockReasonstringoptionalHuman-readable reason shown when a write is refused by _lock.
_lockSourceEnum<'artifact' | 'package' | 'env-forced'>optionalLayer that set _lock (artifact | package | env-forced).
_provenanceEnum<'package' | 'org' | 'env-forced'>optionalOrigin of the item (package | org | env-forced).
_packageIdstringoptionalOwning package machine id.
_packageVersionstringoptionalOwning package version.
_lockDocsUrlstringoptionalOptional documentation link surfaced next to _lockReason.

Nested Shape: TranslationItem.objects[string]

Translation data for a single object

PropertyTypeRequiredDescription
labelstringoptionalTranslated singular label
pluralLabelstringoptionalTranslated plural label
descriptionstringoptionalTranslated object description
fieldsRecord<string, { label?: string; help?: string; placeholder?: string; options?: Record<string, string> }>optionalField-level translations
_viewsRecord<string, { label?: string; description?: string; emptyState?: object }>optionalView translations keyed by view name
_actionsRecord<string, { label?: string; description?: string; confirmText?: string; successMessage?: string; … }>optionalAction translations keyed by action name
_sectionsRecord<string, { label?: string; description?: string }>optionalSection translations keyed by section name
_tabsRecord<string, { label?: string }>optionalFilter-preset tab translations keyed by tab name

Nested Shape: TranslationItem.apps[string]

PropertyTypeRequiredDescription
labelstringTranslated app label
descriptionstringoptionalTranslated app description
navigationRecord<string, { label: string }>optionalNavigation group translations keyed by group ID

Nested Shape: TranslationItem.globalActions[string]

PropertyTypeRequiredDescription
labelstringoptionalTranslated action label
descriptionstringoptionalTranslated action description — the explanatory line under the title in the action's param dialog
confirmTextstringoptionalTranslated confirmation prompt
successMessagestringoptionalTranslated success toast/message
paramsRecord<string, { label?: string; helpText?: string; placeholder?: string; options?: Record<string, string> }>optionalAction parameter translations keyed by parameter name
resultDialog{ title?: string; description?: string; acknowledge?: string; fields?: Record<string, string> }optionalTranslations for the action result dialog

Nested Shape: TranslationItem.dashboards[string]

PropertyTypeRequiredDescription
labelstringoptionalTranslated dashboard title
descriptionstringoptionalTranslated dashboard description
actionsRecord<string, { label?: string }>optionalHeader action label translations keyed by action url/key
widgetsRecord<string, { title?: string; description?: string; subCaption?: string }>optionalWidget translations keyed by widget id

Nested Shape: TranslationItem.pages[string]

PropertyTypeRequiredDescription
labelstringoptionalTranslated page label (nav / breadcrumb)
descriptionstringoptionalTranslated page description
titlestringoptionalTranslated page:header title (defaults to label)
subtitlestringoptionalTranslated page:header subtitle
componentsRecord<string, { title?: string; description?: string; label?: string; placeholder?: string; … }>optionalPer-component copy keyed by component id (PageComponentSchema.id)

Nested Shape: TranslationItem.flows[string]

PropertyTypeRequiredDescription
labelstringoptionalTranslated flow label
screensRecord<string, { title?: string; fields?: Record<string, object> }>optionalScreen translations keyed by screen node id (FlowNode.id, the client's ScreenSpec.nodeId)

Nested Shape: TranslationItem.settings[string]

PropertyTypeRequiredDescription
titlestringoptionalTranslated settings manifest title
descriptionstringoptionalTranslated settings manifest description
groupsRecord<string, { title?: string; description?: string }>optionalGroup translations keyed by group key
keysRecord<string, { label?: string; help?: string; placeholder?: string; options?: Record<string, string> }>optionalPer-setting field translations keyed by setting key
actionsRecord<string, { label?: string; confirmText?: string; successMessage?: string }>optionalAction button translations keyed by action id

Nested Shape: TranslationItem.metadataForms[string]

PropertyTypeRequiredDescription
labelstringoptionalTranslated metadata-type display label (overrides registry label)
descriptionstringoptionalTranslated metadata-type description
sectionsRecord<string, { label?: string; description?: string }>optionalSection translations keyed by section.name
fieldsRecord<string, { label?: string; helpText?: string; placeholder?: string }>optionalField translations keyed by field path (dot-notation for nested fields)

Nested Shape: TranslationItem.settingsCommon

PropertyTypeRequiredDescription
sourceLabels{ env?: string; global?: string; tenant?: string; user?: string; … }optionalSource badge labels by resolution layer

On this page

TypeScript UsageActionResultDialogTranslationPropertiesCoverageBreakdownEntryPropertiesFieldTranslationPropertiesLocaleObjectTranslationDataPropertiesNested Shape: ObjectTranslationData.fields[string]Nested Shape: ObjectTranslationData._views[string]Nested Shape: ObjectTranslationData._actions[string]Nested Shape: ObjectTranslationData._sections[string]Nested Shape: ObjectTranslationData._tabs[string]TranslationBundleTranslationConfigPropertiesTranslationCoverageResultPropertiesNested Shape: TranslationCoverageResult.items[number]Nested Shape: TranslationCoverageResult.breakdown[number]TranslationDataPropertiesNested Shape: TranslationData.objects[string]Nested Shape: TranslationData.apps[string]Nested Shape: TranslationData.globalActions[string]Nested Shape: TranslationData.dashboards[string]Nested Shape: TranslationData.pages[string]Nested Shape: TranslationData.flows[string]Nested Shape: TranslationData.settings[string]Nested Shape: TranslationData.metadataForms[string]Nested Shape: TranslationData.settingsCommonTranslationDiffItemPropertiesTranslationDiffStatusAllowed ValuesTranslationItemPropertiesNested Shape: TranslationItem.objects[string]Nested Shape: TranslationItem.apps[string]Nested Shape: TranslationItem.globalActions[string]Nested Shape: TranslationItem.dashboards[string]Nested Shape: TranslationItem.pages[string]Nested Shape: TranslationItem.flows[string]Nested Shape: TranslationItem.settings[string]Nested Shape: TranslationItem.metadataForms[string]Nested Shape: TranslationItem.settingsCommon