Skip to content

Commit b432ae4

Browse files
qq9340100claude
andauthored
docs: document the widget subCaption translation key (#8395)
The "What you can translate" table's dashboard row only ever said `dashboards.<name>` — it never enumerated the widget node's keys, so authors had no way to learn `subCaption` (added by #7862 for the metric widget's sub-caption, `options.description`) from the guide. Split the row into a dashboard-level row and a widget row listing `title` / `description` / `subCaption`, and add a callout explaining that a widget's `subtitle` alias now resolves to `subCaption`, not `description` — two different authored fields, two keys, per the #5428 item-4 ruling. Part of #8052 Claude-Session: https://claude.ai/code/session_01Jqe56GnYFddggeAyfkZFVz Co-authored-by: Claude <noreply@anthropic.com>
1 parent 539c5a0 commit b432ae4

1 file changed

Lines changed: 12 additions & 1 deletion

File tree

content/docs/ui/translations.mdx

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,8 @@ export default defineStack({
7272
| Action result dialogs (title / description / acknowledge / field labels) | `objects.<name>._actions.<action>.resultDialog` |
7373
| Form sections | `objects.<name>._sections.<section>` |
7474
| App navigation | `apps.<app>.navigation.<id>.label` |
75-
| Dashboards and widgets | `dashboards.<name>` |
75+
| Dashboard label / description | `dashboards.<name>.label` / `description` |
76+
| Dashboard widget title / description / sub-caption | `dashboards.<name>.widgets.<widgetId>.title` / `description` / `subCaption` |
7677
| Page labels and `page:header` copy | `pages.<name>.label` / `description` / `title` / `subtitle` |
7778
| Screen-flow wizards (flow label, screen headings, screen field copy) | `flows.<flow>.label` / `flows.<flow>.screens.<node_id>.title` / `.fields.<field>.label` / `.placeholder` — see the boundary note below |
7879
| Global actions, settings, messages | `globalActions`, `settings`, `messages` |
@@ -85,6 +86,16 @@ labels untouched: `sys_approval_request`'s Approve / Reject rendered in English
8586
in a zh-CN workspace for every consumer except the Console, which happened to
8687
re-resolve them client-side against its own copy of the bundle.
8788

89+
<Callout type="info">
90+
**A widget's `subtitle` alias resolves to `subCaption`, not `description`
91+
(#5428 item 4, #7862).** The metric widget's sub-caption — the string under
92+
the number — is the authored `widget.options.description`, a *different*
93+
authored field from `widget.description` (the copy under the card header).
94+
Two authored fields get two keys (「两个作者字段两个 key」): `description`
95+
translates `widget.description`, `subCaption` translates
96+
`widget.options.description`, and neither reaches the other's field.
97+
</Callout>
98+
8899
<Callout type="info">
89100
**Page headers are keyed by page name (#3589).** A page's `page:header`
90101
component has no stable id, so its `properties.title` / `properties.subtitle`

0 commit comments

Comments
 (0)