From 1d58d0f5e7385ea57dd0b14fad759ef997e35324 Mon Sep 17 00:00:00 2001 From: Tudor Stanciu Date: Tue, 4 Apr 2023 00:36:47 +0300 Subject: [PATCH] translations --- public/locales/en/translations.json | 6 +++++- public/locales/ro/translations.json | 6 +++++- src/features/user/profile/security/SecurityComponent.js | 6 ++++-- 3 files changed, 14 insertions(+), 4 deletions(-) diff --git a/public/locales/en/translations.json b/public/locales/en/translations.json index 574c7eb..db80bf1 100644 --- a/public/locales/en/translations.json +++ b/public/locales/en/translations.json @@ -41,7 +41,11 @@ "Label": "Profile", "Hello": "Hi, {{userName}}", "Description": "{{userName}}, authenticated on {{loginDate}}", - "OpenPortfolio": "Open portfolio" + "OpenPortfolio": "Open portfolio", + "Security": { + "UserGroups": "User groups", + "UserRoles": "User roles" + } }, "Settings": "Settings", "Logout": "Logout" diff --git a/public/locales/ro/translations.json b/public/locales/ro/translations.json index a956897..6bcaf7d 100644 --- a/public/locales/ro/translations.json +++ b/public/locales/ro/translations.json @@ -32,7 +32,11 @@ "Label": "Profil", "Hello": "Salut, {{userName}}", "Description": "{{userName}}, autentificat pe {{loginDate}}", - "OpenPortfolio": "Deschide portofoliu" + "OpenPortfolio": "Deschide portofoliu", + "Security": { + "UserGroups": "Grupuri utilizator", + "UserRoles": "Roluri utilizator" + } }, "Settings": "Setări", "Logout": "Deconectare" diff --git a/src/features/user/profile/security/SecurityComponent.js b/src/features/user/profile/security/SecurityComponent.js index b2ceb70..7755f30 100644 --- a/src/features/user/profile/security/SecurityComponent.js +++ b/src/features/user/profile/security/SecurityComponent.js @@ -3,10 +3,12 @@ import PropTypes from "prop-types"; import { Paper, Grid, Chip, Typography } from "@material-ui/core"; import styles from "../styles"; import { makeStyles } from "@material-ui/core/styles"; +import { useTranslation } from "react-i18next"; const useStyles = makeStyles(styles); const SecurityComponent = ({ userGroups, userRoles }) => { + const { t } = useTranslation(); const classes = useStyles(); return ( @@ -14,7 +16,7 @@ const SecurityComponent = ({ userGroups, userRoles }) => {
- User groups + {t("User.Profile.Security.UserGroups")}
{userGroups.map(g => ( @@ -26,7 +28,7 @@ const SecurityComponent = ({ userGroups, userRoles }) => {
- User roles + {t("User.Profile.Security.UserRoles")}
{userRoles.map(r => (