Skip to content

i18n: three authored display surfaces have no bundle key at all (bulk-action defs, custom validation messages, dataset labels) #14253

Description

@os-warren

Measured on @objectstack/spec / @objectstack/objectql / @objectstack/rest 17.2.0, while giving an application (objectstack-ai/duly) a complete zh-CN bundle.

Note: key placeholders below are written OBJECT / VIEW / ACTION / RULE / NAME rather than in angle brackets — GitHub's body sanitizer strips <a>-shaped fragments, which silently ate them on the first revision of this issue.

TranslationDataSchema addresses objects, fields, field options, views, sections, actions, action params, apps, navigation, dashboards, widgets, pages, flows (label + screens), settings and messages. TRANSLATABLE_METADATA_TYPES is { view, action, object, app, dashboard, page }.

Three surfaces carry authored, user-facing display text that no key in that schema can reach. Each renders in the source locale inside a fully translated screen — which is the bad failure mode, because it reads as a styling quirk rather than a missing translation.

1. bulkActionDefs on a list view

ListViewSchema.bulkActionDefs[] carries label, confirmText, confirmLabel and params[].label / .placeholder / .help. A bulk-action def is not an action document, so it never reaches translateAction, and no bundle group addresses it.

Measured in a browser, Accept-Language: zh-CN, against a fully translated app — the selection bar reads:

已选择 1 项 · Complete · Skip · 清除

Two English words between two Chinese ones. Screenshot: https://raw.githubusercontent.com/objectstack-ai/duly/claude/issue-18-screenshots/shots/bulk-toolbar-english.png

The workaround (bulkActions: ['some_row_action'], promoting row actions, which are translated) is not equivalent: it is N elevated action dispatches instead of one data-plane updateMany.

Suggested shape: objects.OBJECT._views.VIEW.bulkActions.NAME.{label,confirmText,confirmLabel,params.PARAM.{label,placeholder,help}}, resolved in translateView.

2. A custom validation rule's message

objectql emits an authored rule message verbatim — { field, code: 'rule_violation', message: rule.message }, and the same in checkStateMachine's fallback. There is no _validations group on ObjectTranslationDataSchema.

messages['validation.field.SOME_KEY'] is a different thing: it overrides the platform's built-in field catalog (BUILTIN_VALIDATION_MESSAGES, which already ships zh-CN). It cannot address duly_duty's standing_no_frequency.

So a deployment gets platform-generated refusals in Chinese and author-written refusals in English, side by side.

Suggested shape: objects.OBJECT._validations.RULE.message, resolved where the rule error is built — the object and the rule name are both in hand there.

3. Dataset labels

defineDataset carries label, description, dimensions[].label and measures[].label. dataset is not in TRANSLATABLE_METADATA_TYPES and TranslationDataSchema has no datasets group — yet a measure label is drawn on the dashboard, under every metric tile and on every chart axis.

Measured on a translated dashboard: the tile titles and descriptions are Chinese (they are dashboards.NAME.widgets.ID.*), and directly beneath each one the measure label renders Untouched > 14 days / Untouched > 30 days / Oldest touch. Screenshot: https://raw.githubusercontent.com/objectstack-ai/duly/claude/issue-18-screenshots/shots/dashboard-zh.png

Suggested shape: datasets.NAME.{label,description,dimensions.DIM.label,measures.MEASURE.label} plus a translateDataset in the dispatch table.


Filed from objectstack-ai/duly#18. The application records all three as declared, reasoned exemptions in its coverage walk (src/translations/authored-text.ts) rather than working around them, and its gate fails if a new one appears or an existing one stops matching.


Generated by Claude Code

Metadata

Metadata

Assignees

Labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions