Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .changeset/approval-actions-translation-bundle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
"@objectstack/plugin-approvals": patch
---

fix(plugin-approvals): localize the declared decision-action labels (objectui#2762 P0-3)

The Approval Center's decision drawer rendered the `sys_approval_request`
declared actions with their literal metadata labels — English **Approve /
Reject / Reassign / Send back / Request info** in a zh-CN workspace, sitting
next to the same page's localized 通过 / 拒绝 inbox buttons. The plugin's
translation bundle covered fields and views but had no `_actions` node, so
the console's `_actions.<name>.label` resolution had nothing to hit.

- Re-ran `os i18n extract` against the plugin's config: the bundles now carry
`_actions` translations (label, confirmText, successMessage, param labels
and helpText) for all eight decision actions — `approval_approve`,
`approval_reject`, `approval_reassign`, `approval_send_back`,
`approval_request_info`, `approval_remind`, `approval_recall`,
`approval_resubmit` — in zh-CN, ja-JP and es-ES (en keeps the metadata
literals).
- The extract also surfaced other untranslated gaps, now filled in all three
locales: the `returned` status option, the `sys_approval_action.action`
audit options (`reassign` / `remind` / `request_info` / `comment` /
`revise` / `resubmit` / `ooo_substitute`), the `attachments` field, and the
`my_pending` / `recent` view empty states.
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ export const enObjects: NonNullable<TranslationData['objects']> = {
pending: "pending",
approved: "approved",
rejected: "rejected",
recalled: "recalled"
recalled: "recalled",
returned: "returned"
}
},
current_step: {
Expand Down Expand Up @@ -86,7 +87,11 @@ export const enObjects: NonNullable<TranslationData['objects']> = {
},
_views: {
my_pending: {
label: "My Pending"
label: "My Pending",
emptyState: {
title: "No pending approvals",
message: "You're all caught up."
}
},
submitted_by_me: {
label: "I Submitted"
Expand All @@ -97,6 +102,92 @@ export const enObjects: NonNullable<TranslationData['objects']> = {
all_requests: {
label: "All"
}
},
_actions: {
approval_approve: {
label: "Approve",
successMessage: "Approved.",
params: {
comment: {
label: "Comment"
},
attachments: {
label: "Attachments"
}
}
},
approval_reject: {
label: "Reject",
confirmText: "Reject this request? A rejection is final for every approver.",
successMessage: "Rejected.",
params: {
comment: {
label: "Comment"
},
attachments: {
label: "Attachments"
}
}
},
approval_reassign: {
label: "Reassign",
successMessage: "Reassigned.",
params: {
to: {
label: "New approver",
helpText: "User to hand this step to"
},
comment: {
label: "Comment"
}
}
},
approval_send_back: {
label: "Send back",
successMessage: "Sent back for revision.",
params: {
comment: {
label: "Reason"
}
}
},
approval_request_info: {
label: "Request info",
successMessage: "Information requested.",
params: {
comment: {
label: "What do you need?"
}
}
},
approval_remind: {
label: "Send reminder",
successMessage: "Reminder sent.",
params: {
comment: {
label: "Note"
}
}
},
approval_recall: {
label: "Recall",
confirmText: "Recall this request? Approvers can no longer act on it and the record is unlocked.",
successMessage: "Recalled.",
params: {
comment: {
label: "Comment"
}
}
},
approval_resubmit: {
label: "Resubmit",
successMessage: "Resubmitted.",
params: {
comment: {
label: "What changed?"
}
}
}
}
},
sys_approval_action: {
Expand Down Expand Up @@ -128,7 +219,14 @@ export const enObjects: NonNullable<TranslationData['objects']> = {
approve: "approve",
reject: "reject",
recall: "recall",
escalate: "escalate"
escalate: "escalate",
reassign: "reassign",
remind: "remind",
request_info: "request_info",
comment: "comment",
revise: "revise",
resubmit: "resubmit",
ooo_substitute: "ooo_substitute"
}
},
actor_id: {
Expand All @@ -137,13 +235,21 @@ export const enObjects: NonNullable<TranslationData['objects']> = {
comment: {
label: "Comment"
},
attachments: {
label: "Attachments",
help: "Files supporting this action — e.g. a signed contract or evidence (#3266)."
},
created_at: {
label: "Created At"
}
},
_views: {
recent: {
label: "Recent"
label: "Recent",
emptyState: {
title: "No approval actions yet",
message: "Actions are logged automatically when approvals progress."
}
},
by_actor: {
label: "By Actor"
Expand Down Expand Up @@ -179,7 +285,7 @@ export const enObjects: NonNullable<TranslationData['objects']> = {
},
reason: {
label: "Reason",
help: "Why the delegation exists (e.g. \"Annual leave 5/26\u20135/30\"). Recorded on the substitution audit row."
help: "Why the delegation exists (e.g. \"Annual leave 5/26–5/30\"). Recorded on the substitution audit row."
},
organization_id: {
label: "Organization",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ export const esESObjects: NonNullable<TranslationData['objects']> = {
pending: "Pendiente",
approved: "Aprobada",
rejected: "Rechazada",
recalled: "Retirada"
recalled: "Retirada",
returned: "Devuelta para revisión"
}
},
current_step: {
Expand Down Expand Up @@ -86,7 +87,11 @@ export const esESObjects: NonNullable<TranslationData['objects']> = {
},
_views: {
my_pending: {
label: "Mis pendientes"
label: "Mis pendientes",
emptyState: {
title: "Sin aprobaciones pendientes",
message: "Estás al día: nada espera tu aprobación."
}
},
submitted_by_me: {
label: "Enviadas por mí"
Expand All @@ -97,6 +102,92 @@ export const esESObjects: NonNullable<TranslationData['objects']> = {
all_requests: {
label: "Todas"
}
},
_actions: {
approval_approve: {
label: "Aprobar",
successMessage: "Aprobada.",
params: {
comment: {
label: "Comentario"
},
attachments: {
label: "Adjuntos"
}
}
},
approval_reject: {
label: "Rechazar",
confirmText: "¿Rechazar esta solicitud? Un rechazo es definitivo para todos los aprobadores.",
successMessage: "Rechazada.",
params: {
comment: {
label: "Comentario"
},
attachments: {
label: "Adjuntos"
}
}
},
approval_reassign: {
label: "Reasignar",
successMessage: "Reasignada.",
params: {
to: {
label: "Nuevo aprobador",
helpText: "Usuario al que se entrega este paso"
},
comment: {
label: "Comentario"
}
}
},
approval_send_back: {
label: "Devolver",
successMessage: "Devuelta para revisión.",
params: {
comment: {
label: "Motivo"
}
}
},
approval_request_info: {
label: "Pedir información",
successMessage: "Información solicitada.",
params: {
comment: {
label: "¿Qué necesitas?"
}
}
},
approval_remind: {
label: "Enviar recordatorio",
successMessage: "Recordatorio enviado.",
params: {
comment: {
label: "Nota"
}
}
},
approval_recall: {
label: "Retirar",
confirmText: "¿Retirar esta solicitud? Los aprobadores ya no podrán actuar sobre ella y el registro se desbloqueará.",
successMessage: "Retirada.",
params: {
comment: {
label: "Comentario"
}
}
},
approval_resubmit: {
label: "Reenviar",
successMessage: "Reenviada.",
params: {
comment: {
label: "¿Qué ha cambiado?"
}
}
}
}
},
sys_approval_action: {
Expand Down Expand Up @@ -128,7 +219,14 @@ export const esESObjects: NonNullable<TranslationData['objects']> = {
approve: "Aprobar",
reject: "Rechazar",
recall: "Retirar",
escalate: "Escalar"
escalate: "Escalar",
reassign: "Reasignación",
remind: "Recordatorio",
request_info: "Petición de información",
comment: "Comentario",
revise: "Devolución",
resubmit: "Reenvío",
ooo_substitute: "Sustitución por ausencia"
}
},
actor_id: {
Expand All @@ -137,13 +235,21 @@ export const esESObjects: NonNullable<TranslationData['objects']> = {
comment: {
label: "Comentario"
},
attachments: {
label: "Adjuntos",
help: "Archivos que respaldan esta acción, p. ej. un contrato firmado o pruebas (#3266)."
},
created_at: {
label: "Creado el"
}
},
_views: {
recent: {
label: "Recientes"
label: "Recientes",
emptyState: {
title: "Aún no hay acciones de aprobación",
message: "Las acciones se registran automáticamente a medida que avanza la aprobación."
}
},
by_actor: {
label: "Por actor"
Expand Down Expand Up @@ -179,7 +285,7 @@ export const esESObjects: NonNullable<TranslationData['objects']> = {
},
reason: {
label: "Reason",
help: "Why the delegation exists (e.g. \"Annual leave 5/26\u20135/30\"). Recorded on the substitution audit row."
help: "Why the delegation exists (e.g. \"Annual leave 5/26–5/30\"). Recorded on the substitution audit row."
},
organization_id: {
label: "Organization",
Expand Down
Loading
Loading