Commit 9f8acb6
feat(i18n): make action resultDialog copy translatable (schema slot + resolver + platform bundles)
The one-shot secret-reveal dialogs (create-user temporary password, 2FA
backup codes, OAuth client secrets) always rendered hardcoded English:
the translation protocol had no slot for Action.resultDialog, so neither
the bundles nor any resolver could localize the dialog's title,
description, acknowledge button, or field labels.
- spec: add ActionResultDialogTranslationSchema and hang it off object
`_actions`, `globalActions`, and the object-first `_actions` node.
`fields` is keyed by the LITERAL result-field path ("user.email") —
keys may contain dots, resolvers index the record directly. New
resolveActionResultDialog overlay resolver, wired into translateAction.
- cli: `os i18n extract` emits resultDialog.title/description/acknowledge
and resultDialog.fields.<path> entries (dotted paths stay one segment).
- platform-objects: fill the en / zh-CN / ja-JP / es-ES bundles for all
six shipped resultDialogs (sys_user create_user + set_user_password,
sys_two_factor enable + regenerate backup codes, sys_oauth_application
register + rotate secret).
Client-side rendering lands in objectui (@object-ui/i18n
actionResultDialog + result-dialog handlers). Verified end-to-end against
a live showcase instance: the create-user and set-password dialogs render
fully localized in zh-CN.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 8efa395 commit 9f8acb6
11 files changed
Lines changed: 523 additions & 7 deletions
File tree
- .changeset
- packages
- cli
- src/utils
- test
- platform-objects/src/apps/translations
- spec
- src/system
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
30 | 32 | | |
31 | | - | |
| 33 | + | |
32 | 34 | | |
33 | 35 | | |
34 | 36 | | |
| |||
199 | 201 | | |
200 | 202 | | |
201 | 203 | | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
202 | 241 | | |
203 | 242 | | |
204 | 243 | | |
| |||
286 | 325 | | |
287 | 326 | | |
288 | 327 | | |
| 328 | + | |
289 | 329 | | |
290 | 330 | | |
291 | 331 | | |
| |||
320 | 360 | | |
321 | 361 | | |
322 | 362 | | |
| 363 | + | |
323 | 364 | | |
324 | 365 | | |
325 | 366 | | |
| |||
Binary file not shown.
Lines changed: 53 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
171 | 181 | | |
172 | 182 | | |
173 | 183 | | |
| |||
183 | 193 | | |
184 | 194 | | |
185 | 195 | | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
186 | 204 | | |
187 | 205 | | |
188 | 206 | | |
| |||
988 | 1006 | | |
989 | 1007 | | |
990 | 1008 | | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
991 | 1018 | | |
992 | 1019 | | |
993 | 1020 | | |
| |||
1007 | 1034 | | |
1008 | 1035 | | |
1009 | 1036 | | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
1010 | 1045 | | |
1011 | 1046 | | |
1012 | 1047 | | |
| |||
1287 | 1322 | | |
1288 | 1323 | | |
1289 | 1324 | | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
1290 | 1334 | | |
1291 | 1335 | | |
1292 | 1336 | | |
1293 | 1337 | | |
1294 | | - | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
1295 | 1347 | | |
1296 | 1348 | | |
1297 | 1349 | | |
| |||
Lines changed: 53 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
171 | 181 | | |
172 | 182 | | |
173 | 183 | | |
| |||
183 | 193 | | |
184 | 194 | | |
185 | 195 | | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
186 | 204 | | |
187 | 205 | | |
188 | 206 | | |
| |||
988 | 1006 | | |
989 | 1007 | | |
990 | 1008 | | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
991 | 1018 | | |
992 | 1019 | | |
993 | 1020 | | |
| |||
1007 | 1034 | | |
1008 | 1035 | | |
1009 | 1036 | | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
1010 | 1045 | | |
1011 | 1046 | | |
1012 | 1047 | | |
| |||
1287 | 1322 | | |
1288 | 1323 | | |
1289 | 1324 | | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
1290 | 1334 | | |
1291 | 1335 | | |
1292 | 1336 | | |
1293 | 1337 | | |
1294 | | - | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
1295 | 1347 | | |
1296 | 1348 | | |
1297 | 1349 | | |
| |||
Lines changed: 53 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
171 | 181 | | |
172 | 182 | | |
173 | 183 | | |
| |||
183 | 193 | | |
184 | 194 | | |
185 | 195 | | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
186 | 204 | | |
187 | 205 | | |
188 | 206 | | |
| |||
988 | 1006 | | |
989 | 1007 | | |
990 | 1008 | | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
| 1012 | + | |
| 1013 | + | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
| 1017 | + | |
991 | 1018 | | |
992 | 1019 | | |
993 | 1020 | | |
| |||
1007 | 1034 | | |
1008 | 1035 | | |
1009 | 1036 | | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
1010 | 1045 | | |
1011 | 1046 | | |
1012 | 1047 | | |
| |||
1287 | 1322 | | |
1288 | 1323 | | |
1289 | 1324 | | |
| 1325 | + | |
| 1326 | + | |
| 1327 | + | |
| 1328 | + | |
| 1329 | + | |
| 1330 | + | |
| 1331 | + | |
| 1332 | + | |
| 1333 | + | |
1290 | 1334 | | |
1291 | 1335 | | |
1292 | 1336 | | |
1293 | 1337 | | |
1294 | | - | |
| 1338 | + | |
| 1339 | + | |
| 1340 | + | |
| 1341 | + | |
| 1342 | + | |
| 1343 | + | |
| 1344 | + | |
| 1345 | + | |
| 1346 | + | |
1295 | 1347 | | |
1296 | 1348 | | |
1297 | 1349 | | |
| |||
0 commit comments