Commit d1e930a
feat(spec): model action-param translations (_actions.params) (#1860)
* feat(spec): model action-param translations in TranslationData (_actions.params)
Action labels localize via `objects.<obj>._actions.<action>.label` bundle keys,
but action PARAMS (the dialog form fields) had no translation path — the
`_actions` translation schema only modeled label/confirmText/successMessage, so
a param's label/helpText/placeholder/options could not be localized and rendered
English in a zh UI.
Add an optional `params` record to the action translation schema (in
ObjectTranslationDataSchema._actions, globalActions, and the secondary
ObjectTranslationNodeSchema._actions):
_actions.<action>.params.<param>.{ label?, helpText?, placeholder?, options? }
`options` maps a select value → translated label. All optional and additive, so
existing bundles are unaffected. objectui's `useObjectLabel().actionParamText()`
already reads this exact key path; this unblocks authoring the bundle entries.
Tests: 1149 spec tests pass (translation/i18n-resolver/typegen); DTS build green.
* chore(changeset): action-param translation schema
---------
Co-authored-by: Jack Zhuang <277994282+os-zhuang@users.noreply.github.com>1 parent 1b82b64 commit d1e930a
2 files changed
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
82 | 88 | | |
83 | 89 | | |
84 | 90 | | |
| |||
145 | 151 | | |
146 | 152 | | |
147 | 153 | | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
148 | 160 | | |
149 | 161 | | |
150 | 162 | | |
| |||
466 | 478 | | |
467 | 479 | | |
468 | 480 | | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
469 | 487 | | |
470 | 488 | | |
471 | 489 | | |
| |||
0 commit comments