From 98dd3c7798e21688cf78c63f3bd7406897bbf112 Mon Sep 17 00:00:00 2001 From: nixocio Date: Wed, 7 Apr 2021 14:22:46 -0400 Subject: [PATCH] Fix issue related to plural Fix issue related to plural --- awx/ui_next/src/components/JobList/JobList.jsx | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/awx/ui_next/src/components/JobList/JobList.jsx b/awx/ui_next/src/components/JobList/JobList.jsx index 0ae8b38397..4271349656 100644 --- a/awx/ui_next/src/components/JobList/JobList.jsx +++ b/awx/ui_next/src/components/JobList/JobList.jsx @@ -244,13 +244,15 @@ function JobList({ i18n, defaultParams, showTypeColumn = false }) { isJobRunning(item.status) || !item.summary_fields.user_capabilities.delete } - errorMessage={i18n.plural({ - value: cannotDeleteItems.length, - one: - 'The selected job cannot be deleted due to insufficient permission or a running job status', - other: - 'The selected jobs cannot be deleted due to insufficient permissions or a running job status', - })} + errorMessage={ + cannotDeleteItems.length === 1 + ? i18n._( + t`The selected job cannot be deleted due to insufficient permission or a running job status` + ) + : i18n._( + t`The selected jobs cannot be deleted due to insufficient permissions or a running job status` + ) + } />,