Merge pull request #9844 from nixocio/ui_fix_plural_issue

Fix issue related to plural

Fix issue related to plural
Manually tested. make ui-devel

Reviewed-by: Jake McDermott <yo@jakemcdermott.me>
This commit is contained in:
softwarefactory-project-zuul[bot] 2021-04-07 19:13:54 +00:00 committed by GitHub
commit 725fe99df8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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`
)
}
/>,
<JobListCancelButton
key="cancel"