Skip to content

Commit

Permalink
Differentiate in new locales
Browse files Browse the repository at this point in the history
  • Loading branch information
oharsta committed Sep 7, 2023
1 parent df58d5d commit f50b6c2
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
4 changes: 3 additions & 1 deletion client/src/locale/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ const en = {
home: "Home",
applications: "Applications",
users: "Users",
guest: "Guests",
maintainers: "Maintainers",
guests: "Guests",
invitations: "Invitations",
roles: "Roles",
profile: "Profile",
Expand Down Expand Up @@ -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",
Expand Down
4 changes: 3 additions & 1 deletion client/src/locale/nl.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ const nl = {
home: "Home",
applications: "Applications",
users: "Users",
guest: "Guests",
maintainers: "Maintainers",
guests: "Guests",
invitations: "Invitations",
roles: "Roles",
profile: "Profile",
Expand Down Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions client/src/pages/Role.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ export const Role = () => {
setRole(res[0]);
setLoading(false);
const newTabs = [
<Page key="users"
name="users"
<Page key="maintainers"
name="maintainers"
label={I18n.t("tabs.userRoles")}
Icon={UserLogo}>
<UserRoles role={res[0]}
Expand Down
2 changes: 1 addition & 1 deletion client/src/tabs/Invitations.js
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ export const Invitations = ({role, preloadedInvitations, standAlone = false}) =>
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}
Expand Down
4 changes: 2 additions & 2 deletions client/src/tabs/UserRoles.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down Expand Up @@ -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`)}
Expand Down

0 comments on commit f50b6c2

Please sign in to comment.