From f50b6c2802ede14093855abf34faa4525c30c3f6 Mon Sep 17 00:00:00 2001 From: Okke Harsta Date: Thu, 7 Sep 2023 17:48:45 +0200 Subject: [PATCH] Differentiate in new locales --- client/src/locale/en.js | 4 +++- client/src/locale/nl.js | 4 +++- client/src/pages/Role.js | 4 ++-- client/src/tabs/Invitations.js | 2 +- client/src/tabs/UserRoles.js | 4 ++-- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/client/src/locale/en.js b/client/src/locale/en.js index 9afa1e2b..4485eb14 100644 --- a/client/src/locale/en.js +++ b/client/src/locale/en.js @@ -41,7 +41,8 @@ const en = { home: "Home", applications: "Applications", users: "Users", - guest: "Guests", + maintainers: "Maintainers", + guests: "Guests", invitations: "Invitations", roles: "Roles", profile: "Profile", @@ -159,6 +160,7 @@ const en = { enforceEmailEquality: "Email equality", eduIDOnly: "eduID only", new: "Invite maintainer", + newInvite: "New invite", newGuest: "Invite guest", invitees: "Invitees", inviteesPlaceholder: "Invitee email addresses", diff --git a/client/src/locale/nl.js b/client/src/locale/nl.js index 59debcac..c1e8e288 100644 --- a/client/src/locale/nl.js +++ b/client/src/locale/nl.js @@ -41,7 +41,8 @@ const nl = { home: "Home", applications: "Applications", users: "Users", - guest: "Guests", + maintainers: "Maintainers", + guests: "Guests", invitations: "Invitations", roles: "Roles", profile: "Profile", @@ -159,6 +160,7 @@ const nl = { enforceEmailEquality: "Email equality", eduIDOnly: "eduID only", new: "Invite maintainer", + newInvite: "New invite", newGuest: "Invite guest", invitees: "Invitees", inviteesPlaceholder: "Invitee email addresses", diff --git a/client/src/pages/Role.js b/client/src/pages/Role.js index 2c14d093..0ad3b820 100644 --- a/client/src/pages/Role.js +++ b/client/src/pages/Role.js @@ -48,8 +48,8 @@ export const Role = () => { setRole(res[0]); setLoading(false); const newTabs = [ - defaultSort="name" columns={columns} title={title} - newLabel={I18n.t("invitations.new")} + newLabel={I18n.t("invitations.newInvite")} showNew={!!role} newEntityFunc={role ? () => navigate("/invitation/new", {state: role.id}) : null} hideTitle={true} diff --git a/client/src/tabs/UserRoles.js b/client/src/tabs/UserRoles.js index 75f078c9..5c626413 100644 --- a/client/src/tabs/UserRoles.js +++ b/client/src/tabs/UserRoles.js @@ -15,7 +15,7 @@ import {deleteUserRole, updateUserRoleEndData} from "../api"; import {isEmpty, pseudoGuid} from "../utils/Utils"; -export const UserRoles = ({role, guest, userRoles}) => { +export const UserRoles = ({role, guests, userRoles}) => { const navigate = useNavigate(); const {user, setFlash} = useAppStore(state => state); @@ -231,7 +231,7 @@ export const UserRoles = ({role, guest, userRoles}) => { modelName="userRoles" defaultSort="name" columns={columns} - newLabel={I18n.t(guest ? "invitations.newGuest": "invitations.new")} + newLabel={I18n.t(guests ? "invitations.newGuest": "invitations.new")} showNew={true} newEntityFunc={() => navigate("/invitation/new", {state: role.id})} customNoEntities={I18n.t(`userRoles.noResults`)}