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"
title={<TabTitleText>{t("roles")}</TabTitleText>}
>
<RolesList loader={loader} paginated={false} />
<RolesList
loader={loader}
paginated={false}
messageBundle="clients"
/>
</Tab>
<Tab
id="clientScopes"

View file

@ -14,6 +14,9 @@
"downloadAdaptorTitle": "Download adaptor configs",
"credentials": "Credentials",
"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",
"addClientScope": "Add client scope",
"addClientScopesTo": "Add client scopes to {{clientId}}",

View file

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

View file

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