Remove the last of the namespaces for localization (#23261)

Closes #23261
This commit is contained in:
Erik Jan de Wit 2023-09-25 09:06:56 +02:00 committed by GitHub
parent a584ff94a3
commit c346786491
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
128 changed files with 479 additions and 618 deletions

View file

@ -17,7 +17,7 @@ export default class CreateUserPage {
this.searchPgCreateUserBtn = "create-new-user";
this.addUserBtn = "add-user";
this.joinGroupsBtn = "join-groups-button";
this.joinBtn = "users:join-button";
this.joinBtn = "join-button";
this.saveBtn = "create-user";
this.cancelBtn = "cancel-create-user";
}

View file

@ -6,7 +6,7 @@ export default class UserGroupsPage {
#userGroupsTab = "user-groups-tab";
#noGroupsAddGroupButton = "no-groups-empty-action";
#addGroupButton = "add-group-button";
#joinGroupButton = "users:join-button";
#joinGroupButton = "join-button";
#leaveGroupButton = "leave-group-button";
goToGroupsTab() {

View file

@ -27,14 +27,14 @@ export const ClientSessions = ({ client }: ClientSessionsProps) => {
const allSessions = await Promise.all([
adminClient.clients
.listSessions({ id: client.id!, first, max })
.then(mapSessionsToType(t("sessions:sessionsType.regularSSO"))),
.then(mapSessionsToType(t("sessionsType.regularSSO"))),
adminClient.clients
.listOfflineSessions({
id: client.id!,
first,
max,
})
.then(mapSessionsToType(t("sessions:sessionsType.offline"))),
.then(mapSessionsToType(t("sessionsType.offline"))),
]);
return allSessions.flat();

View file

@ -49,7 +49,7 @@ export default function CreateClientRole() {
}),
);
} catch (error) {
addError("roles:roleCreateError", error);
addError("roleCreateError", error);
}
};

View file

@ -21,7 +21,7 @@ const RealmRoleTabs = lazy(() => import("../../realm-roles/RealmRoleTabs"));
export const ClientRoleRoute: AppRouteObject = {
path: "/:realm/clients/:clientId/roles/:id/:tab" as const,
element: <RealmRoleTabs />,
breadcrumb: (t) => t("roles:roleDetails"),
breadcrumb: (t) => t("roleDetails"),
handle: {
access: "view-clients",
},

View file

@ -10,7 +10,7 @@ const CreateClientRole = lazy(() => import("../roles/CreateClientRole"));
export const NewRoleRoute: AppRouteObject = {
path: "/:realm/clients/:clientId/roles/new",
element: <CreateClientRole />,
breadcrumb: (t) => t("roles:createRole"),
breadcrumb: (t) => t("createRole"),
handle: {
access: "manage-clients",
},

View file

@ -180,7 +180,7 @@ export const GroupPickerDialog = ({
setNavigation([]);
setGroupId(undefined);
}}
inputGroupPlaceholder={t("users:searchForGroups")}
inputGroupPlaceholder={t("searchForGroups")}
>
<Breadcrumb>
{navigation.length > 0 && (

View file

@ -88,8 +88,8 @@ export const RolesList = ({
);
const [toggleDeleteDialog, DeleteConfirm] = useConfirmDialog({
titleKey: "roles:roleDeleteConfirm",
messageKey: t("roles:roleDeleteConfirmDialog", {
titleKey: "roleDeleteConfirm",
messageKey: t("roleDeleteConfirmDialog", {
selectedRoleName: selectedRole ? selectedRole!.name : "",
}),
continueButtonLabel: "delete",
@ -106,9 +106,9 @@ export const RolesList = ({
]);
}
setSelectedRole(undefined);
addAlert(t("roles:roleDeletedSuccess"), AlertVariant.success);
addAlert(t("roleDeletedSuccess"), AlertVariant.success);
} catch (error) {
addError("roles:roleDeleteError", error);
addError("roleDeleteError", error);
}
},
});
@ -123,7 +123,7 @@ export const RolesList = ({
<KeycloakDataTable
key={selectedRole ? selectedRole.id : "roleList"}
loader={loader!}
ariaLabelKey="roles:roleList"
ariaLabelKey="roleList"
searchPlaceholderKey="searchForRoles"
isPaginated={paginated}
toolbarItem={
@ -160,7 +160,7 @@ export const RolesList = ({
columns={[
{
name: "name",
displayKey: "roles:roleName",
displayKey: "roleName",
cellRenderer: (row) => (
<RoleDetailLink
{...row}
@ -172,7 +172,7 @@ export const RolesList = ({
},
{
name: "composite",
displayKey: "roles:composite",
displayKey: "composite",
cellFormatters: [upperCaseFormatter(), emptyFormatter()],
},
{

View file

@ -128,25 +128,25 @@ export function UserDataTable() {
});
} catch (error) {
if (userStorage?.length) {
addError("users:noUsersFoundErrorStorage", error);
addError("noUsersFoundErrorStorage", error);
} else {
addError("users:noUsersFoundError", error);
addError("noUsersFoundError", error);
}
return [];
}
};
const [toggleUnlockUsersDialog, UnlockUsersConfirm] = useConfirmDialog({
titleKey: "users:unlockAllUsers",
messageKey: "users:unlockUsersConfirm",
continueButtonLabel: "users:unlock",
titleKey: "unlockAllUsers",
messageKey: "unlockUsersConfirm",
continueButtonLabel: "unlock",
onConfirm: async () => {
try {
await adminClient.attackDetection.delAll();
refresh();
addAlert(t("unlockUsersSuccess"), AlertVariant.success);
} catch (error) {
addError("users:unlockUsersError", error);
addError("unlockUsersError", error);
}
},
});
@ -165,7 +165,7 @@ export function UserDataTable() {
clearAllFilters();
addAlert(t("userDeletedSuccess"), AlertVariant.success);
} catch (error) {
addError("users:userDeletedError", error);
addError("userDeletedError", error);
}
},
});
@ -368,27 +368,27 @@ export function UserDataTable() {
columns={[
{
name: "username",
displayKey: "users:username",
displayKey: "username",
cellRenderer: UserDetailLink,
},
{
name: "email",
displayKey: "users:email",
displayKey: "email",
cellRenderer: ValidatedEmail,
},
{
name: "lastName",
displayKey: "users:lastName",
displayKey: "lastName",
cellFormatters: [emptyFormatter()],
},
{
name: "firstName",
displayKey: "users:firstName",
displayKey: "firstName",
cellFormatters: [emptyFormatter()],
},
{
name: "status",
displayKey: "users:status",
displayKey: "status",
cellRenderer: StatusRow,
},
]}

View file

@ -264,8 +264,8 @@ export const Members = () => {
]}
emptyState={
<ListEmptyState
message={t("users:noUsersFound")}
instructions={isManager ? t("users:emptyInstructions") : undefined}
message={t("noUsersFound")}
instructions={isManager ? t("emptyInstructions") : undefined}
primaryActionText={isManager ? t("addMember") : undefined}
onPrimaryAction={() => setAddMembers(true)}
secondaryActions={[

View file

@ -86,32 +86,32 @@ export const MemberModal = ({ groupId, onClose }: MemberModalProps) => {
loader={loader}
isPaginated
ariaLabelKey="titleUsers"
searchPlaceholderKey="users:searchForUser"
searchPlaceholderKey="searchForUser"
canSelectAll
onSelect={(rows) => setSelectedRows([...rows])}
emptyState={
<ListEmptyState
message={t("users:noUsersFound")}
instructions={t("users:emptyInstructions")}
message={t("noUsersFound")}
instructions={t("emptyInstructions")}
/>
}
columns={[
{
name: "username",
displayKey: "users:username",
displayKey: "username",
},
{
name: "email",
displayKey: "users:email",
displayKey: "email",
},
{
name: "lastName",
displayKey: "users:lastName",
displayKey: "lastName",
cellFormatters: [emptyFormatter()],
},
{
name: "firstName",
displayKey: "users:firstName",
displayKey: "firstName",
cellFormatters: [emptyFormatter()],
},
]}

View file

@ -136,7 +136,7 @@ export default function IdentityProvidersSection() {
));
const [toggleDeleteDialog, DeleteConfirm] = useConfirmDialog({
titleKey: "identity-providers:deleteProvider",
titleKey: "deleteProvider",
messageKey: t("deleteConfirm", { provider: selectedProvider?.alias }),
continueButtonLabel: "delete",
continueButtonVariant: ButtonVariant.danger,
@ -174,7 +174,7 @@ export default function IdentityProvidersSection() {
)}
<ViewHeader
titleKey="identityProviders"
subKey="identity-providers:listExplain"
subKey="listExplain"
helpUrl={helpUrls.identityProvidersUrl}
/>
<PageSection
@ -220,7 +220,7 @@ export default function IdentityProvidersSection() {
<KeycloakDataTable
loader={providers}
ariaLabelKey="identityProviders"
searchPlaceholderKey="identity-providers:searchForProvider"
searchPlaceholderKey="searchForProvider"
toolbarItem={
<>
<ToolbarItem>
@ -267,7 +267,7 @@ export default function IdentityProvidersSection() {
},
{
name: "providerId",
displayKey: "identity-providers:providerDetails",
displayKey: "providerDetails",
cellFormatters: [upperCaseFormatter()],
},
]}

View file

@ -79,7 +79,7 @@ export const ManageOrderDialog = ({
await Promise.all(updates);
addAlert(t("orderChangeSuccess"));
} catch (error) {
addError("identity-providers:orderChangeError", error);
addError("orderChangeError", error);
}
onClose();

View file

@ -117,8 +117,8 @@ export default function AddMapper() {
};
const [toggleDeleteMapperDialog, DeleteMapperConfirm] = useConfirmDialog({
titleKey: "identity-providers:deleteProviderMapper",
messageKey: t("identity-providers:deleteMapperConfirm", {
titleKey: "deleteProviderMapper",
messageKey: t("deleteMapperConfirm", {
mapper: currentMapper?.name,
}),
continueButtonLabel: "delete",

View file

@ -74,7 +74,7 @@ export const AddMapperForm = ({
labelIcon={
<HelpItem
helpText={t("syncModeOverrideHelp")}
fieldLabelId="identity-providers:syncModeOverride"
fieldLabelId="syncModeOverride"
/>
}
fieldId="syncMode"
@ -116,10 +116,7 @@ export const AddMapperForm = ({
<FormGroup
label={t("mapperType")}
labelIcon={
<HelpItem
helpText={mapperType.helpText}
fieldLabelId="identity-providers:mapperType"
/>
<HelpItem helpText={mapperType.helpText} fieldLabelId="mapperType" />
}
fieldId="identityProviderMapper"
>

View file

@ -42,12 +42,7 @@ const LoginFlow = ({
return (
<FormGroup
label={t(label)}
labelIcon={
<HelpItem
helpText={t(`${label}Help`)}
fieldLabelId={`identity-providers:${label}`}
/>
}
labelIcon={<HelpItem helpText={t(`${label}Help`)} fieldLabelId={label} />}
fieldId={label}
>
<Controller
@ -166,11 +161,11 @@ export const AdvancedSettings = ({ isOIDC, isSAML }: AdvancedSettingsProps) => {
{(!isSAML || isOIDC) && claimFilterRequired && (
<>
<FormGroup
label={t("identity-providers:claimFilterName")}
label={t("claimFilterName")}
labelIcon={
<HelpItem
helpText={t("claimFilterNameHelp")}
fieldLabelId="identity-providers:claimFilterName"
fieldLabelId="claimFilterName"
/>
}
fieldId="kc-claim-filter-name"
@ -195,11 +190,11 @@ export const AdvancedSettings = ({ isOIDC, isSAML }: AdvancedSettingsProps) => {
/>
</FormGroup>
<FormGroup
label={t("identity-providers:claimFilterValue")}
label={t("claimFilterValue")}
labelIcon={
<HelpItem
helpText={t("claimFilterValueHelp")}
fieldLabelId="identity-providers:claimFilterName"
fieldLabelId="claimFilterName"
/>
}
fieldId="kc-claim-filter-value"
@ -240,10 +235,7 @@ export const AdvancedSettings = ({ isOIDC, isSAML }: AdvancedSettingsProps) => {
className="pf-u-pb-3xl"
label={t("syncMode")}
labelIcon={
<HelpItem
helpText={t("syncModeHelp")}
fieldLabelId="identity-providers:syncMode"
/>
<HelpItem helpText={t("syncModeHelp")} fieldLabelId="syncMode" />
}
fieldId="syncMode"
>

View file

@ -72,7 +72,7 @@ const Fields = ({ readOnly }: DescriptorSettingsProps) => {
labelIcon={
<HelpItem
helpText={t("serviceProviderEntityIdHelp")}
fieldLabelId="identity-providers:serviceProviderEntityId"
fieldLabelId="serviceProviderEntityId"
/>
}
>
@ -88,7 +88,7 @@ const Fields = ({ readOnly }: DescriptorSettingsProps) => {
labelIcon={
<HelpItem
helpText={t("identityProviderEntityIdHelp")}
fieldLabelId="identity-providers:identityProviderEntityId"
fieldLabelId="identityProviderEntityId"
/>
}
>
@ -103,7 +103,7 @@ const Fields = ({ readOnly }: DescriptorSettingsProps) => {
labelIcon={
<HelpItem
helpText={t("ssoServiceUrlHelp")}
fieldLabelId="identity-providers:ssoServiceUrl"
fieldLabelId="ssoServiceUrl"
/>
}
fieldId="kc-sso-service-url"
@ -133,7 +133,7 @@ const Fields = ({ readOnly }: DescriptorSettingsProps) => {
labelIcon={
<HelpItem
helpText={t("singleLogoutServiceUrlHelp")}
fieldLabelId="identity-providers:singleLogoutServiceUrl"
fieldLabelId="singleLogoutServiceUrl"
/>
}
fieldId="single-logout-service-url"
@ -163,7 +163,7 @@ const Fields = ({ readOnly }: DescriptorSettingsProps) => {
labelIcon={
<HelpItem
helpText={t("nameIdPolicyFormatHelp")}
fieldLabelId="identity-providers:nameIdPolicyFormat"
fieldLabelId="nameIdPolicyFormat"
/>
}
fieldId="kc-nameIdPolicyFormat"
@ -242,7 +242,7 @@ const Fields = ({ readOnly }: DescriptorSettingsProps) => {
labelIcon={
<HelpItem
helpText={t("principalTypeHelp")}
fieldLabelId="identity-providers:principalType"
fieldLabelId="principalType"
/>
}
fieldId="kc-principalType"
@ -297,7 +297,7 @@ const Fields = ({ readOnly }: DescriptorSettingsProps) => {
labelIcon={
<HelpItem
helpText={t("principalAttributeHelp")}
fieldLabelId="identity-providers:principalAttribute"
fieldLabelId="principalAttribute"
/>
}
fieldId="principalAttribute"
@ -347,7 +347,7 @@ const Fields = ({ readOnly }: DescriptorSettingsProps) => {
labelIcon={
<HelpItem
helpText={t("signatureAlgorithmHelp")}
fieldLabelId="identity-providers:signatureAlgorithm"
fieldLabelId="signatureAlgorithm"
/>
}
fieldId="kc-signatureAlgorithm"
@ -386,7 +386,7 @@ const Fields = ({ readOnly }: DescriptorSettingsProps) => {
labelIcon={
<HelpItem
helpText={t("samlSignatureKeyNameHelp")}
fieldLabelId="identity-providers:samlSignatureKeyName"
fieldLabelId="samlSignatureKeyName"
/>
}
fieldId="kc-samlSignatureKeyName"
@ -509,7 +509,7 @@ const Fields = ({ readOnly }: DescriptorSettingsProps) => {
labelIcon={
<HelpItem
helpText={t("allowedClockSkewHelp")}
fieldLabelId="identity-providers:allowedClockSkew"
fieldLabelId="allowedClockSkew"
/>
}
fieldId="allowedClockSkew"
@ -548,7 +548,7 @@ const Fields = ({ readOnly }: DescriptorSettingsProps) => {
labelIcon={
<HelpItem
helpText={t("attributeConsumingServiceIndexHelp")}
fieldLabelId="identity-providers:attributeConsumingServiceIndex"
fieldLabelId="attributeConsumingServiceIndex"
/>
}
fieldId="attributeConsumingServiceIndex"
@ -587,7 +587,7 @@ const Fields = ({ readOnly }: DescriptorSettingsProps) => {
labelIcon={
<HelpItem
helpText={t("attributeConsumingServiceNameHelp")}
fieldLabelId="identity-providers:attributeConsumingServiceName"
fieldLabelId="attributeConsumingServiceName"
/>
}
fieldId="attributeConsumingServiceName"

View file

@ -92,7 +92,7 @@ const Header = ({ onChange, value, save, toggleDeleteDialog }: HeaderProps) => {
);
const [toggleDisableDialog, DisableConfirm] = useConfirmDialog({
titleKey: "identity-providers:disableProvider",
titleKey: "disableProvider",
messageKey: t("disableConfirmIdentityProvider", { provider: displayName }),
continueButtonLabel: "disable",
onConfirm: () => {
@ -256,7 +256,7 @@ export default function DetailSettings() {
};
const [toggleDeleteDialog, DeleteConfirm] = useConfirmDialog({
titleKey: "identity-providers:deleteProvider",
titleKey: "deleteProvider",
messageKey: t("deleteConfirmIdentityProvider", { provider: alias }),
continueButtonLabel: "delete",
continueButtonVariant: ButtonVariant.danger,
@ -272,8 +272,8 @@ export default function DetailSettings() {
});
const [toggleDeleteMapperDialog, DeleteMapperConfirm] = useConfirmDialog({
titleKey: "identity-providers:deleteProviderMapper",
messageKey: t("identity-providers:deleteMapperConfirm", {
titleKey: "deleteProviderMapper",
messageKey: t("deleteMapperConfirm", {
mapper: selectedMapper?.name,
}),
continueButtonLabel: "delete",
@ -436,9 +436,9 @@ export default function DetailSettings() {
<KeycloakDataTable
emptyState={
<ListEmptyState
message={t("identity-providers:noMappers")}
instructions={t("identity-providers:noMappersInstructions")}
primaryActionText={t("identity-providers:addMapper")}
message={t("noMappers")}
instructions={t("noMappersInstructions")}
primaryActionText={t("addMapper")}
onPrimaryAction={() =>
navigate(
toIdentityProviderAddMapper({
@ -453,8 +453,8 @@ export default function DetailSettings() {
}
loader={loader}
key={key}
ariaLabelKey="identity-providers:mappersList"
searchPlaceholderKey="identity-providers:searchForMapper"
ariaLabelKey="mappersList"
searchPlaceholderKey="searchForMapper"
toolbarItem={
<ToolbarItem>
<Button

View file

@ -158,7 +158,7 @@ const Fields = ({ readOnly }: DiscoverySettingsProps) => {
labelIcon={
<HelpItem
helpText={t("pkceMethodHelp")}
fieldLabelId="identity-providers:pkceMethod"
fieldLabelId="pkceMethod"
/>
}
fieldId="pkceMethod"

View file

@ -89,7 +89,7 @@ export const ExtendedNonDiscoverySettings = () => {
labelIcon={
<HelpItem
helpText={t("allowedClockSkewHelp")}
fieldLabelId="identity-providers:allowedClockSkew"
fieldLabelId="allowedClockSkew"
/>
}
fieldId="allowedClockSkew"

View file

@ -40,7 +40,7 @@ export const OIDCAuthentication = ({ create = true }: { create?: boolean }) => {
labelIcon={
<HelpItem
helpText={t("clientAuthenticationHelp")}
fieldLabelId="identity-providers:clientAuthentication"
fieldLabelId="clientAuthentication"
/>
}
fieldId="clientAuthentication"
@ -85,7 +85,7 @@ export const OIDCAuthentication = ({ create = true }: { create?: boolean }) => {
labelIcon={
<HelpItem
helpText={t("clientAssertionSigningAlgHelp")}
fieldLabelId="identity-providers:clientAssertionSigningAlg"
fieldLabelId="clientAssertionSigningAlg"
/>
}
fieldId="clientAssertionSigningAlg"

View file

@ -28,12 +28,7 @@ export const OIDCGeneralSettings = () => {
<FormGroup
label={t("alias")}
labelIcon={
<HelpItem
helpText={t("aliasHelp")}
fieldLabelId="identity-providers:alias"
/>
}
labelIcon={<HelpItem helpText={t("aliasHelp")} fieldLabelId="alias" />}
fieldId="alias"
isRequired
validated={

View file

@ -60,7 +60,7 @@ export const OpenIdConnectSettings = () => {
labelIcon={
<HelpItem
helpText={t("importConfigHelp")}
fieldLabelId="identity-providers:importConfig"
fieldLabelId="importConfig"
/>
}
validated={errors.discoveryError ? "error" : "default"}

View file

@ -22,10 +22,7 @@ export const ReqAuthnConstraints = () => {
<FormGroup
label={t("comparison")}
labelIcon={
<HelpItem
helpText={t("comparisonHelp")}
fieldLabelId="identity-providers:comparison"
/>
<HelpItem helpText={t("comparisonHelp")} fieldLabelId="comparison" />
}
fieldId="comparison"
>
@ -74,7 +71,7 @@ export const ReqAuthnConstraints = () => {
<MultiLineInput
name="config.authnContextClassRefs"
aria-label={t("identify-providers:authnContextClassRefs")}
addButtonLabel="identity-providers:addAuthnContextClassRef"
addButtonLabel="addAuthnContextClassRef"
data-testid="classref-field"
/>
</FormGroup>
@ -91,7 +88,7 @@ export const ReqAuthnConstraints = () => {
<MultiLineInput
name="config.authnContextDeclRefs"
aria-label={t("identify-providers:authnContextDeclRefs")}
addButtonLabel="identity-providers:addAuthnContextDeclRef"
addButtonLabel="addAuthnContextDeclRef"
data-testid="declref-field"
/>
</FormGroup>

View file

@ -86,7 +86,7 @@ export const SamlConnectSettings = () => {
labelIcon={
<HelpItem
helpText={t("serviceProviderEntityIdHelp")}
fieldLabelId="identity-providers:serviceProviderEntityId"
fieldLabelId="serviceProviderEntityId"
/>
}
isRequired
@ -111,7 +111,7 @@ export const SamlConnectSettings = () => {
labelIcon={
<HelpItem
helpText={t("importConfigHelp")}
fieldLabelId="identity-providers:importConfig"
fieldLabelId="importConfig"
/>
}
validated={errors.discoveryError ? "error" : "default"}

View file

@ -37,12 +37,7 @@ export const SamlGeneralSettings = ({
<FormGroup
label={t("alias")}
labelIcon={
<HelpItem
helpText={t("aliasHelp")}
fieldLabelId="identity-providers:alias"
/>
}
labelIcon={<HelpItem helpText={t("aliasHelp")} fieldLabelId="alias" />}
fieldId="alias"
isRequired
validated={
@ -73,10 +68,7 @@ export const SamlGeneralSettings = ({
label={t("endpoints")}
fieldId="endpoints"
labelIcon={
<HelpItem
helpText={t("aliasHelp")}
fieldLabelId="identity-providers:alias"
/>
<HelpItem helpText={t("aliasHelp")} fieldLabelId="alias" />
}
className="keycloak__identity-providers__saml_link"
>

View file

@ -26,10 +26,7 @@ export const ClientIdSecret = ({
<FormGroup
label={t("clientId")}
labelIcon={
<HelpItem
helpText={t("clientIdHelp")}
fieldLabelId="identity-providers:clientId"
/>
<HelpItem helpText={t("clientIdHelp")} fieldLabelId="clientId" />
}
fieldId="kc-client-id"
isRequired
@ -52,7 +49,7 @@ export const ClientIdSecret = ({
labelIcon={
<HelpItem
helpText={t("clientSecretHelp")}
fieldLabelId="identity-providers:clientSecret"
fieldLabelId="clientSecret"
/>
}
fieldId="kc-client-secret"

View file

@ -79,7 +79,7 @@ export const DiscoveryEndpointField = ({
? "useDiscoveryEndpointHelp"
: "useEntityDescriptorHelp",
)}
fieldLabelId="identity-providers:discoveryEndpoint"
fieldLabelId="discoveryEndpoint"
/>
}
>
@ -110,7 +110,7 @@ export const DiscoveryEndpointField = ({
? "discoveryEndpointHelp"
: "samlEntityDescriptorHelp",
)}
fieldLabelId="identity-providers:discoveryEndpoint"
fieldLabelId="discoveryEndpoint"
/>
}
validated={

View file

@ -15,7 +15,7 @@ export const DisplayOrder = () => {
labelIcon={
<HelpItem
helpText={t("displayOrderHelp")}
fieldLabelId="identity-providers:displayOrder"
fieldLabelId="displayOrder"
/>
}
fieldId="kc-display-order"

View file

@ -18,10 +18,7 @@ export const RedirectUrl = ({ id }: { id: string }) => {
<FormGroup
label={t("redirectURI")}
labelIcon={
<HelpItem
helpText={t("redirectURIHelp")}
fieldLabelId="identity-providers:redirectURI"
/>
<HelpItem helpText={t("redirectURIHelp")} fieldLabelId="redirectURI" />
}
fieldId="kc-redirect-uri"
>

View file

@ -15,7 +15,7 @@ const AddMapper = lazy(() => import("../add/AddMapper"));
export const IdentityProviderAddMapperRoute: AppRouteObject = {
path: "/:realm/identity-providers/:providerId/:alias/:tab/create",
element: <AddMapper />,
breadcrumb: (t) => t("identity-providers:addIdPMapper"),
breadcrumb: (t) => t("addIdPMapper"),
handle: {
access: "manage-identity-providers",
},

View file

@ -15,7 +15,7 @@ const AddMapper = lazy(() => import("../add/AddMapper"));
export const IdentityProviderEditMapperRoute: AppRouteObject = {
path: "/:realm/identity-providers/:providerId/:alias/mappers/:id",
element: <AddMapper />,
breadcrumb: (t) => t("identity-providers:editIdPMapper"),
breadcrumb: (t) => t("editIdPMapper"),
handle: {
access: "manage-identity-providers",
},

View file

@ -17,7 +17,7 @@ const DetailSettings = lazy(() => import("../add/DetailSettings"));
export const IdentityProviderRoute: AppRouteObject = {
path: "/:realm/identity-providers/:providerId/:alias/:tab",
element: <DetailSettings />,
breadcrumb: (t) => t("identity-providers:providerDetails"),
breadcrumb: (t) => t("providerDetails"),
handle: {
access: "view-identity-providers",
},

View file

@ -13,7 +13,7 @@ const AddIdentityProvider = lazy(() => import("../add/AddIdentityProvider"));
export const IdentityProviderCreateRoute: AppRouteObject = {
path: "/:realm/identity-providers/:providerId/add",
element: <AddIdentityProvider />,
breadcrumb: (t) => t("identity-providers:addProvider"),
breadcrumb: (t) => t("addProvider"),
handle: {
access: "manage-identity-providers",
},

View file

@ -10,7 +10,7 @@ const AddOpenIdConnect = lazy(() => import("../add/AddOpenIdConnect"));
export const IdentityProviderKeycloakOidcRoute: AppRouteObject = {
path: "/:realm/identity-providers/keycloak-oidc/add",
element: <AddOpenIdConnect />,
breadcrumb: (t) => t("identity-providers:addKeycloakOpenIdProvider"),
breadcrumb: (t) => t("addKeycloakOpenIdProvider"),
handle: {
access: "manage-identity-providers",
},

View file

@ -10,7 +10,7 @@ const AddOpenIdConnect = lazy(() => import("../add/AddOpenIdConnect"));
export const IdentityProviderOidcRoute: AppRouteObject = {
path: "/:realm/identity-providers/oidc/add",
element: <AddOpenIdConnect />,
breadcrumb: (t) => t("identity-providers:addOpenIdProvider"),
breadcrumb: (t) => t("addOpenIdProvider"),
handle: {
access: "manage-identity-providers",
},

View file

@ -10,7 +10,7 @@ const AddSamlConnect = lazy(() => import("../add/AddSamlConnect"));
export const IdentityProviderSamlRoute: AppRouteObject = {
path: "/:realm/identity-providers/saml/add",
element: <AddSamlConnect />,
breadcrumb: (t) => t("identity-providers:addSamlProvider"),
breadcrumb: (t) => t("addSamlProvider"),
handle: {
access: "manage-identity-providers",
},

View file

@ -40,7 +40,7 @@ export default function CreateRealmRole() {
addAlert(t("roleCreated"), AlertVariant.success);
navigate(toRealmRole({ realm, id: createdRole.id!, tab: "details" }));
} catch (error) {
addError("roles:roleCreateError", error);
addError("roleCreateError", error);
}
};

View file

@ -137,7 +137,7 @@ export default function RealmRoleTabs() {
setAttributes(attributes);
addAlert(t("roleSaveSuccess"), AlertVariant.success);
} catch (error) {
addError("roles:roleSaveError", error);
addError("roleSaveError", error);
}
};
@ -191,8 +191,8 @@ export default function RealmRoleTabs() {
const permissionsTab = useTab("permissions");
const [toggleDeleteDialog, DeleteConfirm] = useConfirmDialog({
titleKey: "roles:roleDeleteConfirm",
messageKey: t("roles:roleDeleteConfirmDialog", {
titleKey: "roleDeleteConfirm",
messageKey: t("roleDeleteConfirmDialog", {
selectedRoleName: roleName || t("createRole"),
}),
continueButtonLabel: "delete",
@ -210,7 +210,7 @@ export default function RealmRoleTabs() {
addAlert(t("roleDeletedSuccess"), AlertVariant.success);
navigate(toOverview());
} catch (error) {
addError("roles:roleDeleteError", error);
addError("roleDeleteError", error);
}
},
});
@ -222,7 +222,7 @@ export default function RealmRoleTabs() {
component="button"
onClick={() => toggleDeleteAllAssociatedRolesDialog()}
>
{t("roles:removeAllAssociatedRoles")}
{t("removeAllAssociatedRoles")}
</DropdownItem>,
<DropdownItem
key="delete-role"
@ -256,8 +256,8 @@ export default function RealmRoleTabs() {
toggleDeleteAllAssociatedRolesDialog,
DeleteAllAssociatedRolesConfirm,
] = useConfirmDialog({
titleKey: t("roles:removeAllAssociatedRoles") + "?",
messageKey: t("roles:removeAllAssociatedRolesConfirmDialog", {
titleKey: t("removeAllAssociatedRoles") + "?",
messageKey: t("removeAllAssociatedRolesConfirmDialog", {
name: roleName || t("createRole"),
}),
continueButtonLabel: "delete",
@ -276,7 +276,7 @@ export default function RealmRoleTabs() {
navigate(toTab("details"));
refresh();
} catch (error) {
addError("roles:roleDeleteError", error);
addError("roleDeleteError", error);
}
},
});
@ -295,7 +295,7 @@ export default function RealmRoleTabs() {
navigate(toTab("associated-roles"));
addAlert(t("addAssociatedRolesSuccess"), AlertVariant.success);
} catch (error) {
addError("roles:addAssociatedRolesError", error);
addError("addAssociatedRolesError", error);
}
};

View file

@ -33,7 +33,7 @@ export default function RealmRolesSection() {
<>
<ViewHeader
titleKey="titleRoles"
subKey="roles:roleExplain"
subKey="roleExplain"
helpUrl={helpUrls.realmRolesUrl}
/>
<PageSection variant="light" padding={{ default: "noPadding" }}>

View file

@ -48,7 +48,7 @@ export const UsersInRoleTab = () => {
<KeycloakDataTable
isPaginated
loader={loader}
ariaLabelKey="roles:roleList"
ariaLabelKey="roleList"
searchPlaceholderKey=""
toolbarItem={
enabled && (
@ -75,7 +75,7 @@ export const UsersInRoleTab = () => {
</Button>
</div>
}
footerContent={t("roles:whoWillAppearPopoverFooterText")}
footerContent={t("whoWillAppearPopoverFooterText")}
>
<Button
variant="link"
@ -118,22 +118,22 @@ export const UsersInRoleTab = () => {
columns={[
{
name: "username",
displayKey: "roles:userName",
displayKey: "userName",
cellFormatters: [emptyFormatter()],
},
{
name: "email",
displayKey: "roles:email",
displayKey: "email",
cellFormatters: [emptyFormatter()],
},
{
name: "lastName",
displayKey: "roles:lastName",
displayKey: "lastName",
cellFormatters: [emptyFormatter()],
},
{
name: "firstName",
displayKey: "roles:firstName",
displayKey: "firstName",
cellFormatters: [upperCaseFormatter(), emptyFormatter()],
},
]}

View file

@ -10,7 +10,7 @@ const CreateRealmRole = lazy(() => import("../CreateRealmRole"));
export const AddRoleRoute: AppRouteObject = {
path: "/:realm/roles/new",
element: <CreateRealmRole />,
breadcrumb: (t) => t("roles:createRole"),
breadcrumb: (t) => t("createRole"),
handle: {
access: "manage-realm",
},

View file

@ -22,7 +22,7 @@ const RealmRoleTabs = lazy(() => import("../RealmRoleTabs"));
export const RealmRoleRoute: AppRouteObject = {
path: "/:realm/roles/:id/:tab",
element: <RealmRoleTabs />,
breadcrumb: (t) => t("roles:roleDetails"),
breadcrumb: (t) => t("roleDetails"),
handle: {
access: ["view-realm", "view-users"],
},

View file

@ -10,7 +10,7 @@ const RealmRolesSection = lazy(() => import("../RealmRolesSection"));
export const RealmRolesRoute: AppRouteObject = {
path: "/:realm/roles",
element: <RealmRolesSection />,
breadcrumb: (t) => t("roles:realmRolesList"),
breadcrumb: (t) => t("realmRolesList"),
handle: {
access: "view-realm",
},

View file

@ -19,8 +19,7 @@ const AliasRenderer = ({ name, global }: ClientProfile) => {
return (
<>
{name}{" "}
{global && <Label color="blue">{t("realm-settings:global")}</Label>}
{name} {global && <Label color="blue">{t("global")}</Label>}
</>
);
};
@ -72,7 +71,7 @@ export const AddClientProfileModal = (props: AddClientProfileModalProps) => {
return (
<Modal
data-testid="addClientProfile"
title={t("realm-settings:addClientProfile")}
title={t("addClientProfile")}
isOpen={props.open}
onClose={props.toggleDialog}
variant={ModalVariant.large}
@ -102,8 +101,8 @@ export const AddClientProfileModal = (props: AddClientProfileModalProps) => {
>
<KeycloakDataTable
loader={loader}
ariaLabelKey="realm-settings:profilesList"
searchPlaceholderKey="realm-settings:searchProfile"
ariaLabelKey="profilesList"
searchPlaceholderKey="searchProfile"
canSelectAll
onSelect={(rows) => {
setSelectedRows([...rows]);
@ -111,7 +110,7 @@ export const AddClientProfileModal = (props: AddClientProfileModalProps) => {
columns={[
{
name: "name",
displayKey: "realm-settings:clientProfileName",
displayKey: "clientProfileName",
cellRenderer: AliasRenderer,
},
{

View file

@ -131,17 +131,15 @@ export default function ClientProfileForm() {
addAlert(
editMode
? t("realm-settings:updateClientProfileSuccess")
: t("realm-settings:createClientProfileSuccess"),
? t("updateClientProfileSuccess")
: t("createClientProfileSuccess"),
AlertVariant.success,
);
navigate(toClientProfile({ realm, profileName: form.name }));
} catch (error) {
addError(
editMode
? "realm-settings:updateClientProfileError"
: "realm-settings:createClientProfileError",
editMode ? "updateClientProfileError" : "createClientProfileError",
error,
);
}
@ -267,7 +265,7 @@ export default function ClientProfileForm() {
isDisabled={!isDirty}
onClick={reload}
>
{t("realm-settings:reload")}
{t("reload")}
</Button>
)}
{!editMode && !isGlobalProfile && (
@ -294,7 +292,7 @@ export default function ClientProfileForm() {
{t("executors")}
<HelpItem
helpText={t("executorsHelpText")}
fieldLabelId="realm-settings:executors"
fieldLabelId="executors"
/>
</Text>
</FlexItem>
@ -316,7 +314,7 @@ export default function ClientProfileForm() {
data-testid="addExecutor"
icon={<PlusCircleIcon />}
>
{t("realm-settings:addExecutor")}
{t("addExecutor")}
</Button>
</FlexItem>
)}
@ -368,7 +366,7 @@ export default function ClientProfileForm() {
<HelpItem
key={type.id}
helpText={type.helpText}
fieldLabelId="realm-settings:executorTypeTextHelpText"
fieldLabelId="executorTypeTextHelpText"
/>
{!isGlobalProfile && (
<Button
@ -413,7 +411,7 @@ export default function ClientProfileForm() {
className="kc-backToPolicies"
data-testid="backToClientPolicies"
>
{t("realm-settings:back")}
{t("back")}
</Button>
)}
</>
@ -425,7 +423,7 @@ export default function ClientProfileForm() {
className="kc-emptyExecutors"
component={TextVariants.h2}
>
{t("realm-settings:emptyExecutors")}
{t("emptyExecutors")}
</Text>
</>
)}

View file

@ -75,7 +75,7 @@ export const DefaultsGroupsTab = () => {
);
setSelectedRows([]);
} catch (error) {
addError("realm-settings:groupRemoveError", error);
addError("groupRemoveError", error);
}
reload();
};
@ -95,7 +95,7 @@ export const DefaultsGroupsTab = () => {
AlertVariant.success,
);
} catch (error) {
addError("realm-settings:defaultGroupAddedError", error);
addError("defaultGroupAddedError", error);
}
reload();
};
@ -119,7 +119,7 @@ export const DefaultsGroupsTab = () => {
<GroupPickerDialog
type="selectMany"
text={{
title: "realm-settings:addDefaultGroups",
title: "addDefaultGroups",
ok: "add",
}}
onConfirm={(groups) => {
@ -155,8 +155,8 @@ export const DefaultsGroupsTab = () => {
canSelectAll
onSelect={(rows) => setSelectedRows([...rows])}
loader={loader}
ariaLabelKey="realm-settings:defaultGroups"
searchPlaceholderKey="realm-settings:searchForGroups"
ariaLabelKey="defaultGroups"
searchPlaceholderKey="searchForGroups"
toolbarItem={
<>
<ToolbarItem>
@ -219,7 +219,7 @@ export const DefaultsGroupsTab = () => {
hasIcon
message={t("noDefaultGroups")}
instructions={
<Trans i18nKey="realm-settings:noDefaultGroupsInstructions">
<Trans i18nKey="noDefaultGroupsInstructions">
{" "}
<Link
className="pf-u-font-weight-light"

View file

@ -93,7 +93,7 @@ export const RealmSettingsEmailTab = ({
);
addAlert(t("testConnectionSuccess"), AlertVariant.success);
} catch (error) {
addError("realm-settings:testConnectionError", error);
addError("testConnectionError", error);
}
toggleTest();
};
@ -112,7 +112,7 @@ export const RealmSettingsEmailTab = ({
fieldId="kc-display-name"
isRequired
validated={errors.smtpServer?.from ? "error" : "default"}
helperTextInvalid={t("users:emailInvalid")}
helperTextInvalid={t("emailInvalid")}
>
<KeycloakTextInput
type="email"
@ -132,7 +132,7 @@ export const RealmSettingsEmailTab = ({
labelIcon={
<HelpItem
helpText={t("fromDisplayNameHelp")}
fieldLabelId="realm-settings:authentication"
fieldLabelId="authentication"
/>
}
>
@ -147,7 +147,7 @@ export const RealmSettingsEmailTab = ({
label={t("replyTo")}
fieldId="kc-reply-to"
validated={errors.smtpServer?.replyTo ? "error" : "default"}
helperTextInvalid={t("users:emailInvalid")}
helperTextInvalid={t("emailInvalid")}
>
<KeycloakTextInput
type="email"
@ -165,7 +165,7 @@ export const RealmSettingsEmailTab = ({
labelIcon={
<HelpItem
helpText={t("replyToDisplayNameHelp")}
fieldLabelId="realm-settings:replyToDisplayName"
fieldLabelId="replyToDisplayName"
/>
}
>
@ -181,7 +181,7 @@ export const RealmSettingsEmailTab = ({
labelIcon={
<HelpItem
helpText={t("envelopeFromHelp")}
fieldLabelId="realm-settings:envelopeFrom"
fieldLabelId="envelopeFrom"
/>
}
>
@ -304,7 +304,7 @@ export const RealmSettingsEmailTab = ({
labelIcon={
<HelpItem
helpText={t("passwordHelp")}
fieldLabelId="realm-settings:password"
fieldLabelId="password"
/>
}
>

View file

@ -119,20 +119,13 @@ export default function ExecutorForm() {
globalProfiles: globalProfiles,
});
addAlert(
editMode
? t("realm-settings:updateExecutorSuccess")
: t("realm-settings:addExecutorSuccess"),
editMode ? t("updateExecutorSuccess") : t("addExecutorSuccess"),
AlertVariant.success,
);
navigate(toClientProfile({ realm, profileName }));
} catch (error) {
addError(
editMode
? "realm-settings:updateExecutorError"
: "realm-settings:addExecutorError",
error,
);
addError(editMode ? "updateExecutorError" : "addExecutorError", error);
}
};
@ -175,12 +168,12 @@ export default function ExecutorForm() {
executors.length > 0 && executors[0].helpText! !== "" ? (
<HelpItem
helpText={executors[0].helpText}
fieldLabelId="realm-settings:executorTypeHelpText"
fieldLabelId="executorTypeHelpText"
/>
) : editMode ? (
<HelpItem
helpText={profileExecutorType?.helpText}
fieldLabelId="realm-settings:executorTypeHelpText"
fieldLabelId="executorTypeHelpText"
/>
) : undefined
}
@ -264,7 +257,7 @@ export default function ExecutorForm() {
)}
variant="primary"
>
{t("realm-settings:back")}
{t("back")}
</Button>
</div>
)}

View file

@ -123,7 +123,7 @@ export const RealmSettingsGeneralTab = ({
labelIcon={
<HelpItem
helpText={t("frontendUrlHelp")}
fieldLabelId="realm-settings:frontendUrl"
fieldLabelId="frontendUrl"
/>
}
>
@ -139,7 +139,7 @@ export const RealmSettingsGeneralTab = ({
labelIcon={
<HelpItem
helpText={t("requireSslHelp")}
fieldLabelId="realm-settings:requireSsl"
fieldLabelId="requireSsl"
/>
}
>
@ -195,7 +195,7 @@ export const RealmSettingsGeneralTab = ({
labelIcon={
<HelpItem
helpText={t("userManagedAccessHelp")}
fieldLabelId="realm-settings:userManagedAccess"
fieldLabelId="userManagedAccess"
/>
}
fieldId="kc-user-managed-access"
@ -224,7 +224,7 @@ export const RealmSettingsGeneralTab = ({
labelIcon={
<HelpItem
helpText={t("userProfileEnabledHelp")}
fieldLabelId="realm-settings:userProfileEnabled"
fieldLabelId="userProfileEnabled"
/>
}
fieldId="kc-user-profile-enabled"
@ -254,10 +254,7 @@ export const RealmSettingsGeneralTab = ({
<FormGroup
label={t("endpoints")}
labelIcon={
<HelpItem
helpText={t("endpointsHelp")}
fieldLabelId="realm-settings:endpoints"
/>
<HelpItem helpText={t("endpointsHelp")} fieldLabelId="endpoints" />
}
fieldId="kc-endpoints"
>

View file

@ -339,7 +339,7 @@ export const LocalizationTab = ({ save, realm }: LocalizationTabProps) => {
refreshTable();
addAlert(t("deleteMessageBundleSuccess"));
} catch (error) {
addError("realm-settings:deleteMessageBundleError", error);
addError("deleteMessageBundleError", error);
}
};
@ -368,7 +368,7 @@ export const LocalizationTab = ({ save, realm }: LocalizationTabProps) => {
labelIcon={
<HelpItem
helpText={t("internationalizationHelp")}
fieldLabelId="realm-settings:internationalization"
fieldLabelId="internationalization"
/>
}
>

View file

@ -59,7 +59,7 @@ export const RealmSettingsLoginTab = ({
labelIcon={
<HelpItem
helpText={t("userRegistrationHelpText")}
fieldLabelId="realm-settings:registrationAllowed"
fieldLabelId="registrationAllowed"
/>
}
hasNoPaddingTop
@ -83,7 +83,7 @@ export const RealmSettingsLoginTab = ({
labelIcon={
<HelpItem
helpText={t("forgotPasswordHelpText")}
fieldLabelId="realm-settings:resetPasswordAllowed"
fieldLabelId="resetPasswordAllowed"
/>
}
hasNoPaddingTop
@ -108,7 +108,7 @@ export const RealmSettingsLoginTab = ({
labelIcon={
<HelpItem
helpText={t("rememberMeHelpText")}
fieldLabelId="realm-settings:rememberMe"
fieldLabelId="rememberMe"
/>
}
hasNoPaddingTop
@ -136,7 +136,7 @@ export const RealmSettingsLoginTab = ({
labelIcon={
<HelpItem
helpText={t("emailAsUsernameHelpText")}
fieldLabelId="realm-settings:registrationEmailAsUsername"
fieldLabelId="registrationEmailAsUsername"
/>
}
hasNoPaddingTop
@ -167,7 +167,7 @@ export const RealmSettingsLoginTab = ({
labelIcon={
<HelpItem
helpText={t("loginWithEmailHelpText")}
fieldLabelId="realm-settings:loginWithEmailAllowed"
fieldLabelId="loginWithEmailAllowed"
/>
}
hasNoPaddingTop
@ -196,7 +196,7 @@ export const RealmSettingsLoginTab = ({
labelIcon={
<HelpItem
helpText={t("duplicateEmailsHelpText")}
fieldLabelId="realm-settings:duplicateEmailsAllowed"
fieldLabelId="duplicateEmailsAllowed"
/>
}
hasNoPaddingTop
@ -228,7 +228,7 @@ export const RealmSettingsLoginTab = ({
labelIcon={
<HelpItem
helpText={t("verifyEmailHelpText")}
fieldLabelId="realm-settings:verifyEmail"
fieldLabelId="verifyEmail"
/>
}
hasNoPaddingTop
@ -260,7 +260,7 @@ export const RealmSettingsLoginTab = ({
labelIcon={
<HelpItem
helpText={t("editUsernameHelp")}
fieldLabelId="realm-settings:editUsernameAllowed"
fieldLabelId="editUsernameAllowed"
/>
}
hasNoPaddingTop

View file

@ -239,12 +239,9 @@ export default function NewAttributeSettings() {
navigate(toUserProfile({ realm, tab: "attributes" }));
addAlert(
t("realm-settings:createAttributeSuccess"),
AlertVariant.success,
);
addAlert(t("createAttributeSuccess"), AlertVariant.success);
} catch (error) {
addError("realm-settings:createAttributeError", error);
addError("createAttributeError", error);
}
};

View file

@ -160,12 +160,12 @@ export default function NewClientPolicyCondition() {
navigate(toEditClientPolicy({ realm, policyName: policyName! }));
addAlert(
conditionName
? t("realm-settings:updateClientConditionSuccess")
: t("realm-settings:createClientConditionSuccess"),
? t("updateClientConditionSuccess")
: t("createClientConditionSuccess"),
AlertVariant.success,
);
} catch (error) {
addError("realm-settings:createClientConditionError", error);
addError("createClientConditionError", error);
}
};
@ -191,7 +191,7 @@ export default function NewClientPolicyCondition() {
? `${camelCase(conditionType.replace(/-/g, " "))}Help`
: "conditionsHelp"
}
fieldLabelId="realm-settings:conditionType"
fieldLabelId="conditionType"
/>
}
>

View file

@ -116,8 +116,8 @@ export default function NewClientPolicyForm() {
const { t } = useTranslation();
const [toggleDisableDialog, DisableConfirm] = useConfirmDialog({
titleKey: "realm-settings:disablePolicyConfirmTitle",
messageKey: "realm-settings:disablePolicyConfirm",
titleKey: "disablePolicyConfirmTitle",
messageKey: "disablePolicyConfirm",
continueButtonLabel: "disable",
onConfirm: () => {
onChange(!value);
@ -137,7 +137,7 @@ export default function NewClientPolicyForm() {
titleKey={
showAddConditionsAndProfilesForm || policyName
? policyName
: "realm-settings:createPolicy"
: "createPolicy"
}
divider
dropdownItems={
@ -250,14 +250,14 @@ export default function NewClientPolicyForm() {
});
addAlert(
policyName
? t("realm-settings:updateClientPolicySuccess")
: t("realm-settings:createClientPolicySuccess"),
? t("updateClientPolicySuccess")
: t("createClientPolicySuccess"),
AlertVariant.success,
);
navigate(toEditClientPolicy({ realm, policyName: createdForm.name! }));
setShowAddConditionsAndProfilesForm(true);
} catch (error) {
addError("realm-settings:createClientPolicyError", error);
addError("createClientPolicyError", error);
}
};
@ -419,12 +419,9 @@ export default function NewClientPolicyForm() {
});
setPolicies(newPolicies);
navigate(toEditClientPolicy({ realm, policyName: formValues.name! }));
addAlert(
t("realm-settings:addClientProfileSuccess"),
AlertVariant.success,
);
addAlert(t("addClientProfileSuccess"), AlertVariant.success);
} catch (error) {
addError("realm-settings:addClientProfileError", error);
addError("addClientProfileError", error);
}
};
@ -531,7 +528,7 @@ export default function NewClientPolicyForm() {
{t("conditions")}
<HelpItem
helpText={t("conditionsHelp")}
fieldLabelId="realm-settings:conditions"
fieldLabelId="conditions"
/>
</Text>
</FlexItem>
@ -552,7 +549,7 @@ export default function NewClientPolicyForm() {
data-testid="addCondition"
icon={<PlusCircleIcon />}
>
{t("realm-settings:addCondition")}
{t("addCondition")}
</Button>
</FlexItem>
</Flex>
@ -632,7 +629,7 @@ export default function NewClientPolicyForm() {
className="kc-emptyConditions"
component={TextVariants.h2}
>
{t("realm-settings:emptyConditions")}
{t("emptyConditions")}
</Text>
</>
)}
@ -649,7 +646,7 @@ export default function NewClientPolicyForm() {
{t("clientProfiles")}
<HelpItem
helpText={t("clientProfilesHelp")}
fieldLabelId="realm-settings:clientProfiles"
fieldLabelId="clientProfiles"
/>
</Text>
</FlexItem>
@ -662,7 +659,7 @@ export default function NewClientPolicyForm() {
icon={<PlusCircleIcon />}
onClick={toggleModal}
>
{t("realm-settings:addClientProfile")}
{t("addClientProfile")}
</Button>
</FlexItem>
</Flex>
@ -738,7 +735,7 @@ export default function NewClientPolicyForm() {
className="kc-emptyClientProfiles"
component={TextVariants.h2}
>
{t("realm-settings:emptyProfiles")}
{t("emptyProfiles")}
</Text>
</>
)}

View file

@ -275,7 +275,7 @@ export const PartialImportDialog = (props: PartialImportProps) => {
});
setImportResponse(importResults);
} catch (error) {
addError("realm-settings:importFail", error);
addError("importFail", error);
}
setImportInProgress(false);
@ -470,7 +470,7 @@ export const PartialImportDialog = (props: PartialImportProps) => {
<KeycloakDataTable
loader={loader}
isPaginated
ariaLabelKey="realm-settings:partialImport"
ariaLabelKey="partialImport"
columns={[
{
name: "action",

View file

@ -84,12 +84,9 @@ export const PoliciesTab = () => {
policies: updatedPolicies,
});
navigate(toClientPolicies({ realm, tab: "policies" }));
addAlert(
t("realm-settings:updateClientPolicySuccess"),
AlertVariant.success,
);
addAlert(t("updateClientPolicySuccess"), AlertVariant.success);
} catch (error) {
addError("realm-settings:updateClientPolicyError", error);
addError("updateClientPolicyError", error);
}
};
@ -103,8 +100,8 @@ export const PoliciesTab = () => {
clientPolicy: ClientPolicyRepresentation;
}) => {
const [toggleDisableDialog, DisableConfirm] = useConfirmDialog({
titleKey: "realm-settings:disablePolicyConfirmTitle",
messageKey: "realm-settings:disablePolicyConfirm",
titleKey: "disablePolicyConfirmTitle",
messageKey: "disablePolicyConfirm",
continueButtonLabel: "disable",
onConfirm: () => {
form.setValue(clientPolicy.name!, false);
@ -153,17 +150,14 @@ export const PoliciesTab = () => {
await adminClient.clientPolicies.updatePolicy({
policies: obj,
});
addAlert(
t("realm-settings:updateClientPoliciesSuccess"),
AlertVariant.success,
);
addAlert(t("updateClientPoliciesSuccess"), AlertVariant.success);
refresh();
} catch (error) {
addError("realm-settings:updateClientPoliciesError", error);
addError("updateClientPoliciesError", error);
}
} catch (error) {
console.warn("Invalid json, ignoring value using {}");
addError("realm-settings:updateClientPoliciesError", error);
addError("updateClientPoliciesError", error);
}
};
@ -234,14 +228,14 @@ export const PoliciesTab = () => {
key={policies.length}
emptyState={
<ListEmptyState
message={t("realm-settings:noClientPolicies")}
instructions={t("realm-settings:noClientPoliciesInstructions")}
primaryActionText={t("realm-settings:createClientPolicy")}
message={t("noClientPolicies")}
instructions={t("noClientPoliciesInstructions")}
primaryActionText={t("createClientPolicy")}
onPrimaryAction={() => navigate(toAddClientPolicy({ realm }))}
/>
}
ariaLabelKey="realm-settings:clientPolicies"
searchPlaceholderKey="realm-settings:clientPolicySearch"
ariaLabelKey="clientPolicies"
searchPlaceholderKey="clientPolicySearch"
loader={loader}
toolbarItem={
<ToolbarItem>
@ -272,7 +266,7 @@ export const PoliciesTab = () => {
},
{
name: "enabled",
displayKey: "realm-settings:status",
displayKey: "status",
cellRenderer: (clientPolicy) => (
<SwitchRenderer clientPolicy={clientPolicy} />
),

View file

@ -152,13 +152,10 @@ export default function ProfilesTab() {
profiles: changedProfiles,
globalProfiles: changedGlobalProfiles,
});
addAlert(
t("realm-settings:updateClientProfilesSuccess"),
AlertVariant.success,
);
addAlert(t("updateClientProfilesSuccess"), AlertVariant.success);
setKey(key + 1);
} catch (error) {
addError("realm-settings:updateClientProfilesError", error);
addError("updateClientProfilesError", error);
}
} catch (error) {
console.warn("Invalid json, ignoring value using {}");
@ -203,8 +200,8 @@ export default function ProfilesTab() {
{!show ? (
<KeycloakDataTable
key={tableProfiles.length}
ariaLabelKey="realm-settings:profiles"
searchPlaceholderKey="realm-settings:clientProfileSearch"
ariaLabelKey="profiles"
searchPlaceholderKey="clientProfileSearch"
loader={loader}
toolbarItem={
<ToolbarItem>

View file

@ -72,7 +72,7 @@ const RealmSettingsHeader = ({
const [partialExportOpen, setPartialExportOpen] = useState(false);
const [toggleDisableDialog, DisableConfirm] = useConfirmDialog({
titleKey: "realm-settings:disableConfirmTitle",
titleKey: "disableConfirmTitle",
messageKey: "disableConfirmRealm",
continueButtonLabel: "disable",
onConfirm: () => {
@ -82,7 +82,7 @@ const RealmSettingsHeader = ({
});
const [toggleDeleteDialog, DeleteConfirm] = useConfirmDialog({
titleKey: "realm-settings:deleteConfirmTitle",
titleKey: "deleteConfirmTitle",
messageKey: "deleteConfirmRealmSetting",
continueButtonLabel: "delete",
continueButtonVariant: ButtonVariant.danger,
@ -113,7 +113,7 @@ const RealmSettingsHeader = ({
/>
<ViewHeader
titleKey={realmName}
subKey="realm-settings:realmSettingsExplain"
subKey="realmSettingsExplain"
helpUrl={helpUrls.realmSettingsUrl}
divider={false}
dropdownItems={[
@ -306,7 +306,7 @@ export const RealmSettingsTabs = ({
<RealmSettingsThemesTab realm={realm} save={save} />
</Tab>
<Tab
title={<TabTitleText>{t("realm-settings:keys")}</TabTitleText>}
title={<TabTitleText>{t("keys")}</TabTitleText>}
data-testid="rs-keys-tab"
{...keysTab}
>
@ -339,14 +339,14 @@ export const RealmSettingsTabs = ({
<SecurityDefenses realm={realm} save={save} />
</Tab>
<Tab
title={<TabTitleText>{t("realm-settings:sessions")}</TabTitleText>}
title={<TabTitleText>{t("sessions")}</TabTitleText>}
data-testid="rs-sessions-tab"
{...sessionsTab}
>
<RealmSettingsSessionsTab key={key} realm={realm} save={save} />
</Tab>
<Tab
title={<TabTitleText>{t("realm-settings:tokens")}</TabTitleText>}
title={<TabTitleText>{t("tokens")}</TabTitleText>}
data-testid="rs-tokens-tab"
{...tokensTab}
>
@ -354,11 +354,7 @@ export const RealmSettingsTabs = ({
</Tab>
{isFeatureEnabled(Feature.ClientPolicies) && (
<Tab
title={
<TabTitleText>
{t("realm-settings:clientPolicies")}
</TabTitleText>
}
title={<TabTitleText>{t("clientPolicies")}</TabTitleText>}
data-testid="rs-clientPolicies-tab"
{...clientPoliciesTab}
>
@ -375,11 +371,7 @@ export const RealmSettingsTabs = ({
aria-label={t("clientProfilesSubTab")}
title={<TabTitleText>{t("profiles")}</TabTitleText>}
tooltip={
<Tooltip
content={t(
"realm-settings:clientPoliciesProfilesHelpText",
)}
/>
<Tooltip content={t("clientPoliciesProfilesHelpText")} />
}
{...clientPoliciesProfilesTab}
>
@ -392,11 +384,7 @@ export const RealmSettingsTabs = ({
{...clientPoliciesPoliciesTab}
title={<TabTitleText>{t("policies")}</TabTitleText>}
tooltip={
<Tooltip
content={t(
"realm-settings:clientPoliciesPoliciesHelpText",
)}
/>
<Tooltip content={t("clientPoliciesPoliciesHelpText")} />
}
>
<PoliciesTab />
@ -407,9 +395,7 @@ export const RealmSettingsTabs = ({
{isFeatureEnabled(Feature.DeclarativeUserProfile) &&
realm.attributes?.userProfileEnabled === "true" && (
<Tab
title={
<TabTitleText>{t("realm-settings:userProfile")}</TabTitleText>
}
title={<TabTitleText>{t("userProfile")}</TabTitleText>}
data-testid="rs-user-profile-tab"
{...userProfileTab}
>

View file

@ -60,7 +60,7 @@ export const RealmSettingsSessionsTab = ({
labelIcon={
<HelpItem
helpText={t("ssoSessionIdle")}
fieldLabelId="realm-settings:SSOSessionIdle"
fieldLabelId="SSOSessionIdle"
/>
}
>
@ -86,7 +86,7 @@ export const RealmSettingsSessionsTab = ({
labelIcon={
<HelpItem
helpText={t("ssoSessionMax")}
fieldLabelId="realm-settings:SSOSessionMax"
fieldLabelId="SSOSessionMax"
/>
}
>
@ -111,7 +111,7 @@ export const RealmSettingsSessionsTab = ({
labelIcon={
<HelpItem
helpText={t("ssoSessionIdleRememberMe")}
fieldLabelId="realm-settings:SSOSessionIdleRememberMe"
fieldLabelId="SSOSessionIdleRememberMe"
/>
}
>
@ -136,7 +136,7 @@ export const RealmSettingsSessionsTab = ({
labelIcon={
<HelpItem
helpText={t("ssoSessionMaxRememberMe")}
fieldLabelId="realm-settings:SSOSessionMaxRememberMe"
fieldLabelId="SSOSessionMaxRememberMe"
/>
}
>
@ -172,7 +172,7 @@ export const RealmSettingsSessionsTab = ({
labelIcon={
<HelpItem
helpText={t("clientSessionIdleHelp")}
fieldLabelId="realm-settings:clientSessionIdle"
fieldLabelId="clientSessionIdle"
/>
}
>
@ -197,7 +197,7 @@ export const RealmSettingsSessionsTab = ({
labelIcon={
<HelpItem
helpText={t("clientSessionMaxHelp")}
fieldLabelId="realm-settings:clientSessionMax"
fieldLabelId="clientSessionMax"
/>
}
>
@ -233,7 +233,7 @@ export const RealmSettingsSessionsTab = ({
labelIcon={
<HelpItem
helpText={t("offlineSessionIdleHelp")}
fieldLabelId="realm-settings:offlineSessionIdle"
fieldLabelId="offlineSessionIdle"
/>
}
>
@ -260,7 +260,7 @@ export const RealmSettingsSessionsTab = ({
labelIcon={
<HelpItem
helpText={t("offlineSessionMaxLimitedHelp")}
fieldLabelId="realm-settings:offlineSessionMaxLimited"
fieldLabelId="offlineSessionMaxLimited"
/>
}
>
@ -289,7 +289,7 @@ export const RealmSettingsSessionsTab = ({
labelIcon={
<HelpItem
helpText={t("offlineSessionMaxHelp")}
fieldLabelId="realm-settings:offlineSessionMax"
fieldLabelId="offlineSessionMax"
/>
}
>
@ -327,7 +327,7 @@ export const RealmSettingsSessionsTab = ({
labelIcon={
<HelpItem
helpText={t("loginTimeoutHelp")}
fieldLabelId="realm-settings:loginTimeout"
fieldLabelId="loginTimeout"
/>
}
>
@ -353,7 +353,7 @@ export const RealmSettingsSessionsTab = ({
labelIcon={
<HelpItem
helpText={t("loginActionTimeoutHelp")}
fieldLabelId="realm-settings:loginActionTimeout"
fieldLabelId="loginActionTimeout"
/>
}
>

View file

@ -55,7 +55,7 @@ export const RealmSettingsThemesTab = ({
labelIcon={
<HelpItem
helpText={t("loginThemeHelp")}
fieldLabelId="realm-settings:loginTheme"
fieldLabelId="loginTheme"
/>
}
>
@ -96,7 +96,7 @@ export const RealmSettingsThemesTab = ({
labelIcon={
<HelpItem
helpText={t("accountThemeHelp")}
fieldLabelId="realm-settings:accountTheme"
fieldLabelId="accountTheme"
/>
}
>
@ -140,7 +140,7 @@ export const RealmSettingsThemesTab = ({
labelIcon={
<HelpItem
helpText={t("adminThemeHelp")}
fieldLabelId="realm-settings:adminTheme"
fieldLabelId="adminTheme"
/>
}
>
@ -183,7 +183,7 @@ export const RealmSettingsThemesTab = ({
labelIcon={
<HelpItem
helpText={t("emailThemeHelp")}
fieldLabelId="realm-settings:emailTheme"
fieldLabelId="emailTheme"
/>
}
>

View file

@ -79,10 +79,7 @@ export const RealmSettingsTokensTab = ({
return (
<PageSection variant="light">
<FormPanel
title={t("realm-settings:general")}
className="kc-sso-session-template"
>
<FormPanel title={t("general")} className="kc-sso-session-template">
<FormAccess
isHorizontal
role="manage-realm"
@ -94,7 +91,7 @@ export const RealmSettingsTokensTab = ({
labelIcon={
<HelpItem
helpText={t("defaultSigAlgHelp")}
fieldLabelId="realm-settings:algorithm"
fieldLabelId="algorithm"
/>
}
>
@ -136,7 +133,7 @@ export const RealmSettingsTokensTab = ({
labelIcon={
<HelpItem
helpText={t("oAuthDeviceCodeLifespanHelp")}
fieldLabelId="realm-settings:oAuthDeviceCodeLifespan"
fieldLabelId="oAuthDeviceCodeLifespan"
/>
}
>
@ -161,7 +158,7 @@ export const RealmSettingsTokensTab = ({
labelIcon={
<HelpItem
helpText={t("oAuthDevicePollingIntervalHelp")}
fieldLabelId="realm-settings:oAuthDevicePollingInterval"
fieldLabelId="oAuthDevicePollingInterval"
/>
}
>
@ -191,7 +188,7 @@ export const RealmSettingsTokensTab = ({
labelIcon={
<HelpItem
helpText={t("shortVerificationUriTooltipHelp")}
fieldLabelId="realm-settings:shortVerificationUri"
fieldLabelId="shortVerificationUri"
/>
}
>
@ -204,7 +201,7 @@ export const RealmSettingsTokensTab = ({
</FormAccess>
</FormPanel>
<FormPanel
title={t("realm-settings:refreshTokens")}
title={t("refreshTokens")}
className="kc-client-session-template"
>
<FormAccess
@ -220,7 +217,7 @@ export const RealmSettingsTokensTab = ({
labelIcon={
<HelpItem
helpText={t("revokeRefreshTokenHelp")}
fieldLabelId="realm-settings:revokeRefreshToken"
fieldLabelId="revokeRefreshToken"
/>
}
>
@ -247,7 +244,7 @@ export const RealmSettingsTokensTab = ({
labelIcon={
<HelpItem
helpText={t("refreshTokenMaxReuseHelp")}
fieldLabelId="realm-settings:refreshTokenMaxReuse"
fieldLabelId="refreshTokenMaxReuse"
/>
}
fieldId="refreshTokenMaxReuse"
@ -276,7 +273,7 @@ export const RealmSettingsTokensTab = ({
</FormAccess>
</FormPanel>
<FormPanel
title={t("realm-settings:accessTokens")}
title={t("accessTokens")}
className="kc-offline-session-template"
>
<FormAccess
@ -294,7 +291,7 @@ export const RealmSettingsTokensTab = ({
labelIcon={
<HelpItem
helpText={t("accessTokenLifespanHelp")}
fieldLabelId="realm-settings:accessTokenLifespan"
fieldLabelId="accessTokenLifespan"
/>
}
>
@ -325,7 +322,7 @@ export const RealmSettingsTokensTab = ({
labelIcon={
<HelpItem
helpText={t("accessTokenLifespanImplicitFlow")}
fieldLabelId="realm-settings:accessTokenLifespanImplicitFlow"
fieldLabelId="accessTokenLifespanImplicitFlow"
/>
}
>
@ -349,7 +346,7 @@ export const RealmSettingsTokensTab = ({
labelIcon={
<HelpItem
helpText={t("clientLoginTimeoutHelp")}
fieldLabelId="realm-settings:clientLoginTimeout"
fieldLabelId="clientLoginTimeout"
/>
}
>
@ -377,7 +374,7 @@ export const RealmSettingsTokensTab = ({
labelIcon={
<HelpItem
helpText={t("offlineSessionMaxHelp")}
fieldLabelId="realm-settings:offlineSessionMax"
fieldLabelId="offlineSessionMax"
/>
}
>
@ -415,7 +412,7 @@ export const RealmSettingsTokensTab = ({
labelIcon={
<HelpItem
helpText={t("userInitiatedActionLifespanHelp")}
fieldLabelId="realm-settings:userInitiatedActionLifespan"
fieldLabelId="userInitiatedActionLifespan"
/>
}
>
@ -441,7 +438,7 @@ export const RealmSettingsTokensTab = ({
labelIcon={
<HelpItem
helpText={t("defaultAdminInitiatedActionLifespanHelp")}
fieldLabelId="realm-settings:defaultAdminInitiated"
fieldLabelId="defaultAdminInitiated"
/>
}
>

View file

@ -40,9 +40,9 @@ export const UserRegistration = () => {
compositeArray,
);
setKey(key + 1);
addAlert(t("roles:addAssociatedRolesSuccess"), AlertVariant.success);
addAlert(t("addAssociatedRolesSuccess"), AlertVariant.success);
} catch (error) {
addError("roles:addAssociatedRolesError", error);
addError("addAssociatedRolesError", error);
}
};

View file

@ -38,9 +38,9 @@ export const EventConfigForm = ({
const eventsEnabled: boolean = watch(eventKey);
const [toggleDisableDialog, DisableConfirm] = useConfirmDialog({
titleKey: "realm-settings:events-disable-title",
messageKey: "realm-settings:events-disable-confirm",
continueButtonLabel: "realm-settings:confirm",
titleKey: "events-disable-title",
messageKey: "events-disable-confirm",
continueButtonLabel: "confirm",
onConfirm: () => setValue(eventKey, false, { shouldDirty: true }),
});
@ -54,7 +54,7 @@ export const EventConfigForm = ({
labelIcon={
<HelpItem
helpText={t(`save-${type}-eventsHelp`)}
fieldLabelId="realm-settings:saveEvents"
fieldLabelId="saveEvents"
/>
}
>
@ -91,7 +91,7 @@ export const EventConfigForm = ({
labelIcon={
<HelpItem
helpText={t("includeRepresentationHelp")}
fieldLabelId="realm-settings:includeRepresentation"
fieldLabelId="includeRepresentation"
/>
}
>
@ -119,7 +119,7 @@ export const EventConfigForm = ({
labelIcon={
<HelpItem
helpText={t("expirationHelp")}
fieldLabelId="realm-settings:expiration"
fieldLabelId="expiration"
/>
}
>

View file

@ -41,7 +41,7 @@ export const EventListenersForm = ({
labelIcon={
<HelpItem
helpText={t("eventListenersHelpTextHelp")}
fieldLabelId="realm-settings:eventListeners"
fieldLabelId="eventListeners"
/>
}
>

View file

@ -62,8 +62,8 @@ export const EventsTab = ({ realm }: EventsTabProps) => {
};
const [toggleDeleteDialog, DeleteConfirm] = useConfirmDialog({
titleKey: "realm-settings:deleteEvents",
messageKey: "realm-settings:deleteEventsConfirm",
titleKey: "deleteEvents",
messageKey: "deleteEventsConfirm",
continueButtonLabel: "clear",
continueButtonVariant: ButtonVariant.danger,
onConfirm: async () => {
@ -120,15 +120,15 @@ export const EventsTab = ({ realm }: EventsTabProps) => {
setupForm({ ...events, ...eventConfig, adminEventsExpiration });
addAlert(
updatedEventListener
? t("realm-settings:saveEventListenersSuccess")
: t("realm-settings:eventConfigSuccessfully"),
? t("saveEventListenersSuccess")
: t("eventConfigSuccessfully"),
AlertVariant.success,
);
} catch (error) {
addError(
updatedEventListener
? t("realm-settings:saveEventListenersError")
: t("realm-settings:eventConfigError"),
? t("saveEventListenersError")
: t("eventConfigError"),
error,
);
}

View file

@ -36,7 +36,7 @@ export function EventsTypeTable({
return (
<KeycloakDataTable
ariaLabelKey={ariaLabelKey}
searchPlaceholderKey="realm-settings:searchEventType"
searchPlaceholderKey="searchEventType"
loader={data}
onSelect={onSelect ? onSelect : undefined}
canSelectAll={!!onSelect}
@ -62,7 +62,7 @@ export function EventsTypeTable({
columns={[
{
name: "name",
displayKey: "realm-settings:eventType",
displayKey: "eventType",
},
{
name: "description",

View file

@ -137,8 +137,8 @@ export const KeysListTab = ({ realmComponents }: KeysListTabProps) => {
isNotCompact
className="kc-keys-list"
loader={filteredKeyData || keyData}
ariaLabelKey="realm-settings:keysList"
searchPlaceholderKey="realm-settings:searchKey"
ariaLabelKey="keysList"
searchPlaceholderKey="searchKey"
searchTypeComponent={
<SelectFilter
onFilter={(filterType) =>
@ -154,7 +154,7 @@ export const KeysListTab = ({ realmComponents }: KeysListTabProps) => {
columns={[
{
name: "algorithm",
displayKey: "realm-settings:algorithm",
displayKey: "algorithm",
cellFormatters: [emptyFormatter()],
transforms: [cellWidth(15)],
},
@ -166,19 +166,19 @@ export const KeysListTab = ({ realmComponents }: KeysListTabProps) => {
},
{
name: "kid",
displayKey: "realm-settings:kid",
displayKey: "kid",
cellFormatters: [emptyFormatter()],
transforms: [cellWidth(10)],
},
{
name: "use",
displayKey: "realm-settings:use",
displayKey: "use",
cellFormatters: [emptyFormatter()],
transforms: [cellWidth(10)],
},
{
name: "provider",
displayKey: "realm-settings:provider",
displayKey: "provider",
cellRenderer: ({ provider }: KeyData) => provider || "",
cellFormatters: [emptyFormatter()],
transforms: [cellWidth(10)],
@ -193,7 +193,7 @@ export const KeysListTab = ({ realmComponents }: KeysListTabProps) => {
},
{
name: "publicKeys",
displayKey: "realm-settings:publicKeys",
displayKey: "publicKeys",
cellRenderer: ({ type, publicKey, certificate }: KeyData) => {
if (type === "EC") {
return (

View file

@ -87,7 +87,7 @@ export const KeysProvidersTab = ({
);
const [toggleDeleteDialog, DeleteConfirm] = useConfirmDialog({
titleKey: "realm-settings:deleteProviderTitle",
titleKey: "deleteProviderTitle",
messageKey: t("deleteProviderConfirm", {
provider: selectedComponent?.name,
}),
@ -104,7 +104,7 @@ export const KeysProvidersTab = ({
addAlert(t("deleteProviderSuccess"), AlertVariant.success);
} catch (error) {
addError("realm-settings:deleteProviderError", error);
addError("deleteProviderError", error);
}
},
});
@ -225,13 +225,13 @@ export const KeysProvidersTab = ({
refresh();
addAlert(t("saveProviderListSuccess"), AlertVariant.success);
} catch (error) {
addError("realm-settings:saveProviderError", error);
addError("saveProviderError", error);
}
}}
columns={[
{
name: "name",
displayKey: "realm-settings:name",
displayKey: "name",
cellRenderer: (component) => (
<Link
key={component.name}
@ -248,11 +248,11 @@ export const KeysProvidersTab = ({
},
{
name: "providerId",
displayKey: "realm-settings:provider",
displayKey: "provider",
},
{
name: "providerDescription",
displayKey: "realm-settings:providerDescription",
displayKey: "providerDescription",
},
]}
actions={[

View file

@ -81,7 +81,7 @@ export const KeyProviderForm = ({
onClose?.();
}
} catch (error) {
addError("realm-settings:saveProviderError", error);
addError("saveProviderError", error);
}
};

View file

@ -12,7 +12,7 @@ const NewAttributeSettings = lazy(() => import("../NewAttributeSettings"));
export const AddAttributeRoute: AppRouteObject = {
path: "/:realm/realm-settings/user-profile/attributes/add-attribute",
element: <NewAttributeSettings />,
breadcrumb: (t) => t("realm-settings:createAttribute"),
breadcrumb: (t) => t("createAttribute"),
handle: {
access: "manage-realm",
},

View file

@ -10,7 +10,7 @@ const NewClientPolicyForm = lazy(() => import("../NewClientPolicyForm"));
export const AddClientPolicyRoute: AppRouteObject = {
path: "/:realm/realm-settings/client-policies/policies/add-client-policy",
element: <NewClientPolicyForm />,
breadcrumb: (t) => t("realm-settings:createPolicy"),
breadcrumb: (t) => t("createPolicy"),
handle: {
access: "manage-clients",
},

View file

@ -13,7 +13,7 @@ const ClientProfileForm = lazy(() => import("../ClientProfileForm"));
export const AddClientProfileRoute: AppRouteObject = {
path: "/:realm/realm-settings/client-policies/:tab/add-profile",
element: <ClientProfileForm />,
breadcrumb: (t) => t("realm-settings:newClientProfile"),
breadcrumb: (t) => t("newClientProfile"),
handle: {
access: "manage-realm",
},

View file

@ -15,7 +15,7 @@ const NewClientPolicyCondition = lazy(
export const NewClientPolicyConditionRoute: AppRouteObject = {
path: "/:realm/realm-settings/client-policies/:policyName/edit-policy/create-condition",
element: <NewClientPolicyCondition />,
breadcrumb: (t) => t("realm-settings:addCondition"),
breadcrumb: (t) => t("addCondition"),
handle: {
access: "manage-clients",
},

View file

@ -13,7 +13,7 @@ const ExecutorForm = lazy(() => import("../ExecutorForm"));
export const AddExecutorRoute: AppRouteObject = {
path: "/:realm/realm-settings/client-policies/:profileName/add-executor",
element: <ExecutorForm />,
breadcrumb: (t) => t("realm-settings:addExecutor"),
breadcrumb: (t) => t("addExecutor"),
handle: {
access: "manage-realm",
},

View file

@ -13,7 +13,7 @@ const NewAttributeSettings = lazy(() => import("../NewAttributeSettings"));
export const AttributeRoute: AppRouteObject = {
path: "/:realm/realm-settings/user-profile/attributes/:attributeName/edit-attribute",
element: <NewAttributeSettings />,
breadcrumb: (t) => t("realm-settings:editAttribute"),
breadcrumb: (t) => t("editAttribute"),
handle: {
access: "manage-realm",
},

View file

@ -15,7 +15,7 @@ const RealmSettingsSection = lazy(() => import("../RealmSettingsSection"));
export const ClientPoliciesRoute: AppRouteObject = {
path: "/:realm/realm-settings/client-policies/:tab",
element: <RealmSettingsSection />,
breadcrumb: (t) => t("realm-settings:clientPolicies"),
breadcrumb: (t) => t("clientPolicies"),
handle: {
access: "view-realm",
},

View file

@ -13,7 +13,7 @@ const ClientProfileForm = lazy(() => import("../ClientProfileForm"));
export const ClientProfileRoute: AppRouteObject = {
path: "/:realm/realm-settings/client-policies/:profileName/edit-profile",
element: <ClientProfileForm />,
breadcrumb: (t) => t("realm-settings:clientProfile"),
breadcrumb: (t) => t("clientProfile"),
handle: {
access: ["view-realm", "view-users"],
},

View file

@ -15,7 +15,7 @@ const AttributesGroupDetails = lazy(
export const EditAttributesGroupRoute: AppRouteObject = {
path: "/:realm/realm-settings/user-profile/attributesGroup/edit/:name",
element: <AttributesGroupDetails />,
breadcrumb: (t) => t("realm-settings:editGroupText"),
breadcrumb: (t) => t("editGroupText"),
handle: {
access: "view-realm",
},

View file

@ -13,7 +13,7 @@ const NewClientPolicyForm = lazy(() => import("../NewClientPolicyForm"));
export const EditClientPolicyRoute: AppRouteObject = {
path: "/:realm/realm-settings/client-policies/:policyName/edit-policy",
element: <NewClientPolicyForm />,
breadcrumb: (t) => t("realm-settings:policyDetails"),
breadcrumb: (t) => t("policyDetails"),
handle: {
access: "manage-realm",
},

View file

@ -16,7 +16,7 @@ const NewClientPolicyCondition = lazy(
export const EditClientPolicyConditionRoute: AppRouteObject = {
path: "/:realm/realm-settings/client-policies/:policyName/edit-policy/:conditionName/edit-condition",
element: <NewClientPolicyCondition />,
breadcrumb: (t) => t("realm-settings:editCondition"),
breadcrumb: (t) => t("editCondition"),
handle: {
access: "manage-clients",
},

View file

@ -14,7 +14,7 @@ const ExecutorForm = lazy(() => import("../ExecutorForm"));
export const ExecutorRoute: AppRouteObject = {
path: "/:realm/realm-settings/client-policies/:profileName/edit-profile/:executorName",
element: <ExecutorForm />,
breadcrumb: (t) => t("realm-settings:executorDetails"),
breadcrumb: (t) => t("executorDetails"),
handle: {
access: ["manage-realm"],
},

View file

@ -26,7 +26,7 @@ const KeyProviderForm = lazy(
export const KeyProviderFormRoute: AppRouteObject = {
path: "/:realm/realm-settings/keys/providers/:id/:providerType/settings",
element: <KeyProviderForm />,
breadcrumb: (t) => t("realm-settings:editProvider"),
breadcrumb: (t) => t("editProvider"),
handle: {
access: "view-realm",
},

View file

@ -15,7 +15,7 @@ const RealmSettingsSection = lazy(() => import("../RealmSettingsSection"));
export const KeysRoute: AppRouteObject = {
path: "/:realm/realm-settings/keys/:tab",
element: <RealmSettingsSection />,
breadcrumb: (t) => t("realm-settings:keys"),
breadcrumb: (t) => t("keys"),
handle: {
access: "view-realm",
},

View file

@ -14,7 +14,7 @@ const AttributesGroupDetails = lazy(
export const NewAttributesGroupRoute: AppRouteObject = {
path: "/:realm/realm-settings/user-profile/attributesGroup/new",
element: <AttributesGroupDetails />,
breadcrumb: (t) => t("realm-settings:createGroupText"),
breadcrumb: (t) => t("createGroupText"),
handle: {
access: "view-realm",
},

View file

@ -15,7 +15,7 @@ const RealmSettingsSection = lazy(() => import("../RealmSettingsSection"));
export const UserProfileRoute: AppRouteObject = {
path: "/:realm/realm-settings/user-profile/:tab",
element: <RealmSettingsSection />,
breadcrumb: (t) => t("realm-settings:userProfile"),
breadcrumb: (t) => t("userProfile"),
handle: {
access: "view-realm",
},

View file

@ -80,7 +80,7 @@ export const BruteForceDetection = ({
labelIcon={
<HelpItem
helpText={t("failureFactorHelp")}
fieldLabelId="realm-settings:failureFactor"
fieldLabelId="failureFactor"
/>
}
fieldId="failureFactor"
@ -141,7 +141,7 @@ export const BruteForceDetection = ({
labelIcon={
<HelpItem
helpText={t("quickLoginCheckMilliSecondsHelp")}
fieldLabelId="realm-settings:quickLoginCheckMilliSeconds"
fieldLabelId="quickLoginCheckMilliSeconds"
/>
}
fieldId="quickLoginCheckMilliSeconds"

View file

@ -107,26 +107,19 @@ export default function AttributesGroupForm() {
return (
<>
<ViewHeader
titleKey={
matchingGroup
? "realm-settings:editGroupText"
: "realm-settings:createGroupText"
}
titleKey={matchingGroup ? "editGroupText" : "createGroupText"}
divider
/>
<PageSection variant="light" onSubmit={form.handleSubmit(onSubmit)}>
<FormAccess isHorizontal role="manage-realm">
<FormGroup
label={t("realm-settings:nameField")}
label={t("nameField")}
fieldId="kc-name"
isRequired
helperTextInvalid={t("required")}
validated={form.formState.errors.name ? "error" : "default"}
labelIcon={
<HelpItem
helpText={t("nameHintHelp")}
fieldLabelId="realm-settings:nameField"
/>
<HelpItem helpText={t("nameHintHelp")} fieldLabelId="nameField" />
}
>
<KeycloakTextInput
@ -139,12 +132,12 @@ export default function AttributesGroupForm() {
)}
</FormGroup>
<FormGroup
label={t("realm-settings:displayHeaderField")}
label={t("displayHeaderField")}
fieldId="kc-display-header"
labelIcon={
<HelpItem
helpText={t("displayHeaderHintHelp")}
fieldLabelId="realm-settings:displayHeaderField"
fieldLabelId="displayHeaderField"
/>
}
>
@ -154,12 +147,12 @@ export default function AttributesGroupForm() {
/>
</FormGroup>
<FormGroup
label={t("realm-settings:displayDescriptionField")}
label={t("displayDescriptionField")}
fieldId="kc-display-description"
labelIcon={
<HelpItem
helpText={t("displayDescriptionHintHelp")}
fieldLabelId="realm-settings:displayDescriptionField"
fieldLabelId="displayDescriptionField"
/>
}
>
@ -169,12 +162,9 @@ export default function AttributesGroupForm() {
/>
</FormGroup>
<TextContent>
<Text component="h2">{t("realm-settings:annotationsText")}</Text>
<Text component="h2">{t("annotationsText")}</Text>
</TextContent>
<FormGroup
label={t("realm-settings:annotationsText")}
fieldId="kc-annotations"
>
<FormGroup label={t("annotationsText")} fieldId="kc-annotations">
<FormProvider {...form}>
<KeyValueInput name="annotations" />
</FormProvider>

View file

@ -35,9 +35,9 @@ export const AttributesGroupTab = () => {
}
const [toggleDeleteDialog, DeleteConfirm] = useConfirmDialog({
titleKey: "realm-settings:deleteDialogTitle",
titleKey: "deleteDialogTitle",
children: (
<Trans i18nKey="realm-settings:deleteDialogDescription">
<Trans i18nKey="deleteDialogDescription">
{" "}
<strong>{{ group: groupToDelete?.name }}</strong>.
</Trans>
@ -52,8 +52,8 @@ export const AttributesGroupTab = () => {
save(
{ ...config, groups },
{
successMessageKey: "realm-settings:deleteSuccess",
errorMessageKey: "realm-settings:deleteAttributeGroupError",
successMessageKey: "deleteSuccess",
errorMessageKey: "deleteAttributeGroupError",
},
);
},
@ -70,7 +70,7 @@ export const AttributesGroupTab = () => {
<KeycloakDataTable
key={key}
loader={loader}
ariaLabelKey="realm-settings:tableTitle"
ariaLabelKey="tableTitle"
toolbarItem={
<ToolbarItem>
<Button
@ -85,7 +85,7 @@ export const AttributesGroupTab = () => {
columns={[
{
name: "name",
displayKey: "realm-settings:columnName",
displayKey: "columnName",
cellRenderer: (group) => (
<Link to={toEditAttributesGroup({ realm, name: group.name! })}>
{group.name}
@ -94,11 +94,11 @@ export const AttributesGroupTab = () => {
},
{
name: "displayHeader",
displayKey: "realm-settings:columnDisplayName",
displayKey: "columnDisplayName",
},
{
name: "displayDescription",
displayKey: "realm-settings:columnDisplayDescription",
displayKey: "columnDisplayDescription",
},
]}
actions={[

View file

@ -55,8 +55,8 @@ export const AttributesTab = () => {
save(
{ attributes: config?.attributes!, groups: config?.groups },
{
successMessageKey: "realm-settings:updatedUserProfileSuccess",
errorMessageKey: "realm-settings:updatedUserProfileError",
successMessageKey: "updatedUserProfileSuccess",
errorMessageKey: "updatedUserProfileError",
},
);
};
@ -76,8 +76,8 @@ export const AttributesTab = () => {
save(
{ attributes: updatedAttributes!, groups: config?.groups },
{
successMessageKey: "realm-settings:deleteAttributeSuccess",
errorMessageKey: "realm-settings:deleteAttributeError",
successMessageKey: "deleteAttributeSuccess",
errorMessageKey: "deleteAttributeError",
},
);
setAttributeToDelete("");

View file

@ -29,7 +29,7 @@ export const JsonEditorTab = () => {
try {
await save(JSON.parse(value));
} catch (error) {
addError("realm-settings:invalidJsonError", error);
addError("invalidJsonError", error);
return;
}
}

View file

@ -55,17 +55,14 @@ export const UserProfileProvider = ({ children }: PropsWithChildren) => {
setIsSaving(false);
setRefreshCount(refreshCount + 1);
addAlert(
t(options?.successMessageKey ?? "realm-settings:userProfileSuccess"),
t(options?.successMessageKey ?? "userProfileSuccess"),
AlertVariant.success,
);
return true;
} catch (error) {
setIsSaving(false);
addError(
options?.errorMessageKey ?? "realm-settings:userProfileError",
error,
);
addError(options?.errorMessageKey ?? "userProfileError", error);
return false;
}

View file

@ -76,7 +76,7 @@ export const AttributeGeneralSettings = () => {
labelIcon={
<HelpItem
helpText={t("attributeNameHelp")}
fieldLabelId="realm-settings:attributeName"
fieldLabelId="attributeName"
/>
}
fieldId="kc-attribute-name"
@ -99,7 +99,7 @@ export const AttributeGeneralSettings = () => {
labelIcon={
<HelpItem
helpText={t("attributeDisplayNameHelp")}
fieldLabelId="realm-settings:attributeDisplayName"
fieldLabelId="attributeDisplayName"
/>
}
fieldId="kc-attribute-display-name"
@ -249,10 +249,7 @@ export const AttributeGeneralSettings = () => {
<FormGroup
label={t("required")}
labelIcon={
<HelpItem
helpText={t("requiredHelp")}
fieldLabelId="realm-settings:required"
/>
<HelpItem helpText={t("requiredHelp")} fieldLabelId="required" />
}
fieldId="kc-required"
hasNoPaddingTop

View file

@ -69,10 +69,7 @@ export const AttributePermission = () => {
hasNoPaddingTop
label={t("whoCanEdit")}
labelIcon={
<HelpItem
helpText={t("whoCanEditHelp")}
fieldLabelId="realm-settings:whoCanEdit"
/>
<HelpItem helpText={t("whoCanEditHelp")} fieldLabelId="whoCanEdit" />
}
fieldId="kc-who-can-edit"
>
@ -82,10 +79,7 @@ export const AttributePermission = () => {
hasNoPaddingTop
label={t("whoCanView")}
labelIcon={
<HelpItem
helpText={t("whoCanViewHelp")}
fieldLabelId="realm-settings:whoCanView"
/>
<HelpItem helpText={t("whoCanViewHelp")} fieldLabelId="whoCanView" />
}
fieldId="kc-who-can-view"
>

View file

@ -92,7 +92,7 @@ export const AttributeValidations = () => {
className="kc--attributes-validations--add-validation-button"
icon={<PlusCircleIcon />}
>
{t("realm-settings:addValidator")}
{t("addValidator")}
</Button>
<Divider />
{validators.length !== 0 ? (
@ -132,7 +132,7 @@ export const AttributeValidations = () => {
</TableComposable>
) : (
<Text className="kc-emptyValidators" component={TextVariants.h6}>
{t("realm-settings:emptyValidators")}
{t("emptyValidators")}
</Text>
)}
</div>

View file

@ -91,15 +91,15 @@ export default function SessionsSection() {
};
const [toggleLogoutDialog, LogoutConfirm] = useConfirmDialog({
titleKey: "sessions:logoutAllSessions",
messageKey: "sessions:logoutAllDescription",
titleKey: "logoutAllSessions",
messageKey: "logoutAllDescription",
continueButtonLabel: "confirm",
onConfirm: async () => {
try {
await adminClient.realms.logoutAll({ realm });
refresh();
} catch (error) {
addError("sessions:logoutAllSessionsError", error);
addError("logoutAllSessionsError", error);
}
},
});
@ -130,7 +130,7 @@ export default function SessionsSection() {
<ViewHeader
dropdownItems={dropdownItems}
titleKey="titleSessions"
subKey="sessions:sessionExplain"
subKey="sessionExplain"
helpUrl={helpUrls.sessionsUrl}
/>
<PageSection variant="light" className="pf-u-p-0">

View file

@ -90,7 +90,7 @@ export default function SessionsTable({
const defaultColumns: Field<UserSessionRepresentation>[] = [
{
name: "username",
displayKey: "sessions:user",
displayKey: "user",
cellRenderer: UsernameCell,
},
{
@ -99,12 +99,12 @@ export default function SessionsTable({
},
{
name: "start",
displayKey: "sessions:started",
displayKey: "started",
cellRenderer: (row) => formatDate(new Date(row.start!)),
},
{
name: "lastAccess",
displayKey: "sessions:lastAccess",
displayKey: "lastAccess",
cellRenderer: (row) => formatDate(new Date(row.lastAccess!)),
},
{
@ -113,7 +113,7 @@ export default function SessionsTable({
},
{
name: "clients",
displayKey: "sessions:clients",
displayKey: "clients",
cellRenderer: ClientsCell,
},
];
@ -124,15 +124,15 @@ export default function SessionsTable({
}, [realm, hiddenColumns]);
const [toggleLogoutDialog, LogoutConfirm] = useConfirmDialog({
titleKey: "sessions:logoutAllSessions",
messageKey: "sessions:logoutAllDescription",
titleKey: "logoutAllSessions",
messageKey: "logoutAllDescription",
continueButtonLabel: "confirm",
onConfirm: async () => {
try {
await adminClient.users.logout({ id: logoutUser! });
refresh();
} catch (error) {
addError("sessions:logoutAllSessionsError", error);
addError("logoutAllSessionsError", error);
}
},
});
@ -154,7 +154,7 @@ export default function SessionsTable({
key={key}
loader={loader}
ariaLabelKey="titleSessions"
searchPlaceholderKey="sessions:searchForSession"
searchPlaceholderKey="searchForSession"
isPaginated={isPaginated}
isSearching={isSearching}
searchTypeComponent={filter}

View file

@ -107,7 +107,7 @@ export default function UserFederationSection() {
refresh();
addAlert(t("userFedDeletedSuccess"), AlertVariant.success);
} catch (error) {
addError("user-federation:userFedDeleteError", error);
addError("userFedDeleteError", error);
}
},
});
@ -181,12 +181,12 @@ export default function UserFederationSection() {
)}
<ViewHeader
titleKey="userFederation"
subKey="user-federation:userFederationExplain"
subKey="userFederationExplain"
helpUrl={helpUrls.userFederationUrl}
{...(userFederations && userFederations.length > 0
? {
lowerDropdownItems: ufAddProviderDropdownItems,
lowerDropdownMenuTitle: "user-federation:addNewProvider",
lowerDropdownMenuTitle: "addNewProvider",
lowerButton: lowerButtonProps,
}
: {})}

View file

@ -130,7 +130,7 @@ export default function CustomProviderSettings() {
labelIcon={
<HelpItem
helpText={t("uiDisplayNameHelp")}
fieldLabelId="user-federation:uiDisplayName"
fieldLabelId="uiDisplayName"
/>
}
helperTextInvalid={t("validateName")}

View file

@ -18,7 +18,7 @@ export const SyncSettings = () => {
labelIcon={
<HelpItem
helpText={t("periodicFullSyncHelp")}
fieldLabelId="user-federation:periodicFullSync"
fieldLabelId="periodicFullSync"
/>
}
fieldId="kc-periodic-full-sync"
@ -50,7 +50,7 @@ export const SyncSettings = () => {
labelIcon={
<HelpItem
helpText={t("fullSyncPeriodHelp")}
fieldLabelId="user-federation:fullSyncPeriod"
fieldLabelId="fullSyncPeriod"
/>
}
fieldId="kc-full-sync-period"
@ -70,7 +70,7 @@ export const SyncSettings = () => {
labelIcon={
<HelpItem
helpText={t("periodicChangedUsersSyncHelp")}
fieldLabelId="user-federation:periodicChangedUsersSync"
fieldLabelId="periodicChangedUsersSync"
/>
}
fieldId="kc-periodic-changed-users-sync"
@ -101,7 +101,7 @@ export const SyncSettings = () => {
labelIcon={
<HelpItem
helpText={t("changedUsersSyncHelp")}
fieldLabelId="user-federation:changedUsersSyncPeriod"
fieldLabelId="changedUsersSyncPeriod"
/>
}
fieldId="kc-changed-users-sync-period"

Some files were not shown because too many files have changed in this diff Show more