Merge pull request #443 from edewit/issue-415

fixed text for empty state #415
This commit is contained in:
mfrances17 2021-03-15 16:16:46 -04:00 committed by GitHub
commit 96d89ab72e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 15 additions and 6 deletions

View file

@ -254,7 +254,11 @@ export const ClientDetails = () => {
eventKey="roles" eventKey="roles"
title={<TabTitleText>{t("roles")}</TabTitleText>} title={<TabTitleText>{t("roles")}</TabTitleText>}
> >
<RolesList loader={loader} paginated={false} /> <RolesList
loader={loader}
paginated={false}
messageBundle="clients"
/>
</Tab> </Tab>
<Tab <Tab
id="clientScopes" id="clientScopes"

View file

@ -14,6 +14,9 @@
"downloadAdaptorTitle": "Download adaptor configs", "downloadAdaptorTitle": "Download adaptor configs",
"credentials": "Credentials", "credentials": "Credentials",
"roles": "Roles", "roles": "Roles",
"createRole": "Create role",
"noRoles": "No roles for this client",
"noRolesInstructions": "You haven't created any roles for this client. Create a role to get started.",
"clientScopes": "Client scopes", "clientScopes": "Client scopes",
"addClientScope": "Add client scope", "addClientScope": "Add client scope",
"addClientScopesTo": "Add client scopes to {{clientId}}", "addClientScopesTo": "Add client scopes to {{clientId}}",

View file

@ -15,6 +15,7 @@ import { emptyFormatter, boolFormatter } from "../util";
type RolesListProps = { type RolesListProps = {
paginated?: boolean; paginated?: boolean;
parentRoleId?: string; parentRoleId?: string;
messageBundle?: string;
loader?: ( loader?: (
first?: number, first?: number,
max?: number, max?: number,
@ -35,8 +36,9 @@ export const RolesList = ({
loader, loader,
paginated = true, paginated = true,
parentRoleId, parentRoleId,
messageBundle = "roles",
}: RolesListProps) => { }: RolesListProps) => {
const { t } = useTranslation("roles"); const { t } = useTranslation(messageBundle);
const history = useHistory(); const history = useHistory();
const adminClient = useAdminClient(); const adminClient = useAdminClient();
const { addAlert } = useAlerts(); const { addAlert } = useAlerts();
@ -121,8 +123,8 @@ export const RolesList = ({
emptyState={ emptyState={
<ListEmptyState <ListEmptyState
hasIcon={true} hasIcon={true}
message={t("noRolesInThisRealm")} message={t("noRoles")}
instructions={t("noRolesInThisRealmInstructions")} instructions={t("noRolesInstructions")}
primaryActionText={t("createRole")} primaryActionText={t("createRole")}
onPrimaryAction={goToCreate} onPrimaryAction={goToCreate}
/> />

View file

@ -37,8 +37,8 @@
"roleDeleteError": "Could not delete role: {{error}}", "roleDeleteError": "Could not delete role: {{error}}",
"roleSaveSuccess": "The role has been saved", "roleSaveSuccess": "The role has been saved",
"roleSaveError": "Could not save role: {{error}}", "roleSaveError": "Could not save role: {{error}}",
"noRolesInThisRealm": "No roles in this realm", "noRoles": "No roles in this realm",
"noRolesInThisRealmInstructions": "You haven't created any roles in this realm. Create a role to get started.", "noRolesInstructions": "You haven't created any roles in this realm. Create a role to get started.",
"roleAuthentication": "Role authentication", "roleAuthentication": "Role authentication",
"removeAllAssociatedRoles": "Remove all associated roles", "removeAllAssociatedRoles": "Remove all associated roles",
"removeAssociatedRoles": "Remove associated roles", "removeAssociatedRoles": "Remove associated roles",