move multi-used strings to common
This commit is contained in:
parent
9166212720
commit
0b0e474caf
19 changed files with 45 additions and 47 deletions
|
@ -146,7 +146,7 @@ export const RoleMappingForm = () => {
|
|||
return (
|
||||
<>
|
||||
<ViewHeader
|
||||
titleKey="client-scopes:addMapper"
|
||||
titleKey="common:addMapper"
|
||||
subKey="client-scopes:addMapperExplain"
|
||||
/>
|
||||
<PageSection variant="light">
|
||||
|
@ -156,11 +156,11 @@ export const RoleMappingForm = () => {
|
|||
role="manage-clients"
|
||||
>
|
||||
<FormGroup
|
||||
label={t("protocolMapper")}
|
||||
label={t("common:mapperType")}
|
||||
labelIcon={
|
||||
<HelpItem
|
||||
helpText="client-scopes-help:protocolMapper"
|
||||
forLabel={t("protocolMapper")}
|
||||
forLabel={t("common:mapperType")}
|
||||
forID="protocolMapper"
|
||||
/>
|
||||
}
|
||||
|
|
|
@ -75,9 +75,12 @@ export const MapperList = ({ clientScope, refresh }: MapperListProps) => {
|
|||
mappers as ProtocolMapperRepresentation[]
|
||||
);
|
||||
refresh();
|
||||
addAlert(t("mappingCreatedSuccess"), AlertVariant.success);
|
||||
addAlert(t("common:mappingCreatedSuccess"), AlertVariant.success);
|
||||
} catch (error) {
|
||||
addAlert(t("mappingCreatedError", { error }), AlertVariant.danger);
|
||||
addAlert(
|
||||
t("common:mappingCreatedError", { error }),
|
||||
AlertVariant.danger
|
||||
);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -119,7 +122,7 @@ export const MapperList = ({ clientScope, refresh }: MapperListProps) => {
|
|||
key={key}
|
||||
loader={loader}
|
||||
ariaLabelKey="client-scopes:clientScopeList"
|
||||
searchPlaceholderKey="client-scopes:mappersSearchFor"
|
||||
searchPlaceholderKey="common:searchForMapper"
|
||||
toolbarItem={
|
||||
<Dropdown
|
||||
onSelect={() => setMapperAction(false)}
|
||||
|
@ -130,7 +133,7 @@ export const MapperList = ({ clientScope, refresh }: MapperListProps) => {
|
|||
onToggle={() => setMapperAction(!mapperAction)}
|
||||
toggleIndicator={CaretDownIcon}
|
||||
>
|
||||
{t("addMapper")}
|
||||
{t("common:addMapper")}
|
||||
</DropdownToggle>
|
||||
}
|
||||
isOpen={mapperAction}
|
||||
|
@ -159,11 +162,14 @@ export const MapperList = ({ clientScope, refresh }: MapperListProps) => {
|
|||
id: clientScope.id!,
|
||||
mapperId: mapper.id!,
|
||||
});
|
||||
addAlert(t("mappingDeletedSuccess"), AlertVariant.success);
|
||||
addAlert(
|
||||
t("common:mappingDeletedSuccess"),
|
||||
AlertVariant.success
|
||||
);
|
||||
refresh();
|
||||
} catch (error) {
|
||||
addAlert(
|
||||
t("mappingDeletedError", { error }),
|
||||
t("common:mappingDeletedError", { error }),
|
||||
AlertVariant.danger
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React, { useEffect, useState } from "react";
|
||||
import { useHistory, useParams, useRouteMatch } from "react-router-dom";
|
||||
import { useHistory, useParams } from "react-router-dom";
|
||||
import { useTranslation } from "react-i18next";
|
||||
import { useErrorHandler } from "react-error-boundary";
|
||||
import {
|
||||
|
@ -109,8 +109,8 @@ export const MappingDetails = () => {
|
|||
}, []);
|
||||
|
||||
const [toggleDeleteDialog, DeleteConfirm] = useConfirmDialog({
|
||||
titleKey: "client-scopes:deleteMappingTitle",
|
||||
messageKey: "client-scopes:deleteMappingConfirm",
|
||||
titleKey: "common:deleteMappingTitle",
|
||||
messageKey: "common:deleteMappingConfirm",
|
||||
continueButtonLabel: "common:delete",
|
||||
continueButtonVariant: ButtonVariant.danger,
|
||||
onConfirm: async () => {
|
||||
|
@ -119,10 +119,13 @@ export const MappingDetails = () => {
|
|||
id,
|
||||
mapperId: mapperId,
|
||||
});
|
||||
addAlert(t("mappingDeletedSuccess"), AlertVariant.success);
|
||||
addAlert(t("common:mappingDeletedSuccess"), AlertVariant.success);
|
||||
history.push(`/${realm}/client-scopes/${id}/mappers`);
|
||||
} catch (error) {
|
||||
addAlert(t("mappingDeletedError", { error }), AlertVariant.danger);
|
||||
addAlert(
|
||||
t("common:mappingDeletedError", { error }),
|
||||
AlertVariant.danger
|
||||
);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
@ -150,7 +153,7 @@ export const MappingDetails = () => {
|
|||
<>
|
||||
<DeleteConfirm />
|
||||
<ViewHeader
|
||||
titleKey={mapping ? mapping.name! : t("addMapper")}
|
||||
titleKey={mapping ? mapping.name! : t("common:addMapper")}
|
||||
subKey={mapperId.match(isGuid) ? mapperId : ""}
|
||||
badge={mapping?.protocol}
|
||||
dropdownItems={
|
||||
|
|
|
@ -9,11 +9,6 @@
|
|||
"deletedSuccess": "The client scope has been deleted",
|
||||
"deleteError": "Could not delete client scope: {{error}}",
|
||||
"includeInTokenScope": "Include in token scope",
|
||||
"mappingDetails": "Mapper details",
|
||||
"mappingCreatedSuccess": "Mapping successfully created",
|
||||
"mappingCreatedError": "Could not create mapping: '{{error}}'",
|
||||
"deleteMappingTitle": "Delete mapping?",
|
||||
"deleteMappingConfirm": "Are you sure you want to delete this mapping?",
|
||||
"mappingUpdatedSuccess": "Mapping successfully updated",
|
||||
"mappingUpdatedError": "Could not update mapping: '{{error}}'",
|
||||
"realmRolePrefix": "Realm role prefix",
|
||||
|
@ -28,10 +23,7 @@
|
|||
"createError": "Could not create client scope: '{{error}}'",
|
||||
"updateSuccess": "Client scope updated",
|
||||
"updateError": "Could not update client scope: '{{error}}'",
|
||||
"mappersSearchFor": "Search for mapper",
|
||||
"addMapper": "Add mapper",
|
||||
"addMapperExplain": "If you want more fine-grain control, you can create protocol mapper on this client",
|
||||
"protocolMapper": "Mapper type",
|
||||
"realmRoles": "Realm roles",
|
||||
"selectARole": "Select a role",
|
||||
"clientRoles": "Client roles",
|
||||
|
@ -48,8 +40,6 @@
|
|||
"emptyBuiltInMappersInstructions": "All built in mappers were added to this client",
|
||||
"emptyPrimaryAction": "Add predefined mapper",
|
||||
"emptySecondaryAction": "Configure a new mapper",
|
||||
"mappingDeletedSuccess": "Mapping successfully deleted",
|
||||
"mappingDeletedError": "Could not delete mapping: '{{error}}'",
|
||||
"displayOnConsentScreen": "Display on consent screen",
|
||||
"consentScreenText": "Consent screen text",
|
||||
"guiOrder": "Display Order",
|
||||
|
|
|
@ -22,11 +22,11 @@ export const ClientDescription = () => {
|
|||
labelIcon={
|
||||
<HelpItem
|
||||
helpText="clients-help:clientID"
|
||||
forLabel={t("clientID")}
|
||||
forLabel={t("common:clientID")}
|
||||
forID="kc-client-id"
|
||||
/>
|
||||
}
|
||||
label={t("clientID")}
|
||||
label={t("common:clientID")}
|
||||
fieldId="kc-client-id"
|
||||
helperTextInvalid={t("common:required")}
|
||||
validated={
|
||||
|
|
|
@ -144,7 +144,7 @@ export const ClientsSection = () => {
|
|||
columns={[
|
||||
{
|
||||
name: "clientId",
|
||||
displayKey: "clients:clientID",
|
||||
displayKey: "common:clientID",
|
||||
cellRenderer: ClientDetailLink,
|
||||
},
|
||||
{ name: "protocol", displayKey: "common:type" },
|
||||
|
|
|
@ -74,7 +74,7 @@ export const InitialAccessTokenList = () => {
|
|||
columns={[
|
||||
{
|
||||
name: "id",
|
||||
displayKey: "clients:id",
|
||||
displayKey: "common:id",
|
||||
},
|
||||
{
|
||||
name: "timestamp",
|
||||
|
|
|
@ -5,7 +5,6 @@
|
|||
"implicitFlow": "Implicit flow",
|
||||
"createClient": "Create client",
|
||||
"importClient": "Import client",
|
||||
"clientID": "Client ID",
|
||||
"homeURL": "Home URL",
|
||||
"webOrigins": "Web origins",
|
||||
"addWebOrigins": "Add web origins",
|
||||
|
@ -86,7 +85,6 @@
|
|||
"tokenDeleteConfirmTitle": "Delete initial access token?",
|
||||
"tokenDeleteSuccess": "initial access token created successfully",
|
||||
"tokenDeleteError": "Could not delete initial access token: '{{error}}'",
|
||||
"id": "ID",
|
||||
"timestamp": "Created date",
|
||||
"expires": "Expires",
|
||||
"count": "Count",
|
||||
|
|
|
@ -105,6 +105,11 @@
|
|||
"searchForMapper": "Search for mapper",
|
||||
"mapperType": "Mapper type",
|
||||
"mappingDeletedSuccess": "Mapping successfully deleted",
|
||||
"mappingDeletedError": "Could not delete mapping: '{{error}}'"
|
||||
"mappingDeletedError": "Could not delete mapping: '{{error}}'",
|
||||
"mappingDetails": "Mapper details",
|
||||
"mappingCreatedSuccess": "Mapping successfully created",
|
||||
"mappingCreatedError": "Could not create mapping: '{{error}}'",
|
||||
"deleteMappingTitle": "Delete mapping?",
|
||||
"deleteMappingConfirm": "Are you sure you want to delete this mapping?"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -107,7 +107,7 @@ export type DataListProps<T> = {
|
|||
* <KeycloakDataTable columns={[
|
||||
* {
|
||||
* name: "clientId", //name of the field from the array of object the loader returns to display in this column
|
||||
* displayKey: "clients:clientID", //i18n key to use to lookup the name of the column header
|
||||
* displayKey: "common:clientID", //i18n key to use to lookup the name of the column header
|
||||
* cellRenderer: ClientDetailLink, //optionally you can use a component to render the column when you don't want just the content of the field, the whole row / entire object is passed in.
|
||||
* }
|
||||
* ]}
|
||||
|
|
|
@ -174,7 +174,7 @@ export const GroupsSection = () => {
|
|||
<Tab
|
||||
data-testid="attributes"
|
||||
eventKey={2}
|
||||
title={<TabTitleText>{t("attributes")}</TabTitleText>}
|
||||
title={<TabTitleText>{t("common:attributes")}</TabTitleText>}
|
||||
>
|
||||
<GroupAttributes />
|
||||
</Tab>
|
||||
|
|
|
@ -327,7 +327,7 @@ export const RealmRoleTabs = () => {
|
|||
) : null}
|
||||
<Tab
|
||||
eventKey="attributes"
|
||||
title={<TabTitleText>{t("attributes")}</TabTitleText>}
|
||||
title={<TabTitleText>{t("common:attributes")}</TabTitleText>}
|
||||
>
|
||||
<AttributesForm
|
||||
form={form}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
"roles": {
|
||||
"attributes": "Attributes",
|
||||
"addAttributeText": "Add an attribute",
|
||||
"deleteAttributeText": "Delete an attribute",
|
||||
"associatedRolesText": "Associated roles",
|
||||
|
@ -59,7 +58,6 @@
|
|||
"noDirectUsers": "No direct users",
|
||||
"noUsersEmptyStateDescription": "Only the users with this role directly assigned will appear under this tab. If you need to find users assigned to this role, go to",
|
||||
"noUsersEmptyStateDescriptionContinued": "to find them. Users that already have this role as an effective role cannot be added here.",
|
||||
"id": "ID",
|
||||
"groups": "Groups",
|
||||
"or": "or",
|
||||
"users": "Users",
|
||||
|
|
|
@ -96,13 +96,13 @@ export const routes: RoutesFn = (t: TFunction) => [
|
|||
{
|
||||
path: "/:realm/client-scopes/:id/mappers/oidc-role-name-mapper",
|
||||
component: RoleMappingForm,
|
||||
breadcrumb: t("client-scopes:mappingDetails"),
|
||||
breadcrumb: t("common:mappingDetails"),
|
||||
access: "view-clients",
|
||||
},
|
||||
{
|
||||
path: "/:realm/client-scopes/:id/mappers/:mapperId",
|
||||
component: MappingDetails,
|
||||
breadcrumb: t("client-scopes:mappingDetails"),
|
||||
breadcrumb: t("common:mappingDetails"),
|
||||
access: "view-clients",
|
||||
},
|
||||
{
|
||||
|
@ -228,7 +228,7 @@ export const routes: RoutesFn = (t: TFunction) => [
|
|||
{
|
||||
path: "/:realm/user-federation/ldap/:id/:tab/:mapperId",
|
||||
component: LdapMappingDetails,
|
||||
breadcrumb: t("client-scopes:mappingDetails"),
|
||||
breadcrumb: t("common:mappingDetails"),
|
||||
access: "view-realm",
|
||||
},
|
||||
{
|
||||
|
|
|
@ -26,7 +26,7 @@ SimpleList.args = {
|
|||
ariaLabelKey: "clients:clientList",
|
||||
searchPlaceholderKey: "common:search",
|
||||
columns: [
|
||||
{ name: "clientId", displayKey: "clients:clientID" },
|
||||
{ name: "clientId", displayKey: "common:clientID" },
|
||||
{ name: "protocol", displayKey: "common:type" },
|
||||
{
|
||||
name: "description",
|
||||
|
|
|
@ -146,7 +146,7 @@ export const RoleMappingForm = () => {
|
|||
return (
|
||||
<>
|
||||
<ViewHeader
|
||||
titleKey="client-scopes:addMapper"
|
||||
titleKey="common:addMapper"
|
||||
subKey="client-scopes:addMapperExplain"
|
||||
/>
|
||||
<PageSection variant="light">
|
||||
|
@ -156,11 +156,11 @@ export const RoleMappingForm = () => {
|
|||
role="manage-clients"
|
||||
>
|
||||
<FormGroup
|
||||
label={t("protocolMapper")}
|
||||
label={t("common:mapperType")}
|
||||
labelIcon={
|
||||
<HelpItem
|
||||
helpText="client-scopes-help:protocolMapper"
|
||||
forLabel={t("protocolMapper")}
|
||||
forLabel={t("common:mapperType")}
|
||||
forID="protocolMapper"
|
||||
/>
|
||||
}
|
||||
|
|
|
@ -157,7 +157,6 @@
|
|||
"roleObjectClasses": "Role object classes",
|
||||
"userRolesRetrieveStrategy": "User roles retrieve strategy",
|
||||
"useRealmRolesMapping": "Use realm roles mapping",
|
||||
"clientId": "Client ID",
|
||||
|
||||
"ldapAttributeName": "LDAP attribute name",
|
||||
"ldapAttributeValue": "LDAP attribute value",
|
||||
|
|
|
@ -100,7 +100,7 @@ export const UserForm = ({
|
|||
{editMode ? (
|
||||
<>
|
||||
<FormGroup
|
||||
label={t("id")}
|
||||
label={t("common:id")}
|
||||
fieldId="kc-id"
|
||||
isRequired
|
||||
validated={errors.id ? "error" : "default"}
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
"removedGroupMembershipError": "Error removing group membership",
|
||||
"path": "Path",
|
||||
"emptyInstructions": "Change your search criteria or add a user",
|
||||
"id": "ID",
|
||||
"createdAt": "Created at",
|
||||
"username": "Username",
|
||||
"email": "Email",
|
||||
|
|
Loading…
Reference in a new issue