Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename Security and Accounts Create Button #3778

Merged
merged 7 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ export function CollectionView({
});
}}
>
{commonText.create()}
{userText.addUser()}
</Link.Green>
</div>
</>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,12 +63,12 @@ export function CreateCollectionRoleButton({
readonly collectionId: number;
}): JSX.Element {
return isDisabled ? (
<Button.Success onClick={undefined}>{commonText.create()}</Button.Success>
<Button.Success onClick={undefined}>{userText.addRole()}</Button.Success>
) : (
<Link.Green
href={`/specify/security/collection/${collectionId}/role/create/`}
>
{commonText.create()}
{userText.addRole()}
</Link.Green>
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ function InstitutionView({
<div className="flex flex-wrap gap-2">
{hasPermission('/permissions/library/roles', 'create') && (
<Link.Green href="/specify/security/institution/role/create/">
{commonText.create()}
{commonText.createNew()}
</Link.Green>
)}
<SafeOutlet<SecurityOutlet> {...outletState} />
Expand Down Expand Up @@ -182,7 +182,7 @@ function InstitutionView({
{hasTablePermission('SpecifyUser', 'create') && (
<div>
<Link.Green href="/specify/security/user/new/">
{commonText.create()}
{commonText.createNew()}
</Link.Green>
</div>
)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export function CreateRole({
<Button.DialogClose>{commonText.cancel()}</Button.DialogClose>
</>
}
header={userText.createRole()}
header={userText.addRole()}
onClose={(): void => navigate(closeUrl)}
>
{scope === 'institution' ||
Expand Down
3 changes: 3 additions & 0 deletions specifyweb/frontend/js_src/lib/localization/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -709,4 +709,7 @@ export const commonText = createDictionary({
'ru-ru': 'Изменять',
'uk-ua': 'Зміна',
},
createNew: {
'en-us': 'Create New',
},
} as const);
12 changes: 12 additions & 0 deletions specifyweb/frontend/js_src/lib/localization/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1186,4 +1186,16 @@ export const userText = createDictionary({
'fr-fr': 'Utilisateur actuel',
'uk-ua': 'Поточний користувач',
},
addRole: {
'en-us': 'Add Role',
},
addNewRole: {
'en-us': 'Add New Role',
},
addRoleToCollection: {
CarolineDenis marked this conversation as resolved.
Show resolved Hide resolved
'en-us': 'Add Role To Collection',
},
addUser: {
'en-us': 'Add User',
},
} as const);