Commit 3e59c60
feat(i18n): translate action description (closes the last gap of action i18n) (#1778)
Action labels, confirm text, success messages, and parameter
label/placeholder/helpText/option-label already resolve through i18n. The one
piece the convention was missing is the action's own `description` (the
explanatory line shown in the param dialog / sheet / drawer header), which
flowed through to useActionModal raw.
- Add an `actionDescription` resolver to useObjectLabel (mirrors actionSuccess;
convention `objects.{object}._actions.{action}.description`, falls back to
globalActions, then the metadata literal).
- Wire it where the action descriptor is built before the dialog opens —
useConsoleActionRuntime + RecordDetailView — so the dialog receives a
localized description (identical mechanism to the already-working
actionParamText wiring).
Note: no shipped action currently sets a top-level `description`, so this is a
forward-looking capability with no visible change today; it closes the
"description not translatable" half of the issue. Verified by build + the full
app-shell (546) and i18n (120) suites; the test mock gains actionDescription so
the runtime tests stay green.
Closes the i18n-action gap tracked in cloud#73.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 7cda1ad commit 3e59c60
4 files changed
Lines changed: 22 additions & 4 deletions
File tree
- packages
- app-shell/src
- hooks
- __tests__
- views
- i18n/src
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
| 36 | + | |
36 | 37 | | |
37 | 38 | | |
38 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
| 155 | + | |
156 | 156 | | |
157 | 157 | | |
158 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
119 | 119 | | |
120 | 120 | | |
121 | 121 | | |
122 | | - | |
| 122 | + | |
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
344 | | - | |
| 344 | + | |
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
385 | 385 | | |
386 | 386 | | |
387 | 387 | | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
388 | 405 | | |
389 | 406 | | |
390 | 407 | | |
| |||
0 commit comments