diff --git a/src/components/users/partials/UsersRolesCell.tsx b/src/components/users/partials/UsersRolesCell.tsx index e07200f4b3..64924520e7 100644 --- a/src/components/users/partials/UsersRolesCell.tsx +++ b/src/components/users/partials/UsersRolesCell.tsx @@ -1,4 +1,5 @@ import React from "react"; +import { useTranslation } from "react-i18next"; /** * This component renders the roles cells of users in the table view @@ -6,6 +7,8 @@ import React from "react"; const UsersRolesCell = ({ row }: any) => { + const { t } = useTranslation(); + const getRoleString = () => { let displayRoles = []; let roleCountUI = 0; @@ -25,13 +28,16 @@ const UsersRolesCell = ({ } if (roleCountUI > 0) { - displayRoles.push(`${roleCountUI} UI roles`); + const desc = t('USERS.USERS.TABLE.COLLAPSED.UI'); + displayRoles.push(`${roleCountUI} ${desc}`); } if (roleCountAPI > 0) { - displayRoles.push(`${roleCountAPI} API roles`); + const desc = t('USERS.USERS.TABLE.COLLAPSED.API'); + displayRoles.push(`${roleCountAPI} ${desc}`); } if (roleCountCaptureAgent > 0) { - displayRoles.push(`${roleCountUI} capture agent roles`); + const desc = t('USERS.USERS.TABLE.COLLAPSED.CAPTURE_AGENT'); + displayRoles.push(`${roleCountCaptureAgent} ${desc}`); } return displayRoles.join(', '); diff --git a/src/i18n/org/opencastproject/adminui/languages/lang-en_US.json b/src/i18n/org/opencastproject/adminui/languages/lang-en_US.json index 7892b4f4e1..cef557bab1 100644 --- a/src/i18n/org/opencastproject/adminui/languages/lang-en_US.json +++ b/src/i18n/org/opencastproject/adminui/languages/lang-en_US.json @@ -1243,6 +1243,11 @@ "USERNAME": "Username", "EMAIL": "Email", "ROLES": "Roles", + "COLLAPSED": { + "UI": "user interface roles", + "API": "API roles", + "CAPTURE_AGENT": "capture agent roles" + }, "TYPE": "Type", "PROVIDER": "Provider", "ACTION": "Actions",