Skip to content

Commit e3e3e53

Browse files
committed
fix(plugin-approvals): ship _actions translations for the decision actions (objectui#2762 P0-3)
The Approval Center drawer rendered the sys_approval_request declared actions with their literal English labels in localized workspaces — the plugin's bundle had no _actions node for the console's _actions.<name>.label resolution to hit. Re-ran 'os i18n extract' against the plugin config and translated the new leaves for zh-CN / ja-JP / es-ES: all eight decision actions (label, confirmText, successMessage, param labels/helpText) plus the gaps the merge surfaced — the 'returned' status option, the sys_approval_action audit-action options, the attachments field, and the my_pending / recent view empty states. Refs objectui#2762 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Cu48mLFUdRBmMh8Z8R3CVz
1 parent d99aeb3 commit e3e3e53

5 files changed

Lines changed: 468 additions & 19 deletions

File tree

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
"@objectstack/plugin-approvals": patch
3+
---
4+
5+
fix(plugin-approvals): localize the declared decision-action labels (objectui#2762 P0-3)
6+
7+
The Approval Center's decision drawer rendered the `sys_approval_request`
8+
declared actions with their literal metadata labels — English **Approve /
9+
Reject / Reassign / Send back / Request info** in a zh-CN workspace, sitting
10+
next to the same page's localized 通过 / 拒绝 inbox buttons. The plugin's
11+
translation bundle covered fields and views but had no `_actions` node, so
12+
the console's `_actions.<name>.label` resolution had nothing to hit.
13+
14+
- Re-ran `os i18n extract` against the plugin's config: the bundles now carry
15+
`_actions` translations (label, confirmText, successMessage, param labels
16+
and helpText) for all eight decision actions — `approval_approve`,
17+
`approval_reject`, `approval_reassign`, `approval_send_back`,
18+
`approval_request_info`, `approval_remind`, `approval_recall`,
19+
`approval_resubmit` — in zh-CN, ja-JP and es-ES (en keeps the metadata
20+
literals).
21+
- The extract also surfaced other untranslated gaps, now filled in all three
22+
locales: the `returned` status option, the `sys_approval_action.action`
23+
audit options (`reassign` / `remind` / `request_info` / `comment` /
24+
`revise` / `resubmit` / `ooo_substitute`), the `attachments` field, and the
25+
`my_pending` / `recent` view empty states.

packages/plugins/plugin-approvals/src/translations/en.objects.generated.ts

Lines changed: 111 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ export const enObjects: NonNullable<TranslationData['objects']> = {
4444
pending: "pending",
4545
approved: "approved",
4646
rejected: "rejected",
47-
recalled: "recalled"
47+
recalled: "recalled",
48+
returned: "returned"
4849
}
4950
},
5051
current_step: {
@@ -86,7 +87,11 @@ export const enObjects: NonNullable<TranslationData['objects']> = {
8687
},
8788
_views: {
8889
my_pending: {
89-
label: "My Pending"
90+
label: "My Pending",
91+
emptyState: {
92+
title: "No pending approvals",
93+
message: "You're all caught up."
94+
}
9095
},
9196
submitted_by_me: {
9297
label: "I Submitted"
@@ -97,6 +102,92 @@ export const enObjects: NonNullable<TranslationData['objects']> = {
97102
all_requests: {
98103
label: "All"
99104
}
105+
},
106+
_actions: {
107+
approval_approve: {
108+
label: "Approve",
109+
successMessage: "Approved.",
110+
params: {
111+
comment: {
112+
label: "Comment"
113+
},
114+
attachments: {
115+
label: "Attachments"
116+
}
117+
}
118+
},
119+
approval_reject: {
120+
label: "Reject",
121+
confirmText: "Reject this request? A rejection is final for every approver.",
122+
successMessage: "Rejected.",
123+
params: {
124+
comment: {
125+
label: "Comment"
126+
},
127+
attachments: {
128+
label: "Attachments"
129+
}
130+
}
131+
},
132+
approval_reassign: {
133+
label: "Reassign",
134+
successMessage: "Reassigned.",
135+
params: {
136+
to: {
137+
label: "New approver",
138+
helpText: "User to hand this step to"
139+
},
140+
comment: {
141+
label: "Comment"
142+
}
143+
}
144+
},
145+
approval_send_back: {
146+
label: "Send back",
147+
successMessage: "Sent back for revision.",
148+
params: {
149+
comment: {
150+
label: "Reason"
151+
}
152+
}
153+
},
154+
approval_request_info: {
155+
label: "Request info",
156+
successMessage: "Information requested.",
157+
params: {
158+
comment: {
159+
label: "What do you need?"
160+
}
161+
}
162+
},
163+
approval_remind: {
164+
label: "Send reminder",
165+
successMessage: "Reminder sent.",
166+
params: {
167+
comment: {
168+
label: "Note"
169+
}
170+
}
171+
},
172+
approval_recall: {
173+
label: "Recall",
174+
confirmText: "Recall this request? Approvers can no longer act on it and the record is unlocked.",
175+
successMessage: "Recalled.",
176+
params: {
177+
comment: {
178+
label: "Comment"
179+
}
180+
}
181+
},
182+
approval_resubmit: {
183+
label: "Resubmit",
184+
successMessage: "Resubmitted.",
185+
params: {
186+
comment: {
187+
label: "What changed?"
188+
}
189+
}
190+
}
100191
}
101192
},
102193
sys_approval_action: {
@@ -128,7 +219,14 @@ export const enObjects: NonNullable<TranslationData['objects']> = {
128219
approve: "approve",
129220
reject: "reject",
130221
recall: "recall",
131-
escalate: "escalate"
222+
escalate: "escalate",
223+
reassign: "reassign",
224+
remind: "remind",
225+
request_info: "request_info",
226+
comment: "comment",
227+
revise: "revise",
228+
resubmit: "resubmit",
229+
ooo_substitute: "ooo_substitute"
132230
}
133231
},
134232
actor_id: {
@@ -137,13 +235,21 @@ export const enObjects: NonNullable<TranslationData['objects']> = {
137235
comment: {
138236
label: "Comment"
139237
},
238+
attachments: {
239+
label: "Attachments",
240+
help: "Files supporting this action — e.g. a signed contract or evidence (#3266)."
241+
},
140242
created_at: {
141243
label: "Created At"
142244
}
143245
},
144246
_views: {
145247
recent: {
146-
label: "Recent"
248+
label: "Recent",
249+
emptyState: {
250+
title: "No approval actions yet",
251+
message: "Actions are logged automatically when approvals progress."
252+
}
147253
},
148254
by_actor: {
149255
label: "By Actor"
@@ -179,7 +285,7 @@ export const enObjects: NonNullable<TranslationData['objects']> = {
179285
},
180286
reason: {
181287
label: "Reason",
182-
help: "Why the delegation exists (e.g. \"Annual leave 5/26\u20135/30\"). Recorded on the substitution audit row."
288+
help: "Why the delegation exists (e.g. \"Annual leave 5/26–5/30\"). Recorded on the substitution audit row."
183289
},
184290
organization_id: {
185291
label: "Organization",

packages/plugins/plugin-approvals/src/translations/es-ES.objects.generated.ts

Lines changed: 111 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,8 @@ export const esESObjects: NonNullable<TranslationData['objects']> = {
4444
pending: "Pendiente",
4545
approved: "Aprobada",
4646
rejected: "Rechazada",
47-
recalled: "Retirada"
47+
recalled: "Retirada",
48+
returned: "Devuelta para revisión"
4849
}
4950
},
5051
current_step: {
@@ -86,7 +87,11 @@ export const esESObjects: NonNullable<TranslationData['objects']> = {
8687
},
8788
_views: {
8889
my_pending: {
89-
label: "Mis pendientes"
90+
label: "Mis pendientes",
91+
emptyState: {
92+
title: "Sin aprobaciones pendientes",
93+
message: "Estás al día: nada espera tu aprobación."
94+
}
9095
},
9196
submitted_by_me: {
9297
label: "Enviadas por mí"
@@ -97,6 +102,92 @@ export const esESObjects: NonNullable<TranslationData['objects']> = {
97102
all_requests: {
98103
label: "Todas"
99104
}
105+
},
106+
_actions: {
107+
approval_approve: {
108+
label: "Aprobar",
109+
successMessage: "Aprobada.",
110+
params: {
111+
comment: {
112+
label: "Comentario"
113+
},
114+
attachments: {
115+
label: "Adjuntos"
116+
}
117+
}
118+
},
119+
approval_reject: {
120+
label: "Rechazar",
121+
confirmText: "¿Rechazar esta solicitud? Un rechazo es definitivo para todos los aprobadores.",
122+
successMessage: "Rechazada.",
123+
params: {
124+
comment: {
125+
label: "Comentario"
126+
},
127+
attachments: {
128+
label: "Adjuntos"
129+
}
130+
}
131+
},
132+
approval_reassign: {
133+
label: "Reasignar",
134+
successMessage: "Reasignada.",
135+
params: {
136+
to: {
137+
label: "Nuevo aprobador",
138+
helpText: "Usuario al que se entrega este paso"
139+
},
140+
comment: {
141+
label: "Comentario"
142+
}
143+
}
144+
},
145+
approval_send_back: {
146+
label: "Devolver",
147+
successMessage: "Devuelta para revisión.",
148+
params: {
149+
comment: {
150+
label: "Motivo"
151+
}
152+
}
153+
},
154+
approval_request_info: {
155+
label: "Pedir información",
156+
successMessage: "Información solicitada.",
157+
params: {
158+
comment: {
159+
label: "¿Qué necesitas?"
160+
}
161+
}
162+
},
163+
approval_remind: {
164+
label: "Enviar recordatorio",
165+
successMessage: "Recordatorio enviado.",
166+
params: {
167+
comment: {
168+
label: "Nota"
169+
}
170+
}
171+
},
172+
approval_recall: {
173+
label: "Retirar",
174+
confirmText: "¿Retirar esta solicitud? Los aprobadores ya no podrán actuar sobre ella y el registro se desbloqueará.",
175+
successMessage: "Retirada.",
176+
params: {
177+
comment: {
178+
label: "Comentario"
179+
}
180+
}
181+
},
182+
approval_resubmit: {
183+
label: "Reenviar",
184+
successMessage: "Reenviada.",
185+
params: {
186+
comment: {
187+
label: "¿Qué ha cambiado?"
188+
}
189+
}
190+
}
100191
}
101192
},
102193
sys_approval_action: {
@@ -128,7 +219,14 @@ export const esESObjects: NonNullable<TranslationData['objects']> = {
128219
approve: "Aprobar",
129220
reject: "Rechazar",
130221
recall: "Retirar",
131-
escalate: "Escalar"
222+
escalate: "Escalar",
223+
reassign: "Reasignación",
224+
remind: "Recordatorio",
225+
request_info: "Petición de información",
226+
comment: "Comentario",
227+
revise: "Devolución",
228+
resubmit: "Reenvío",
229+
ooo_substitute: "Sustitución por ausencia"
132230
}
133231
},
134232
actor_id: {
@@ -137,13 +235,21 @@ export const esESObjects: NonNullable<TranslationData['objects']> = {
137235
comment: {
138236
label: "Comentario"
139237
},
238+
attachments: {
239+
label: "Adjuntos",
240+
help: "Archivos que respaldan esta acción, p. ej. un contrato firmado o pruebas (#3266)."
241+
},
140242
created_at: {
141243
label: "Creado el"
142244
}
143245
},
144246
_views: {
145247
recent: {
146-
label: "Recientes"
248+
label: "Recientes",
249+
emptyState: {
250+
title: "Aún no hay acciones de aprobación",
251+
message: "Las acciones se registran automáticamente a medida que avanza la aprobación."
252+
}
147253
},
148254
by_actor: {
149255
label: "Por actor"
@@ -179,7 +285,7 @@ export const esESObjects: NonNullable<TranslationData['objects']> = {
179285
},
180286
reason: {
181287
label: "Reason",
182-
help: "Why the delegation exists (e.g. \"Annual leave 5/26\u20135/30\"). Recorded on the substitution audit row."
288+
help: "Why the delegation exists (e.g. \"Annual leave 5/26–5/30\"). Recorded on the substitution audit row."
183289
},
184290
organization_id: {
185291
label: "Organization",

0 commit comments

Comments
 (0)