Removed namespaces from messages (#23205)

This commit is contained in:
Erik Jan de Wit 2023-09-14 11:01:15 +02:00 committed by GitHub
parent 658c0ef19f
commit f4c8ded5f6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
243 changed files with 982 additions and 1028 deletions

View file

@ -1,7 +1,7 @@
import ModalUtils from "../../../../util/ModalUtils";
export default class MoveGroupModal extends ModalUtils {
private moveButton = "groups:moveHere-button";
private moveButton = "moveHere-button";
private title = ".pf-c-modal-box__title";
clickRow(groupName: string) {

View file

@ -43,7 +43,7 @@ export default class UserRegistration {
}
export class GroupPickerDialog {
private addButton = "common:add-button";
private addButton = "add-button";
private title = ".pf-c-modal-box__title";
clickRow(groupName: string) {

View file

@ -63,7 +63,7 @@
"testConnection": "Test connection",
"name": "Name",
"role": "Role",
"description": "description",
"description": "Description",
"type": "Type",
"category": "Category",
"priority": "Priority",
@ -3273,6 +3273,12 @@
"clientScopesRolesScope": "If there is no role scope mapping defined, each user is permitted to use this client scope. If there are role scope mappings defined, the user must be a member of at least one of the roles.",
"scopeNameHelp": "Name of the client scope. Must be unique in the realm. Name should not contain space characters as it is used as value of scope parameter",
"scopeDescriptionHelp": "Description of the client scope",
"clientScopeTypes": {
"default": "Default",
"optional": "Optional",
"none": "None"
},
"realmNameTitle": "{{name}} realm",
"scopeTypeHelp": "Client scopes, which will be added as default scopes to each created client",
"clientDescriptionHelp": "Specifies description of the client. For example 'My Client for TimeSheets'. Supports keys for localized values as well. For example: ${my_client_description}",
"clientsClientTypeHelp": "'OpenID Connect' allows Clients to verify the identity of the End-User based on the authentication performed by an Authorization Server.'SAML' enables web-based authentication and authorization scenarios including cross-domain single sign-on (SSO) and uses security tokens containing assertions to pass information.",

View file

@ -924,6 +924,7 @@
"titleUsers": "ユーザー",
"titleSessions": "セッション",
"authenticationAliasHelp": "この設定の名前を設定します。",
"clientScopeTypes": { "default": "DEFAULT" },
"authenticationFlowTypeHelp": "どの種類のフォームかを設定します。",
"scopeNameHelp": "クライアント・スコープの名前。レルム内でユニークでなければなりません。スコープ・パラメーターの値として使用されるため、名前には空白文字を含めないでください",
"scopeDescriptionHelp": "クライアント・スコープの説明",

View file

@ -3246,6 +3246,8 @@
"orderChangeErrorUserFed": "由于{{error}},无法更改用户联盟供应商的优先顺序。",
"authenticationAliasHelp": "配置名称",
"authenticationFlowTypeHelp": "它是一种什么样的形式?",
"clientScopeTypes": { "default": "默认", "optional": "非必需", "none": "无" },
"realmNameTitle": "{{name}} 领域",
"authenticationCreateFlowHelp": "创建流程",
"scopeNameHelp": "客户端作用域的名称。在领域中必须是唯一的。名称不应包含空格字符,因为它用作作用域参数的值。",
"scopeDescriptionHelp": "客户作用域说明",

View file

@ -137,7 +137,7 @@ export default function AuthenticationSection() {
<strong>{{ flow: selectedFlow ? selectedFlow.alias : "" }}</strong>.
</Trans>
),
continueButtonLabel: "common:delete",
continueButtonLabel: "delete",
continueButtonVariant: ButtonVariant.danger,
onConfirm: async () => {
try {
@ -234,7 +234,7 @@ export default function AuthenticationSection() {
...(!data.builtIn && !data.usedBy
? [
{
title: t("common:delete"),
title: t("delete"),
onClick: () => {
setSelectedFlow(data);
toggleDeleteDialog();
@ -258,7 +258,7 @@ export default function AuthenticationSection() {
},
{
name: "description",
displayKey: "common:description",
displayKey: "description",
},
]}
emptyState={

View file

@ -58,7 +58,7 @@ export const BindFlowDialog = ({ flowAlias, onClose }: BindFlowDialogProps) => {
onClose={onClose}
actions={[
<Button key="confirm" data-testid="save" type="submit" form="bind-form">
{t("common:save")}
{t("save")}
</Button>,
<Button
data-testid="cancel"
@ -66,7 +66,7 @@ export const BindFlowDialog = ({ flowAlias, onClose }: BindFlowDialogProps) => {
variant={ButtonVariant.link}
onClick={onClose}
>
{t("common:cancel")}
{t("cancel")}
</Button>,
]}
isOpen

View file

@ -96,7 +96,7 @@ export const DuplicateFlowModal = ({
variant={ButtonVariant.link}
onClick={toggleDialog}
>
{t("common:cancel")}
{t("cancel")}
</Button>,
]}
isOpen

View file

@ -61,7 +61,7 @@ export const EditFlowModal = ({ flow, toggleDialog }: EditFlowModalProps) => {
variant={ButtonVariant.link}
onClick={() => toggleDialog()}
>
{t("common:cancel")}
{t("cancel")}
</Button>,
]}
isOpen

View file

@ -81,7 +81,7 @@ export default function FlowDetails() {
const flows = await adminClient.authenticationManagement.getFlows();
const flow = flows.find((f) => f.id === id);
if (!flow) {
throw new Error(t("common:notFound"));
throw new Error(t("notFound"));
}
const executions =
@ -206,7 +206,7 @@ export default function FlowDetails() {
<strong>{{ name: selectedExecution?.displayName }}</strong>.
</Trans>
),
continueButtonLabel: "common:delete",
continueButtonLabel: "delete",
continueButtonVariant: ButtonVariant.danger,
onConfirm: async () => {
try {
@ -229,7 +229,7 @@ export default function FlowDetails() {
<strong>{{ flow: flow?.alias || "" }}</strong>.
</Trans>
),
continueButtonLabel: "common:delete",
continueButtonLabel: "delete",
continueButtonVariant: ButtonVariant.danger,
onConfirm: async () => {
try {
@ -275,7 +275,7 @@ export default function FlowDetails() {
key="delete"
onClick={() => toggleDeleteFlow()}
>
{t("common:delete")}
{t("delete")}
</DropdownItem>,
]
: []),
@ -377,7 +377,7 @@ export default function FlowDetails() {
onDragFinish={(order) => {
const withoutHeaderId = order.slice(1);
setLiveText(
t("common:onDragFinish", { list: dragged?.displayName }),
t("onDragFinish", { list: dragged?.displayName }),
);
const change = executionList.getChange(
dragged!,
@ -387,9 +387,7 @@ export default function FlowDetails() {
}}
onDragStart={(id) => {
const item = executionList.findExecution(id)!;
setLiveText(
t("common:onDragStart", { item: item.displayName }),
);
setLiveText(t("onDragStart", { item: item.displayName }));
setDragged(item);
if (!item.isCollapsed) {
item.isCollapsed = true;
@ -397,11 +395,9 @@ export default function FlowDetails() {
}
}}
onDragMove={() =>
setLiveText(
t("common:onDragMove", { item: dragged?.displayName }),
)
setLiveText(t("onDragMove", { item: dragged?.displayName }))
}
onDragCancel={() => setLiveText(t("common:onDragCancel"))}
onDragCancel={() => setLiveText(t("onDragCancel"))}
itemOrder={[
"header",
...executionList.order().map((ex) => ex.id!),

View file

@ -135,12 +135,12 @@ export const RequiredActions = () => {
},
{
name: "enabled",
displayKey: "common:enabled",
displayKey: "enabled",
cellRenderer: (row) => (
<Switch
id={`enable-${toKey(row.name)}`}
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked={row.enabled}
onChange={() => {
updateAction(row.data, "enabled");
@ -156,9 +156,9 @@ export const RequiredActions = () => {
cellRenderer: (row) => (
<Switch
id={`default-${toKey(row.name)}`}
label={t("common:on")}
label={t("on")}
isDisabled={!row.enabled}
labelOff={!row.enabled ? t("disabledOff") : t("common:off")}
labelOff={!row.enabled ? t("disabledOff") : t("off")}
isChecked={row.defaultAction}
onChange={() => {
updateAction(row.data, "defaultAction");

View file

@ -45,7 +45,7 @@ export const AddFlowDropdown = ({
);
return (
<Tooltip content={t("common:add")}>
<Tooltip content={t("add")}>
<>
<Dropdown
isPlain
@ -53,7 +53,7 @@ export const AddFlowDropdown = ({
data-testid={`${execution.displayName}-edit-dropdown`}
isOpen={open}
toggle={
<DropdownToggle onToggle={setOpen} aria-label={t("common:add")}>
<DropdownToggle onToggle={setOpen} aria-label={t("add")}>
<PlusIcon />
</DropdownToggle>
}

View file

@ -45,11 +45,11 @@ export const EditFlow = ({ execution, onRowChange }: EditFlowProps) => {
return (
<>
<Tooltip content={t("common:edit")}>
<Tooltip content={t("edit")}>
<Button
variant="plain"
data-testid={`${execution.id}-edit`}
aria-label={t("common:edit")}
aria-label={t("edit")}
onClick={toggle}
>
<PencilAltIcon />
@ -76,7 +76,7 @@ export const EditFlow = ({ execution, onRowChange }: EditFlowProps) => {
variant={ButtonVariant.link}
onClick={toggle}
>
{t("common:cancel")}
{t("cancel")}
</Button>,
]}
isOpen
@ -87,9 +87,9 @@ export const EditFlow = ({ execution, onRowChange }: EditFlowProps) => {
isHorizontal
>
<FormGroup
label={t("common:name")}
label={t("name")}
fieldId="name"
helperTextInvalid={t("common:required")}
helperTextInvalid={t("required")}
validated={
errors.displayName
? ValidatedOptions.error
@ -113,7 +113,7 @@ export const EditFlow = ({ execution, onRowChange }: EditFlowProps) => {
/>
</FormGroup>
<FormGroup
label={t("common:description")}
label={t("description")}
fieldId="kc-description"
labelIcon={
<HelpItem
@ -139,7 +139,7 @@ export const EditFlow = ({ execution, onRowChange }: EditFlowProps) => {
{...register("description", {
maxLength: {
value: 255,
message: t("common:maxLength", { length: 255 }),
message: t("maxLength", { length: 255 }),
},
})}
/>

View file

@ -113,10 +113,10 @@ export const ExecutionConfigModal = ({
return (
<>
<Tooltip content={t("common:settings")}>
<Tooltip content={t("settings")}>
<Button
variant="plain"
aria-label={t("common:settings")}
aria-label={t("settings")}
onClick={() => setShow(true)}
>
<CogIcon />
@ -133,7 +133,7 @@ export const ExecutionConfigModal = ({
<FormGroup
label={t("alias")}
fieldId="alias"
helperTextInvalid={t("common:required")}
helperTextInvalid={t("required")}
validated={
errors.alias ? ValidatedOptions.error : ValidatedOptions.default
}
@ -165,7 +165,7 @@ export const ExecutionConfigModal = ({
</FormProvider>
<ActionGroup>
<Button data-testid="save" variant="primary" type="submit">
{t("common:save")}
{t("save")}
</Button>
<Button
data-testid="cancel"
@ -174,7 +174,7 @@ export const ExecutionConfigModal = ({
setShow(false);
}}
>
{t("common:cancel")}
{t("cancel")}
</Button>
{config && (
<Button
@ -189,7 +189,7 @@ export const ExecutionConfigModal = ({
setShow(false);
}}
>
{t("common:clear")} <TrashIcon />
{t("clear")} <TrashIcon />
</Button>
)}
</ActionGroup>

View file

@ -16,7 +16,7 @@ export const FlowHeader = () => {
<DataListItemRow>
<DataListDragButton
className="keycloak__authentication__header-drag-button"
aria-label={t("common:disabled")}
aria-label={t("disabled")}
/>
<DataListItemCells
className="keycloak__authentication__header"

View file

@ -65,7 +65,7 @@ export const FlowRow = ({
aria-labelledby={execution.id}
>
<DataListControl>
<DataListDragButton aria-label={t("common-help:dragHelp")} />
<DataListDragButton aria-label={t("dragHelp")} />
</DataListControl>
{hasSubList && (
<DataListToggle
@ -116,11 +116,11 @@ export const FlowRow = ({
</>
)}
{!builtIn && (
<Tooltip content={t("common:delete")}>
<Tooltip content={t("delete")}>
<Button
variant="plain"
data-testid={`${execution.displayName}-delete`}
aria-label={t("common:delete")}
aria-label={t("delete")}
onClick={() => onDelete(execution)}
>
<TrashIcon />

View file

@ -75,7 +75,7 @@ const UsedByModal = ({ id, isSpecificClient, onClose }: UsedByModalProps) => {
key="cancel"
onClick={onClose}
>
{t("common:close")}
{t("close")}
</Button>,
]}
>
@ -83,7 +83,7 @@ const UsedByModal = ({ id, isSpecificClient, onClose }: UsedByModalProps) => {
loader={loader}
isPaginated
ariaLabelKey="usedBy"
searchPlaceholderKey="common:search"
searchPlaceholderKey="search"
columns={[
{
name: "name",

View file

@ -114,7 +114,7 @@ export const AddStepModal = ({ name, type, onSelect }: AddStepModalProps) => {
key="add"
onClick={() => onSelect(value)}
>
{t("common:add")}
{t("add")}
</Button>,
<Button
data-testid="cancel"
@ -125,7 +125,7 @@ export const AddStepModal = ({ name, type, onSelect }: AddStepModalProps) => {
onSelect();
}}
>
{t("common:cancel")}
{t("cancel")}
</Button>,
]}
>
@ -141,7 +141,7 @@ export const AddStepModal = ({ name, type, onSelect }: AddStepModalProps) => {
setMax(max);
}}
inputGroupName="search"
inputGroupPlaceholder={t("common:search")}
inputGroupPlaceholder={t("search")}
inputGroupOnEnter={setSearch}
>
<AuthenticationProviderList

View file

@ -77,7 +77,7 @@ export const AddSubFlowModal = ({
type="submit"
form="sub-flow-form"
>
{t("common:add")}
{t("add")}
</Button>,
<Button
key="cancel"
@ -85,16 +85,16 @@ export const AddSubFlowModal = ({
variant={ButtonVariant.link}
onClick={onCancel}
>
{t("common:cancel")}
{t("cancel")}
</Button>,
]}
isOpen
>
<Form id="sub-flow-form" onSubmit={handleSubmit(onConfirm)} isHorizontal>
<FormGroup
label={t("common:name")}
label={t("name")}
fieldId="name"
helperTextInvalid={t("common:required")}
helperTextInvalid={t("required")}
validated={
errors.name ? ValidatedOptions.error : ValidatedOptions.default
}
@ -113,7 +113,7 @@ export const AddSubFlowModal = ({
/>
</FormGroup>
<FormGroup
label={t("common:description")}
label={t("description")}
fieldId="description"
labelIcon={
<HelpItem

View file

@ -65,7 +65,7 @@ export default function CreateFlow() {
<FlowType />
<ActionGroup>
<Button data-testid="create" type="submit">
{t("common:create")}
{t("create")}
</Button>
<Button
data-testid="cancel"
@ -74,7 +74,7 @@ export default function CreateFlow() {
<Link {...props} to={toAuthentication({ realm })}></Link>
)}
>
{t("common:cancel")}
{t("cancel")}
</Button>
</ActionGroup>
</FormAccess>

View file

@ -17,9 +17,9 @@ export const NameDescription = () => {
return (
<>
<FormGroup
label={t("common:name")}
label={t("name")}
fieldId="kc-name"
helperTextInvalid={t("common:required")}
helperTextInvalid={t("required")}
validated={
errors.alias ? ValidatedOptions.error : ValidatedOptions.default
}
@ -38,7 +38,7 @@ export const NameDescription = () => {
/>
</FormGroup>
<FormGroup
label={t("common:description")}
label={t("description")}
fieldId="kc-description"
labelIcon={
<HelpItem
@ -62,7 +62,7 @@ export const NameDescription = () => {
{...register("description", {
maxLength: {
value: 255,
message: t("common:maxLength", { length: 255 }),
message: t("maxLength", { length: 255 }),
},
})}
/>

View file

@ -154,23 +154,23 @@ export const CibaPolicy = ({ realm, realmUpdated }: CibaPolicyProps) => {
{...register("attributes.cibaExpiresIn", {
min: {
value: CIBA_EXPIRES_IN_MIN,
message: t("common:greaterThan", {
message: t("greaterThan", {
value: CIBA_EXPIRES_IN_MIN,
}),
},
max: {
value: CIBA_EXPIRES_IN_MAX,
message: t("common:lessThan", { value: CIBA_EXPIRES_IN_MAX }),
message: t("lessThan", { value: CIBA_EXPIRES_IN_MAX }),
},
required: {
value: true,
message: t("common:required"),
message: t("required"),
},
})}
validated={errors.attributes?.cibaExpiresIn ? "error" : "default"}
/>
<InputGroupText variant="plain">
{t("common:times:seconds")}
{t("times:seconds")}
</InputGroupText>
</InputGroup>
</FormGroup>
@ -196,23 +196,23 @@ export const CibaPolicy = ({ realm, realmUpdated }: CibaPolicyProps) => {
{...register("attributes.cibaInterval", {
min: {
value: CIBA_INTERVAL_MIN,
message: t("common:greaterThan", {
message: t("greaterThan", {
value: CIBA_INTERVAL_MIN,
}),
},
max: {
value: CIBA_INTERVAL_MAX,
message: t("common:lessThan", { value: CIBA_INTERVAL_MAX }),
message: t("lessThan", { value: CIBA_INTERVAL_MAX }),
},
required: {
value: true,
message: t("common:required"),
message: t("required"),
},
})}
validated={errors.attributes?.cibaInterval ? "error" : "default"}
/>
<InputGroupText variant="plain">
{t("common:times:seconds")}
{t("times:seconds")}
</InputGroupText>
</InputGroup>
</FormGroup>
@ -247,14 +247,14 @@ export const CibaPolicy = ({ realm, realmUpdated }: CibaPolicyProps) => {
type="submit"
isDisabled={!isValid || !isDirty}
>
{t("common:save")}
{t("save")}
</Button>
<Button
data-testid="reload"
variant={ButtonVariant.link}
onClick={() => setupForm({ ...realm })}
>
{t("common:reload")}
{t("reload")}
</Button>
</ActionGroup>
</FormAccess>

View file

@ -360,8 +360,8 @@ export const OtpPolicy = ({ realm, realmUpdated }: OtpPolicyProps) => {
render={({ field }) => (
<Switch
id="otpPolicyCodeReusable"
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked={field.value}
onChange={field.onChange}
/>
@ -377,14 +377,14 @@ export const OtpPolicy = ({ realm, realmUpdated }: OtpPolicyProps) => {
type="submit"
isDisabled={!isValid || !isDirty}
>
{t("common:save")}
{t("save")}
</Button>
<Button
data-testid="reload"
variant={ButtonVariant.link}
onClick={() => reset({ ...realm })}
>
{t("common:reload")}
{t("reload")}
</Button>
</ActionGroup>
</FormAccess>

View file

@ -164,14 +164,14 @@ export const PasswordPolicy = ({
type="submit"
isDisabled={!isDirty}
>
{t("common:save")}
{t("save")}
</Button>
<Button
data-testid="reload"
variant={ButtonVariant.link}
onClick={() => setupForm(realm)}
>
{t("common:reload")}
{t("reload")}
</Button>
</ActionGroup>
</FormAccess>

View file

@ -22,7 +22,7 @@ export const Policies = () => {
async () => {
const realm = await adminClient.realms.findOne({ realm: realmName });
if (!realm) {
throw new Error(t("common:notFound"));
throw new Error(t("notFound"));
}
return realm;
},

View file

@ -38,7 +38,7 @@ export const PolicyRow = ({
label={displayName}
fieldId={id!}
isRequired
helperTextInvalid={t("common:required")}
helperTextInvalid={t("required")}
validated={
errors[id!] ? ValidatedOptions.error : ValidatedOptions.default
}
@ -93,8 +93,8 @@ export const PolicyRow = ({
{!configType && (
<Switch
id={id!}
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked
isDisabled
aria-label={displayName}
@ -107,7 +107,7 @@ export const PolicyRow = ({
variant="link"
className="keycloak__policies_authentication__minus-icon"
onClick={() => onRemove(id)}
aria-label={t("common:remove")}
aria-label={t("remove")}
>
<MinusCircleIcon />
</Button>

View file

@ -212,7 +212,7 @@ export const WebauthnPolicy = ({
<FormGroup
label={t("webAuthnPolicyRpEntityName")}
fieldId="webAuthnPolicyRpEntityName"
helperTextInvalid={t("common:required")}
helperTextInvalid={t("required")}
validated={errors.webAuthnPolicyRpEntityName ? "error" : "default"}
isRequired
labelIcon={
@ -324,8 +324,8 @@ export const WebauthnPolicy = ({
render={({ field }) => (
<Switch
id="webAuthnPolicyAvoidSameAuthenticatorRegister"
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked={field.value}
onChange={field.onChange}
aria-label={t("webAuthnPolicyAvoidSameAuthenticatorRegister")}
@ -358,14 +358,14 @@ export const WebauthnPolicy = ({
type="submit"
isDisabled={!isDirty}
>
{t("common:save")}
{t("save")}
</Button>
<Button
data-testid="reload"
variant={ButtonVariant.link}
onClick={() => setupForm(realm)}
>
{t("common:reload")}
{t("reload")}
</Button>
</ActionGroup>
</FormAccess>

View file

@ -154,7 +154,7 @@ export default function ClientScopesSection() {
name: selectedScopes[0]?.name,
}),
messageKey: "deleteConfirmClientScopes",
continueButtonLabel: "common:delete",
continueButtonLabel: "delete",
continueButtonVariant: ButtonVariant.danger,
onConfirm: async () => {
try {
@ -258,7 +258,7 @@ export default function ClientScopesSection() {
setKebabOpen(false);
}}
>
{t("common:delete")}
{t("delete")}
</DropdownItem>,
]}
/>
@ -267,7 +267,7 @@ export default function ClientScopesSection() {
}
actions={[
{
title: t("common:delete"),
title: t("delete"),
onRowClick: (clientScope) => {
setSelectedScopes([clientScope]);
toggleDeleteDialog();

View file

@ -34,7 +34,7 @@ export default function CreateClientScope() {
});
if (!scope) {
throw new Error(t("common:notFound"));
throw new Error(t("notFound"));
}
await changeScope({ ...clientScope, id: scope.id }, clientScope.type);

View file

@ -63,7 +63,7 @@ export default function EditClientScope() {
const clientScope = await adminClient.clientScopes.findOne({ id });
if (!clientScope) {
throw new Error(t("common:notFound"));
throw new Error(t("notFound"));
}
return {
@ -132,7 +132,7 @@ export default function EditClientScope() {
name: clientScope?.name,
}),
messageKey: "deleteConfirmClientScopes",
continueButtonLabel: "common:delete",
continueButtonLabel: "delete",
continueButtonVariant: ButtonVariant.danger,
onConfirm: async () => {
try {
@ -195,9 +195,9 @@ export default function EditClientScope() {
mappers as ProtocolMapperRepresentation[],
);
refresh();
addAlert(t("common:mappingCreatedSuccess"), AlertVariant.success);
addAlert(t("mappingCreatedSuccess"), AlertVariant.success);
} catch (error) {
addError("common:mappingCreatedError", error);
addError("mappingCreatedError", error);
}
}
};
@ -208,10 +208,10 @@ export default function EditClientScope() {
id: clientScope!.id!,
mapperId: mapper.id!,
});
addAlert(t("common:mappingDeletedSuccess"), AlertVariant.success);
addAlert(t("mappingDeletedSuccess"), AlertVariant.success);
refresh();
} catch (error) {
addError("common:mappingDeletedError", error);
addError("mappingDeletedError", error);
}
return true;
};
@ -227,7 +227,7 @@ export default function EditClientScope() {
titleKey={clientScope.name!}
dropdownItems={[
<DropdownItem key="delete" onClick={toggleDeleteDialog}>
{t("common:delete")}
{t("delete")}
</DropdownItem>,
]}
badges={[{ text: clientScope.protocol }]}
@ -239,7 +239,7 @@ export default function EditClientScope() {
<Tab
id="settings"
data-testid="settings"
title={<TabTitleText>{t("common:settings")}</TabTitleText>}
title={<TabTitleText>{t("settings")}</TabTitleText>}
{...settingsTab}
>
<PageSection variant="light">
@ -249,7 +249,7 @@ export default function EditClientScope() {
<Tab
id="mappers"
data-testid="mappers"
title={<TabTitleText>{t("common:mappers")}</TabTitleText>}
title={<TabTitleText>{t("mappers")}</TabTitleText>}
{...mappersTab}
>
<MapperList

View file

@ -82,7 +82,7 @@ export const AddMapperDialog = (props: AddMapperDialogProps) => {
const isBuiltIn = !!props.filter;
const header = [t("common:name"), t("common:description")];
const header = [t("name"), t("description")];
return (
<Modal
@ -122,7 +122,7 @@ export const AddMapperDialog = (props: AddMapperDialogProps) => {
props.toggleDialog();
}}
>
{t("common:add")}
{t("add")}
</Button>,
<Button
id="modal-cancel"
@ -133,7 +133,7 @@ export const AddMapperDialog = (props: AddMapperDialogProps) => {
props.toggleDialog();
}}
>
{t("common:cancel")}
{t("cancel")}
</Button>,
]
: []
@ -188,20 +188,20 @@ export const AddMapperDialog = (props: AddMapperDialogProps) => {
onSelect={setSelectedRows}
canSelectAll
ariaLabelKey="addPredefinedMappers"
searchPlaceholderKey="common:searchForMapper"
searchPlaceholderKey="searchForMapper"
columns={[
{
name: "id",
displayKey: "common:name",
displayKey: "name",
},
{
name: "description",
displayKey: "common:description",
displayKey: "description",
},
]}
emptyState={
<ListEmptyState
message={t("common:emptyMappers")}
message={t("emptyMappers")}
instructions={t("emptyBuiltInMappersInstructions")}
/>
}

View file

@ -106,7 +106,7 @@ export const MapperList = ({
key={key}
loader={loader}
ariaLabelKey="clientScopeList"
searchPlaceholderKey="common:searchForMapper"
searchPlaceholderKey="searchForMapper"
toolbarItem={
<Dropdown
onSelect={() => setMapperAction(false)}
@ -117,7 +117,7 @@ export const MapperList = ({
onToggle={() => setMapperAction(!mapperAction)}
toggleIndicator={CaretDownIcon}
>
{t("common:addMapper")}
{t("addMapper")}
</DropdownToggle>
}
isOpen={mapperAction}
@ -139,7 +139,7 @@ export const MapperList = ({
}
actions={[
{
title: t("common:delete"),
title: t("delete"),
onRowClick: onDelete,
} as Action<Row>,
]}
@ -160,11 +160,11 @@ export const MapperList = ({
]}
emptyState={
<ListEmptyState
message={t("common:emptyMappers")}
instructions={t("common:emptyMappersInstructions")}
message={t("emptyMappers")}
instructions={t("emptyMappersInstructions")}
secondaryActions={[
{
text: t("common:emptyPrimaryAction"),
text: t("emptyPrimaryAction"),
onClick: () => toggleAddMapperDialog(true),
},
{

View file

@ -78,7 +78,7 @@ export default function MappingDetails() {
});
}
if (!data) {
throw new Error(t("common:notFound"));
throw new Error(t("notFound"));
}
const mapperTypes = serverInfo.protocolMapperTypes![data!.protocol!];
@ -99,7 +99,7 @@ export default function MappingDetails() {
? await adminClient.clientScopes.findOne({ id })
: await adminClient.clients.findOne({ id });
if (!model) {
throw new Error(t("common:notFound"));
throw new Error(t("notFound"));
}
const protocolMappers =
serverInfo.protocolMapperTypes![model.protocol!];
@ -107,7 +107,7 @@ export default function MappingDetails() {
(mapper) => mapper.id === mapperId,
);
if (!mapping) {
throw new Error(t("common:notFound"));
throw new Error(t("notFound"));
}
return {
mapping,
@ -129,9 +129,9 @@ export default function MappingDetails() {
);
const [toggleDeleteDialog, DeleteConfirm] = useConfirmDialog({
titleKey: "common:deleteMappingTitle",
messageKey: "common:deleteMappingConfirm",
continueButtonLabel: "common:delete",
titleKey: "deleteMappingTitle",
messageKey: "deleteMappingConfirm",
continueButtonLabel: "delete",
continueButtonVariant: ButtonVariant.danger,
onConfirm: async () => {
try {
@ -146,10 +146,10 @@ export default function MappingDetails() {
mapperId,
});
}
addAlert(t("common:mappingDeletedSuccess"), AlertVariant.success);
addAlert(t("mappingDeletedSuccess"), AlertVariant.success);
navigate(toDetails());
} catch (error) {
addError("common:mappingDeletedError", error);
addError("mappingDeletedError", error);
}
},
});
@ -173,9 +173,9 @@ export default function MappingDetails() {
? await adminClient.clientScopes.addProtocolMapper({ id }, mapping)
: await adminClient.clients.addProtocolMapper({ id }, mapping);
}
addAlert(t(`common:mapping${key}Success`), AlertVariant.success);
addAlert(t(`mapping${key}Success`), AlertVariant.success);
} catch (error) {
addError(`common:mapping${key}Error`, error);
addError(`mapping${key}Error`, error);
}
};
@ -183,7 +183,7 @@ export default function MappingDetails() {
<>
<DeleteConfirm />
<ViewHeader
titleKey={isUpdating ? mapping?.name! : t("common:addMapper")}
titleKey={isUpdating ? mapping?.name! : t("addMapper")}
subKey={isUpdating ? mapperId : "addMapperExplain"}
dropdownItems={
isUpdating
@ -193,7 +193,7 @@ export default function MappingDetails() {
value="delete"
onClick={toggleDeleteDialog}
>
{t("common:delete")}
{t("delete")}
</DropdownItem>,
]
: undefined
@ -205,7 +205,7 @@ export default function MappingDetails() {
onSubmit={handleSubmit(save)}
role="manage-clients"
>
<FormGroup label={t("common:mapperType")} fieldId="mapperType">
<FormGroup label={t("mapperType")} fieldId="mapperType">
<KeycloakTextInput
type="text"
id="mapperType"
@ -215,7 +215,7 @@ export default function MappingDetails() {
/>
</FormGroup>
<FormGroup
label={t("common:name")}
label={t("name")}
labelIcon={
<HelpItem helpText={t("mapperName")} fieldLabelId="name" />
}
@ -224,7 +224,7 @@ export default function MappingDetails() {
validated={
errors.name ? ValidatedOptions.error : ValidatedOptions.default
}
helperTextInvalid={t("common:required")}
helperTextInvalid={t("required")}
>
<KeycloakTextInput
id="name"
@ -243,13 +243,13 @@ export default function MappingDetails() {
</FormProvider>
<ActionGroup>
<Button variant="primary" type="submit">
{t("common:save")}
{t("save")}
</Button>
<Button
variant="link"
component={(props) => <Link {...props} to={toDetails()} />}
>
{t("common:cancel")}
{t("cancel")}
</Button>
</ActionGroup>
</FormAccess>

View file

@ -88,7 +88,7 @@ export const ScopeForm = ({ clientScope, save }: ScopeFormProps) => {
isHorizontal
>
<FormGroup
label={t("common:name")}
label={t("name")}
labelIcon={
<HelpItem helpText={t("scopeNameHelp")} fieldLabelId="name" />
}
@ -96,7 +96,7 @@ export const ScopeForm = ({ clientScope, save }: ScopeFormProps) => {
validated={
errors.name ? ValidatedOptions.error : ValidatedOptions.default
}
helperTextInvalid={t("common:required")}
helperTextInvalid={t("required")}
isRequired
>
<KeycloakTextInput
@ -141,7 +141,7 @@ export const ScopeForm = ({ clientScope, save }: ScopeFormProps) => {
</FormProvider>
)}
<FormGroup
label={t("common:description")}
label={t("description")}
labelIcon={
<HelpItem
helpText={t("scopeDescriptionHelp")}
@ -152,7 +152,7 @@ export const ScopeForm = ({ clientScope, save }: ScopeFormProps) => {
validated={
errors.description ? ValidatedOptions.error : ValidatedOptions.default
}
helperTextInvalid={t("common:maxLength", { length: 255 })}
helperTextInvalid={t("maxLength", { length: 255 })}
>
<KeycloakTextInput
id="kc-description"
@ -253,8 +253,8 @@ export const ScopeForm = ({ clientScope, save }: ScopeFormProps) => {
render={({ field }) => (
<Switch
id="kc-display-on-consent-screen"
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked={field.value === "true"}
onChange={(value) => field.onChange(value.toString())}
/>
@ -302,8 +302,8 @@ export const ScopeForm = ({ clientScope, save }: ScopeFormProps) => {
render={({ field }) => (
<Switch
id="kc-include-in-token-scope"
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked={field.value === "true"}
onChange={(value) => field.onChange(value.toString())}
/>
@ -340,7 +340,7 @@ export const ScopeForm = ({ clientScope, save }: ScopeFormProps) => {
type="submit"
isDisabled={!isDirty || !isValid}
>
{t("common:save")}
{t("save")}
</Button>
<Button
variant="link"
@ -348,7 +348,7 @@ export const ScopeForm = ({ clientScope, save }: ScopeFormProps) => {
<Link {...props} to={toClientScopes({ realm })}></Link>
)}
>
{t("common:cancel")}
{t("cancel")}
</Button>
</ActionGroup>
</FormAccess>

View file

@ -111,8 +111,8 @@ export const SearchToolbar = ({
isOpen={open}
selections={[
type === AllClientScopes.none
? t("common:allTypes")
: t(`common:clientScope.${type}`),
? t("allTypes")
: t(`clientScopeTypes.${type}`),
]}
onSelect={(_, value) => {
onType(value as AllClientScopes);
@ -120,7 +120,7 @@ export const SearchToolbar = ({
}}
>
<SelectOption value={AllClientScopes.none}>
{t("common:allTypes")}
{t("allTypes")}
</SelectOption>
<>{clientScopeTypesSelectOptions(t)}</>
</Select>

View file

@ -14,7 +14,7 @@ const MappingDetails = lazy(() => import("../details/MappingDetails"));
export const MapperRoute: AppRouteObject = {
path: "/:realm/client-scopes/:id/mappers/:mapperId",
element: <MappingDetails />,
breadcrumb: (t) => t("common:mappingDetails"),
breadcrumb: (t) => t("mappingDetails"),
handle: {
access: "view-clients",
},

View file

@ -17,23 +17,23 @@ export const ClientDescription = ({
<FormAccess role="manage-clients" fineGrainedAccess={configure} unWrap>
<TextControl
name="clientId"
label={t("common:clientId")}
label={t("clientId")}
labelIcon={t("clientIdHelp")}
rules={{ required: { value: true, message: t("common:required") } }}
rules={{ required: { value: true, message: t("required") } }}
/>
<TextControl
name="name"
label={t("common:name")}
label={t("name")}
labelIcon={t("clientNameHelp")}
/>
<TextAreaControl
name="description"
label={t("common:description")}
label={t("description")}
labelIcon={t("clientDescriptionHelp")}
rules={{
maxLength: {
value: 255,
message: t("common:maxLength", { length: 255 }),
message: t("maxLength", { length: 255 }),
},
}}
/>

View file

@ -96,7 +96,7 @@ const ClientDetailHeader = ({
const [toggleDisableDialog, DisableConfirm] = useConfirmDialog({
titleKey: "disableConfirmTitle",
messageKey: "disableConfirm",
continueButtonLabel: "common:disable",
continueButtonLabel: "disable",
onConfirm: () => {
onChange(!value);
save();
@ -136,7 +136,7 @@ const ClientDetailHeader = ({
{t("downloadAdapterConfig")}
</DropdownItem>,
<DropdownItem key="export" onClick={() => exportClient(client)}>
{t("common:export")}
{t("export")}
</DropdownItem>,
...(!isRealmClient(client) && isManager
? [
@ -146,7 +146,7 @@ const ClientDetailHeader = ({
key="delete"
onClick={toggleDeleteDialog}
>
{t("common:delete")}
{t("delete")}
</DropdownItem>,
]
: []),
@ -275,7 +275,7 @@ export default function ClientDetails() {
const [toggleDeleteDialog, DeleteConfirm] = useConfirmDialog({
titleKey: "clientDeleteConfirmTitle",
messageKey: "clientDeleteConfirm",
continueButtonLabel: "common:delete",
continueButtonLabel: "delete",
continueButtonVariant: ButtonVariant.danger,
onConfirm: async () => {
try {
@ -306,7 +306,7 @@ export default function ClientDetails() {
() => adminClient.clients.findOne({ id: clientId }),
(fetchedClient) => {
if (!fetchedClient) {
throw new Error(t("common:notFound"));
throw new Error(t("notFound"));
}
setClient(cloneDeep(fetchedClient));
setupForm(fetchedClient);
@ -372,8 +372,8 @@ export default function ClientDetails() {
return (
<>
<ConfirmDialogModal
continueButtonLabel="common:yes"
cancelButtonLabel="common:no"
continueButtonLabel="yes"
cancelButtonLabel="no"
titleKey={t("changeAuthenticatorConfirmTitle", {
clientAuthenticatorType: clientAuthenticatorType,
})}
@ -422,7 +422,7 @@ export default function ClientDetails() {
<Tab
id="settings"
data-testid="clientSettingsTab"
title={<TabTitleText>{t("common:settings")}</TabTitleText>}
title={<TabTitleText>{t("settings")}</TabTitleText>}
{...settingsTab}
>
<ClientSettings
@ -581,9 +581,7 @@ export default function ClientDetails() {
<Tab
id="permissions"
data-testid="authorizationPermissions"
title={
<TabTitleText>{t("common:permissions")}</TabTitleText>
}
title={<TabTitleText>{t("permissions")}</TabTitleText>}
{...authorizationPermissionsTab}
>
<AuthorizationPermissions clientId={clientId} />
@ -599,7 +597,7 @@ export default function ClientDetails() {
<Tab
id="export"
data-testid="authorizationExport"
title={<TabTitleText>{t("common:export")}</TabTitleText>}
title={<TabTitleText>{t("export")}</TabTitleText>}
{...authorizationExportTab}
>
<AuthorizationExport />
@ -630,7 +628,7 @@ export default function ClientDetails() {
<Tab
id="permissions"
data-testid="permissionsTab"
title={<TabTitleText>{t("common:permissions")}</TabTitleText>}
title={<TabTitleText>{t("permissions")}</TabTitleText>}
{...permissionsTab}
>
<PermissionsTab id={client.id!} type="clients" />

View file

@ -52,7 +52,7 @@ const ClientDetailLink = (client: ClientRepresentation) => {
{client.clientId}
{!client.enabled && (
<Badge key={`${client.id}-disabled`} isRead className="pf-u-ml-sm">
{t("common:disabled")}
{t("disabled")}
</Badge>
)}
</Link>
@ -147,7 +147,7 @@ export default function ClientsSection() {
const [toggleDeleteDialog, DeleteConfirm] = useConfirmDialog({
titleKey: t("clientDelete", { clientId: selectedClient?.clientId }),
messageKey: "clientDeleteConfirm",
continueButtonLabel: "common:delete",
continueButtonLabel: "delete",
continueButtonVariant: ButtonVariant.danger,
onConfirm: async () => {
try {
@ -196,7 +196,7 @@ export default function ClientsSection() {
const client: ClientRepresentation = rowData.data;
const actions: Action<ClientRepresentation>[] = [
{
title: t("common:export"),
title: t("export"),
onClick() {
exportClient(client);
},
@ -208,7 +208,7 @@ export default function ClientsSection() {
(isManager || client.access?.configure)
) {
actions.push({
title: t("common:delete"),
title: t("delete"),
onClick() {
setSelectedClient(client);
toggleDeleteDialog();
@ -221,26 +221,26 @@ export default function ClientsSection() {
columns={[
{
name: "clientId",
displayKey: "common:clientId",
displayKey: "clientId",
transforms: [cellWidth(20)],
cellRenderer: ClientDetailLink,
},
{
name: "clientName",
displayKey: "common:clientName",
displayKey: "clientName",
transforms: [cellWidth(20)],
cellRenderer: ClientName,
},
{
name: "protocol",
displayKey: "common:type",
displayKey: "type",
transforms: [cellWidth(10)],
cellRenderer: (client) =>
getProtocolName(t, client.protocol ?? "openid-connect"),
},
{
name: "description",
displayKey: "common:description",
displayKey: "description",
transforms: [cellWidth(30)],
cellRenderer: ClientDescription,
},

View file

@ -59,8 +59,8 @@ export const CapabilityConfig = ({
<Switch
data-testid="authentication"
id="kc-authentication-switch"
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked={!field.value}
onChange={(value) => {
field.onChange(!value);
@ -99,8 +99,8 @@ export const CapabilityConfig = ({
<Switch
data-testid="authorization"
id="kc-authorization-switch"
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked={field.value && !clientAuthentication}
onChange={(value) => {
field.onChange(value);
@ -293,8 +293,8 @@ export const CapabilityConfig = ({
<Switch
data-testid="encrypt"
id="kc-encrypt"
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked={field.value}
onChange={field.onChange}
aria-label={t("encryptAssertions")}
@ -323,8 +323,8 @@ export const CapabilityConfig = ({
<Switch
data-testid="client-signature"
id="kc-client-signature"
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked={field.value}
onChange={field.onChange}
aria-label={t("clientSignature")}

View file

@ -50,14 +50,14 @@ export const LoginSettingsPanel = ({ access }: { access?: boolean }) => {
field.onChange(value.toString());
setLoginThemeOpen(false);
}}
selections={field.value || t("common:choose")}
selections={field.value || t("choose")}
variant={SelectVariant.single}
aria-label={t("loginTheme")}
isOpen={loginThemeOpen}
>
{[
<SelectOption key="empty" value="">
{t("common:choose")}
{t("choose")}
</SelectOption>,
...loginThemes.map((theme) => (
<SelectOption
@ -89,8 +89,8 @@ export const LoginSettingsPanel = ({ access }: { access?: boolean }) => {
render={({ field }) => (
<Switch
id="kc-consent-switch"
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked={field.value}
onChange={field.onChange}
aria-label={t("consentRequired")}
@ -118,8 +118,8 @@ export const LoginSettingsPanel = ({ access }: { access?: boolean }) => {
render={({ field }) => (
<Switch
id="kc-display-on-client-switch"
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked={field.value === "true"}
onChange={(value) => field.onChange("" + value)}
isDisabled={!consentRequired}

View file

@ -60,8 +60,8 @@ export const LogoutPanel = ({
render={({ field }) => (
<Switch
id="kc-frontchannelLogout-switch"
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked={field.value}
onChange={field.onChange}
aria-label={t("frontchannelLogout")}
@ -169,8 +169,8 @@ export const LogoutPanel = ({
render={({ field }) => (
<Switch
id="backchannelLogoutSessionRequired"
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked={field.value === "true"}
onChange={(value) => field.onChange(value.toString())}
aria-label={t("backchannelLogoutSessionRequired")}
@ -198,8 +198,8 @@ export const LogoutPanel = ({
render={({ field }) => (
<Switch
id="backchannelLogoutRevokeOfflineSessions"
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked={field.value === "true"}
onChange={(value) => field.onChange(value.toString())}
aria-label={t("backchannelLogoutRevokeOfflineSessions")}

View file

@ -144,7 +144,7 @@ export default function NewClientForm() {
forward(onNext);
}}
>
{isFinalStep() ? t("common:save") : t("common:next")}
{isFinalStep() ? t("save") : t("next")}
</Button>
<Button
variant="secondary"
@ -155,14 +155,14 @@ export default function NewClientForm() {
}}
isDisabled={activeStep.name === t("generalSettings")}
>
{t("common:back")}
{t("back")}
</Button>
<Button
data-testid="cancel"
variant="link"
onClick={onClose}
>
{t("common:cancel")}
{t("cancel")}
</Button>
</>
)}

View file

@ -42,8 +42,8 @@ export const Toggle = ({ name, label }: ToggleProps) => {
<Switch
id={name!}
data-testid={label}
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked={field.value === "true"}
onChange={(value) => field.onChange(value.toString())}
aria-label={t(label)}

View file

@ -67,7 +67,7 @@ export const AddHostDialog = ({
form="add-host-form"
isDisabled={!isDirty || !isValid}
>
{t("common:save")}
{t("save")}
</Button>,
<Button
key="cancel"
@ -75,7 +75,7 @@ export const AddHostDialog = ({
variant={ButtonVariant.link}
onClick={onClose}
>
{t("common:cancel")}
{t("cancel")}
</Button>,
]}
>

View file

@ -160,8 +160,8 @@ export const AdvancedSettings = ({
render={({ field }) => (
<Switch
id="oAuthMutual-switch"
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked={field.value === "true"}
onChange={(value) => field.onChange("" + value)}
aria-label={t("oAuthMutual")}
@ -190,8 +190,8 @@ export const AdvancedSettings = ({
render={({ field }) => (
<Switch
id="oAuthDPoP-switch"
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked={field.value === "true"}
onChange={(value) => field.onChange("" + value)}
aria-label={t("oAuthDPoP")}
@ -227,11 +227,11 @@ export const AdvancedSettings = ({
field.onChange(value);
setOpen(false);
}}
selections={[field.value || t("common:choose")]}
selections={[field.value || t("choose")]}
>
{["", "S256", "plain"].map((v) => (
<SelectOption key={v} value={v}>
{v || t("common:choose")}
{v || t("choose")}
</SelectOption>
))}
</Select>
@ -257,8 +257,8 @@ export const AdvancedSettings = ({
render={({ field }) => (
<Switch
id="pushedAuthorizationRequestRequired"
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked={field.value === "true"}
onChange={(value) => field.onChange(value.toString())}
aria-label={t("pushedAuthorizationRequestRequired")}
@ -305,10 +305,10 @@ export const AdvancedSettings = ({
onClick={save}
data-testid="OIDCAdvancedSave"
>
{t("common:save")}
{t("save")}
</Button>
<Button variant="link" onClick={reset} data-testid="OIDCAdvancedRevert">
{t("common:revert")}
{t("revert")}
</Button>
</ActionGroup>
</FormAccess>

View file

@ -46,7 +46,7 @@ export const AuthenticationOverrides = ({
filteredFlows = sortBy(filteredFlows, [(f) => f.alias]);
setFlows([
<SelectOption key="empty" value="">
{t("common:choose")}
{t("choose")}
</SelectOption>,
...filteredFlows.map((flow) => (
<SelectOption key={flow.id} value={flow.id}>
@ -134,14 +134,14 @@ export const AuthenticationOverrides = ({
onClick={save}
data-testid="OIDCAuthFlowOverrideSave"
>
{t("common:save")}
{t("save")}
</Button>
<Button
variant="link"
onClick={reset}
data-testid="OIDCAuthFlowOverrideRevert"
>
{t("common:revert")}
{t("revert")}
</Button>
</ActionGroup>
</FormAccess>

View file

@ -56,7 +56,7 @@ export const ClusteringPanel = ({
messageKey: t("deleteNodeBody", {
node: selectedNode,
}),
continueButtonLabel: "common:delete",
continueButtonLabel: "delete",
continueButtonVariant: ButtonVariant.danger,
onConfirm: async () => {
try {
@ -103,7 +103,7 @@ export const ClusteringPanel = ({
</SplitItem>
<SplitItem>
<Button variant={ButtonVariant.secondary} onClick={() => save()}>
{t("common:save")}
{t("save")}
</Button>
</SplitItem>
</Split>
@ -160,7 +160,7 @@ export const ClusteringPanel = ({
}
actions={[
{
title: t("common:delete"),
title: t("delete"),
onRowClick: (node) => {
setSelectedNode(node.host);
toggleDeleteNodeConfirm();

View file

@ -72,7 +72,7 @@ export const FineGrainOpenIdConnect = ({
const keyOptions = [
<SelectOption key="empty" value="">
{t("common:choose")}
{t("choose")}
</SelectOption>,
...sortProviders(clientSignatureProviders!).map((p) => (
<SelectOption key={p} value={p} />
@ -80,7 +80,7 @@ export const FineGrainOpenIdConnect = ({
];
const cekManagementOptions = [
<SelectOption key="empty" value="">
{t("common:choose")}
{t("choose")}
</SelectOption>,
...sortProviders(cekManagementProviders!).map((p) => (
<SelectOption key={p} value={p} />
@ -96,7 +96,7 @@ export const FineGrainOpenIdConnect = ({
];
const contentOptions = [
<SelectOption key="empty" value="">
{t("common:choose")}
{t("choose")}
</SelectOption>,
...sortProviders(contentEncryptionProviders!).map((p) => (
<SelectOption key={p} value={p} />
@ -105,10 +105,10 @@ export const FineGrainOpenIdConnect = ({
const requestObjectOptions = [
<SelectOption key="any" value="any">
{t("common:any")}
{t("any")}
</SelectOption>,
<SelectOption key="none" value="none">
{t("common:none")}
{t("none")}
</SelectOption>,
...sortProviders(clientSignatureProviders!).map((p) => (
<SelectOption key={p} value={p} />
@ -117,7 +117,7 @@ export const FineGrainOpenIdConnect = ({
const requestObjectEncryptionOptions = [
<SelectOption key="any" value="any">
{t("common:any")}
{t("any")}
</SelectOption>,
...sortProviders(cekManagementProviders!).map((p) => (
<SelectOption key={p} value={p} />
@ -126,7 +126,7 @@ export const FineGrainOpenIdConnect = ({
const requestObjectEncodingOptions = [
<SelectOption key="any" value="any">
{t("common:any")}
{t("any")}
</SelectOption>,
...sortProviders(contentEncryptionProviders!).map((p) => (
<SelectOption key={p} value={p} />
@ -135,7 +135,7 @@ export const FineGrainOpenIdConnect = ({
const authorizationSignedResponseOptions = [
<SelectOption key="empty" value="">
{t("common:choose")}
{t("choose")}
</SelectOption>,
...sortProviders(signatureProviders!).map((p) => (
<SelectOption key={p} value={p} />
@ -643,10 +643,10 @@ export const FineGrainOpenIdConnect = ({
</FormGroup>
<ActionGroup>
<Button variant="secondary" id="fineGrainSave" onClick={save}>
{t("common:save")}
{t("save")}
</Button>
<Button id="fineGrainRevert" variant="link" onClick={reset}>
{t("common:revert")}
{t("revert")}
</Button>
</ActionGroup>
</FormAccess>

View file

@ -69,10 +69,10 @@ export const FineGrainSamlEndpointConfig = ({
<ActionGroup>
<Button variant="tertiary" onClick={save} data-testid="fineGrainSave">
{t("common:save")}
{t("save")}
</Button>
<Button variant="link" onClick={reset} data-testid="fineGrainRevert">
{t("common:revert")}
{t("revert")}
</Button>
</ActionGroup>
</FormAccess>

View file

@ -46,8 +46,8 @@ export const OpenIdConnectCompatibilityModes = ({
render={({ field }) => (
<Switch
id="excludeSessionStateFromAuthenticationResponse-switch"
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked={field.value === "true"}
onChange={(value) => field.onChange(value.toString())}
aria-label={t("excludeSessionStateFromAuthenticationResponse")}
@ -75,8 +75,8 @@ export const OpenIdConnectCompatibilityModes = ({
render={({ field }) => (
<Switch
id="excludeIssuerFromAuthenticationResponse-switch"
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked={field.value === "true"}
onChange={(value) => field.onChange(value.toString())}
aria-label={t("excludeIssuerFromAuthenticationResponse")}
@ -104,8 +104,8 @@ export const OpenIdConnectCompatibilityModes = ({
render={({ field }) => (
<Switch
id="useRefreshTokens"
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked={field.value === "true"}
onChange={(value) => field.onChange(value.toString())}
aria-label={t("useRefreshTokens")}
@ -133,8 +133,8 @@ export const OpenIdConnectCompatibilityModes = ({
render={({ field }) => (
<Switch
id="useRefreshTokenForClientCredentialsGrant"
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked={field.value === "true"}
onChange={(value) => field.onChange(value.toString())}
aria-label={t("useRefreshTokenForClientCredentialsGrant")}
@ -162,8 +162,8 @@ export const OpenIdConnectCompatibilityModes = ({
render={({ field }) => (
<Switch
id="useLowerCaseBearerType"
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked={field.value === "true"}
onChange={(value) => field.onChange(value.toString())}
aria-label={t("useLowerCaseBearerType")}
@ -177,14 +177,14 @@ export const OpenIdConnectCompatibilityModes = ({
onClick={save}
data-testid="OIDCCompatabilitySave"
>
{t("common:save")}
{t("save")}
</Button>
<Button
variant="link"
onClick={reset}
data-testid="OIDCCompatabilityRevert"
>
{t("common:revert")}
{t("revert")}
</Button>
</ActionGroup>
</FormAccess>

View file

@ -49,7 +49,7 @@ export const RevocationPanel = ({
if (date > 0) {
return formatDate(new Date(date * 1000), FORMAT_DATE_AND_TIME);
} else {
return t("common:none");
return t("none");
}
};

View file

@ -50,7 +50,7 @@ export const AuthorizationDataModal = ({
key="cancel"
onClick={toggle}
>
{t("common:cancel")}
{t("cancel")}
</Button>,
]}
>

View file

@ -228,7 +228,7 @@ const AuthorizationEvaluateContent = ({ client }: Props) => {
}
fieldId="realmRole"
validated={errors.roleIds ? "error" : "default"}
helperTextInvalid={t("common:required")}
helperTextInvalid={t("required")}
isRequired={user.length === 0}
>
<Controller
@ -298,8 +298,8 @@ const AuthorizationEvaluateContent = ({ client }: Props) => {
>
<Switch
id="applyToResource-switch"
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked={applyToResourceType}
onChange={setApplyToResourceType}
aria-label={t("applyToResourceType")}
@ -340,7 +340,7 @@ const AuthorizationEvaluateContent = ({ client }: Props) => {
}
fieldId="client"
validated={errors.alias ? "error" : "default"}
helperTextInvalid={t("common:required")}
helperTextInvalid={t("required")}
>
<KeycloakTextInput
id="alias"
@ -412,7 +412,7 @@ const AuthorizationEvaluateContent = ({ client }: Props) => {
fieldLabelId={`contextualAttributes`}
/>
}
helperTextInvalid={t("common:required")}
helperTextInvalid={t("required")}
fieldId="contextualAttributes"
>
<KeyBasedAttributeInput
@ -441,7 +441,7 @@ const AuthorizationEvaluateContent = ({ client }: Props) => {
variant="link"
onClick={() => reset()}
>
{t("common:revert")}
{t("revert")}
</Button>
</ActionGroup>
</FormProvider>

View file

@ -88,7 +88,7 @@ export const AuthorizationExport = () => {
data-testid="authorization-export-download"
onClick={() => exportAuthDetails()}
>
{t("common:download")}
{t("download")}
</Button>
<Button
data-testid="authorization-export-copy"

View file

@ -44,7 +44,7 @@ export function DetailDescriptionLink<T>({
</span>
);
})}
{array?.length === 0 && <i>{t("common:none")}</i>}
{array?.length === 0 && <i>{t("none")}</i>}
</DescriptionListDescription>
</DescriptionListGroup>
);

View file

@ -51,7 +51,7 @@ export const ImportDialog = ({ onConfirm, closeDialog }: ImportDialogProps) => {
closeDialog();
}}
>
{t("common:cancel")}
{t("cancel")}
</Button>,
]}
>
@ -118,8 +118,8 @@ export const ImportDialog = ({ onConfirm, closeDialog }: ImportDialogProps) => {
>
<Switch
id="allowRemoteResourceManagement"
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked={imported.allowRemoteResourceManagement}
isDisabled
aria-label={t("allowRemoteResourceManagement")}

View file

@ -113,8 +113,8 @@ const ValueInput = ({
name={`${name}.${rowIndex}.value`}
chipGroupProps={{
numChips: 1,
expandedText: t("common:hide"),
collapsedText: t("common:showRemaining"),
expandedText: t("hide"),
collapsedText: t("showRemaining"),
}}
onToggle={(open) => toggleValueSelect(rowIndex, open)}
isOpen={isValueOpenArray[rowIndex]}
@ -138,7 +138,7 @@ const ValueInput = ({
className="value-input"
defaultValue={attribute.value}
data-testid="attribute-value-input"
aria-label={t("common:value")}
aria-label={t("value")}
{...register(`${name}.${rowIndex}.value`)}
/>
)}
@ -236,7 +236,7 @@ export const KeyBasedAttributeInput = ({
variant="link"
className="kc-attributes__minus-icon"
onClick={() => remove(rowIndex)}
aria-label={t("common:remove")}
aria-label={t("remove")}
>
<MinusCircleIcon />
</Button>

View file

@ -11,7 +11,5 @@ export const MoreLabel = ({ array }: MoreLabelProps) => {
if (!array || array.length <= 1) {
return null;
}
return (
<Label color="blue">{t("common:more", { count: array.length - 1 })}</Label>
);
return <Label color="blue">{t("more", { count: array.length - 1 })}</Label>;
};

View file

@ -56,8 +56,8 @@ export const NewPolicyDialog = ({
<TableComposable aria-label={t("policies")} variant="compact">
<Thead>
<Tr>
<Th>{t("common:name")}</Th>
<Th>{t("common:description")}</Th>
<Th>{t("name")}</Th>
<Th>{t("description")}</Th>
</Tr>
</Thead>
<Tbody>

View file

@ -91,7 +91,7 @@ export default function PermissionDetails() {
]);
if (!permission) {
throw new Error(t("common:notFound"));
throw new Error(t("notFound"));
}
return {
@ -194,7 +194,7 @@ export default function PermissionDetails() {
data-testid="delete-resource"
onClick={() => toggleDeleteDialog()}
>
{t("common:delete")}
{t("delete")}
</DropdownItem>,
]
: undefined
@ -208,9 +208,9 @@ export default function PermissionDetails() {
>
<FormProvider {...form}>
<FormGroup
label={t("common:name")}
label={t("name")}
isRequired
helperTextInvalid={t("common:required")}
helperTextInvalid={t("required")}
validated={errors.name ? "error" : "default"}
fieldId="name"
labelIcon={
@ -224,7 +224,7 @@ export default function PermissionDetails() {
/>
</FormGroup>
<FormGroup
label={t("common:description")}
label={t("description")}
fieldId="description"
labelIcon={
<HelpItem
@ -241,7 +241,7 @@ export default function PermissionDetails() {
{...register("description", {
maxLength: {
value: 255,
message: t("common:maxLength", { length: 255 }),
message: t("maxLength", { length: 255 }),
},
})}
/>
@ -259,8 +259,8 @@ export default function PermissionDetails() {
<Switch
id="applyToResourceTypeFlag"
name="applyToResourceTypeFlag"
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked={applyToResourceTypeFlag}
onChange={setApplyToResourceTypeFlag}
aria-label={t("applyToResourceTypeFlag")}
@ -295,7 +295,7 @@ export default function PermissionDetails() {
fieldLabelId="resources"
/>
}
helperTextInvalid={t("common:required")}
helperTextInvalid={t("required")}
validated={errors.resources ? "error" : "default"}
isRequired={permissionType !== "scope"}
>
@ -325,7 +325,7 @@ export default function PermissionDetails() {
fieldLabelId="scopesSelect"
/>
}
helperTextInvalid={t("common:required")}
helperTextInvalid={t("required")}
validated={errors.scopes ? "error" : "default"}
isRequired
>
@ -393,7 +393,7 @@ export default function PermissionDetails() {
type="submit"
data-testid="save"
>
{t("common:save")}
{t("save")}
</Button>
<Button
@ -410,7 +410,7 @@ export default function PermissionDetails() {
></Link>
)}
>
{t("common:cancel")}
{t("cancel")}
</Button>
</div>
</ActionGroup>

View file

@ -267,10 +267,10 @@ export const AuthorizationPermissions = ({ clientId }: PermissionsProps) => {
<Thead>
<Tr>
<Th aria-hidden="true" />
<Th>{t("common:name")}</Th>
<Th>{t("common:type")}</Th>
<Th>{t("name")}</Th>
<Th>{t("type")}</Th>
<Th>{t("associatedPolicy")}</Th>
<Th>{t("common:description")}</Th>
<Th>{t("description")}</Th>
<Th aria-hidden="true" />
</Tr>
</Thead>
@ -317,7 +317,7 @@ export const AuthorizationPermissions = ({ clientId }: PermissionsProps) => {
actions={{
items: [
{
title: t("common:delete"),
title: t("delete"),
onClick: async () => {
setSelectedPermission(permission);
toggleDeleteDialog();
@ -373,8 +373,8 @@ export const AuthorizationPermissions = ({ clientId }: PermissionsProps) => {
{noData && searching && (
<ListEmptyState
isSearchVariant
message={t("common:noSearchResults")}
instructions={t("common:noSearchResultsInstructions")}
message={t("noSearchResults")}
instructions={t("noSearchResultsInstructions")}
/>
)}
</PageSection>

View file

@ -213,10 +213,10 @@ export const AuthorizationPolicies = ({ clientId }: PoliciesProps) => {
<Thead>
<Tr>
<Th aria-hidden="true" />
<Th>{t("common:name")}</Th>
<Th>{t("common:type")}</Th>
<Th>{t("name")}</Th>
<Th>{t("type")}</Th>
<Th>{t("dependentPermission")}</Th>
<Th>{t("common:description")}</Th>
<Th>{t("description")}</Th>
<Th aria-hidden="true" />
</Tr>
</Thead>
@ -258,7 +258,7 @@ export const AuthorizationPolicies = ({ clientId }: PoliciesProps) => {
actions={{
items: [
{
title: t("common:delete"),
title: t("delete"),
onClick: async () => {
setSelectedPolicy(policy);
toggleDeleteDialog();
@ -308,8 +308,8 @@ export const AuthorizationPolicies = ({ clientId }: PoliciesProps) => {
{noData && searching && (
<ListEmptyState
isSearchVariant
message={t("common:noSearchResults")}
instructions={t("common:noSearchResultsInstructions")}
message={t("noSearchResults")}
instructions={t("noSearchResultsInstructions")}
/>
)}
{noData && !searching && (

View file

@ -85,7 +85,7 @@ export default function ResourceDetails() {
]),
([client, resource, permissions]) => {
if (!client) {
throw new Error(t("common:notFound"));
throw new Error(t("notFound"));
}
setClient(client);
setPermission(permissions);
@ -176,7 +176,7 @@ export default function ResourceDetails() {
data-testid="delete-resource"
onClick={() => toggleDeleteDialog()}
>
{t("common:delete")}
{t("delete")}
</DropdownItem>,
]
: undefined
@ -204,12 +204,12 @@ export default function ResourceDetails() {
/>
</FormGroup>
<FormGroup
label={t("common:name")}
label={t("name")}
fieldId="name"
labelIcon={
<HelpItem helpText={t("resourceName")} fieldLabelId="name" />
}
helperTextInvalid={t("common:required")}
helperTextInvalid={t("required")}
validated={
errors.name ? ValidatedOptions.error : ValidatedOptions.default
}
@ -292,8 +292,8 @@ export default function ResourceDetails() {
render={({ field }) => (
<Switch
id="ownerManagedAccess"
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked={field.value}
onChange={field.onChange}
aria-label={t("ownerManagedAccess")}
@ -322,7 +322,7 @@ export default function ResourceDetails() {
type="submit"
data-testid="save"
>
{t("common:save")}
{t("save")}
</Button>
<Button
@ -339,7 +339,7 @@ export default function ResourceDetails() {
></Link>
)}
>
{t("common:cancel")}
{t("cancel")}
</Button>
</div>
</ActionGroup>

View file

@ -186,9 +186,9 @@ export const AuthorizationResources = ({ clientId }: ResourcesProps) => {
<Thead>
<Tr>
<Th aria-hidden="true" />
<Th>{t("common:name")}</Th>
<Th>{t("name")}</Th>
<Th>{t("displayName")}</Th>
<Th>{t("common:type")}</Th>
<Th>{t("type")}</Th>
<Th>{t("owner")}</Th>
<Th>{t("uris")}</Th>
<Th aria-hidden="true" />
@ -254,7 +254,7 @@ export const AuthorizationResources = ({ clientId }: ResourcesProps) => {
actions={{
items: [
{
title: t("common:delete"),
title: t("delete"),
onClick: async () => {
setSelectedResource(resource);
setPermission(
@ -293,8 +293,8 @@ export const AuthorizationResources = ({ clientId }: ResourcesProps) => {
{noData && searching && (
<ListEmptyState
isSearchVariant
message={t("common:noSearchResults")}
instructions={t("common:noSearchResultsInstructions")}
message={t("noSearchResults")}
instructions={t("noSearchResultsInstructions")}
/>
)}
{noData && !searching && (

View file

@ -147,7 +147,7 @@ export const ResourcesPolicySelect = ({
const [toggleUnsavedChangesDialog, UnsavedChangesConfirm] = useConfirmDialog({
titleKey: t("unsavedChangesTitle"),
messageKey: t("unsavedChangesConfirm"),
continueButtonLabel: t("common:continue"),
continueButtonLabel: t("continue"),
continueButtonVariant: ButtonVariant.danger,
onConfirm: () => onUnsavedChangesConfirm?.(),
});

View file

@ -55,7 +55,7 @@ export default function ScopeDetails() {
scopeId,
});
if (!scope) {
throw new Error(t("common:notFound"));
throw new Error(t("notFound"));
}
return scope;
}
@ -116,7 +116,7 @@ export default function ScopeDetails() {
data-testid="delete-resource"
onClick={() => toggleDeleteDialog()}
>
{t("common:delete")}
{t("delete")}
</DropdownItem>,
]
: undefined
@ -129,12 +129,12 @@ export default function ScopeDetails() {
onSubmit={handleSubmit(onSubmit)}
>
<FormGroup
label={t("common:name")}
label={t("name")}
fieldId="name"
labelIcon={
<HelpItem helpText={t("scopeName")} fieldLabelId="name" />
}
helperTextInvalid={t("common:required")}
helperTextInvalid={t("required")}
validated={
errors.name ? ValidatedOptions.error : ValidatedOptions.default
}
@ -177,7 +177,7 @@ export default function ScopeDetails() {
type="submit"
data-testid="save"
>
{t("common:save")}
{t("save")}
</Button>
{!scope ? (
@ -195,7 +195,7 @@ export default function ScopeDetails() {
></Link>
)}
>
{t("common:cancel")}
{t("cancel")}
</Button>
) : (
<Button
@ -203,7 +203,7 @@ export default function ScopeDetails() {
data-testid="revert"
onClick={() => reset({ ...scope })}
>
{t("common:revert")}
{t("revert")}
</Button>
)}
</div>

View file

@ -66,8 +66,8 @@ export const ScopePicker = ({ clientId }: { clientId: string }) => {
variant={SelectVariant.typeaheadMulti}
chipGroupProps={{
numChips: 3,
expandedText: t("common:hide"),
collapsedText: t("common:showRemaining"),
expandedText: t("hide"),
collapsedText: t("showRemaining"),
}}
onToggle={setOpen}
isOpen={open}

View file

@ -184,7 +184,7 @@ export const AuthorizationScopes = ({ clientId }: ScopesProps) => {
<Thead>
<Tr>
<Th aria-hidden="true" />
<Th>{t("common:name")}</Th>
<Th>{t("name")}</Th>
<Th>{t("displayName")}</Th>
<Th aria-hidden="true" />
<Th aria-hidden="true" />
@ -241,7 +241,7 @@ export const AuthorizationScopes = ({ clientId }: ScopesProps) => {
actions={{
items: [
{
title: t("common:delete"),
title: t("delete"),
onClick: () => {
setSelectedScope(scope);
toggleDeleteDialog();
@ -312,8 +312,8 @@ export const AuthorizationScopes = ({ clientId }: ScopesProps) => {
{noData && searching && (
<ListEmptyState
isSearchVariant
message={t("common:noSearchResults")}
instructions={t("common:noSearchResultsInstructions")}
message={t("noSearchResults")}
instructions={t("noSearchResultsInstructions")}
/>
)}
</PageSection>

View file

@ -94,7 +94,7 @@ export const SearchDropdown = ({
className="keycloak__client_authentication__searchdropdown_form"
onSubmit={handleSubmit(submit)}
>
<FormGroup label={t("common:name")} fieldId="name">
<FormGroup label={t("name")} fieldId="name">
<KeycloakTextInput
id="name"
data-testid="searchdropdown_name"
@ -103,7 +103,7 @@ export const SearchDropdown = ({
</FormGroup>
{isResource && (
<>
<FormGroup label={t("common:type")} fieldId="type">
<FormGroup label={t("type")} fieldId="type">
<KeycloakTextInput
id="type"
data-testid="searchdropdown_type"
@ -143,7 +143,7 @@ export const SearchDropdown = ({
/>
</FormGroup>
{!isResource && (
<FormGroup label={t("common:type")} fieldId="type">
<FormGroup label={t("type")} fieldId="type">
<Controller
name="type"
defaultValue=""
@ -159,7 +159,7 @@ export const SearchDropdown = ({
}}
selections={field.value || t("allTypes")}
variant={SelectVariant.single}
aria-label={t("common:type")}
aria-label={t("type")}
isOpen={typeOpen}
>
{typeOptions(field.value)}
@ -175,14 +175,14 @@ export const SearchDropdown = ({
data-testid="search-btn"
isDisabled={!isDirty}
>
{t("common:search")}
{t("search")}
</Button>
<Button
variant="link"
data-testid="revert-btn"
onClick={() => onSearch({})}
>
{t("common:clear")}
{t("clear")}
</Button>
</ActionGroup>
</Form>

View file

@ -160,8 +160,8 @@ export const AuthorizationSettings = ({ clientId }: { clientId: string }) => {
render={({ field }) => (
<Switch
id="allowRemoteResourceManagement"
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked={field.value}
onChange={field.onChange}
aria-label={t("allowRemoteResourceManagement")}

View file

@ -92,14 +92,14 @@ export const Results = ({ evaluateResult, refresh, back }: ResultProps) => {
name={"inputGroupName"}
id={"inputGroupName"}
type="search"
aria-label={t("common:search")}
placeholder={t("common:search")}
aria-label={t("search")}
placeholder={t("search")}
onChange={setSearchInput}
onKeyDown={handleKeyDown}
/>
<Button
variant={ButtonVariant.control}
aria-label={t("common:search")}
aria-label={t("search")}
onClick={() => confirmSearchQuery()}
>
<SearchIcon />
@ -170,15 +170,15 @@ export const Results = ({ evaluateResult, refresh, back }: ResultProps) => {
<Divider />
<ListEmptyState
isSearchVariant
message={t("common:noSearchResults")}
instructions={t("common:noSearchResultsInstructions")}
message={t("noSearchResults")}
instructions={t("noSearchResultsInstructions")}
/>
</>
)}
<Form>
<FixedButtonsGroup name="authorization">
<Button data-testid="authorization-eval" id="back-btn" onClick={back}>
{t("common:back")}
{t("back")}
</Button>{" "}
<Button
data-testid="authorization-reevaluate"

View file

@ -104,7 +104,7 @@ export const Group = () => {
type="selectMany"
text={{
title: "addGroupsToGroupPolicy",
ok: "common:add",
ok: "add",
}}
onConfirm={(groups) => {
field.onChange([

View file

@ -24,9 +24,9 @@ export const NameDescription = ({
return (
<>
<FormGroup
label={t("common:name")}
label={t("name")}
fieldId="kc-name"
helperTextInvalid={t("common:required")}
helperTextInvalid={t("required")}
validated={
errors.name ? ValidatedOptions.error : ValidatedOptions.default
}
@ -49,7 +49,7 @@ export const NameDescription = ({
/>
</FormGroup>
<FormGroup
label={t("common:description")}
label={t("description")}
fieldId="kc-description"
labelIcon={
<HelpItem
@ -60,7 +60,7 @@ export const NameDescription = ({
validated={
errors.description ? ValidatedOptions.error : ValidatedOptions.default
}
helperTextInvalid={t("common:maxLength", { length: 255 })}
helperTextInvalid={t("maxLength", { length: 255 })}
>
<KeycloakTextArea
isDisabled={isDisabled}

View file

@ -89,7 +89,7 @@ export default function PolicyDetails() {
]);
if (!result[0]) {
throw new Error(t("common:notFound"));
throw new Error(t("notFound"));
}
return {
@ -188,7 +188,7 @@ export default function PolicyDetails() {
data-testid="delete-policy"
onClick={() => toggleDeleteDialog()}
>
{t("common:delete")}
{t("delete")}
</DropdownItem>,
]
: undefined
@ -214,7 +214,7 @@ export default function PolicyDetails() {
type="submit"
data-testid="save"
>
{t("common:save")}
{t("save")}
</Button>
<Button
@ -231,7 +231,7 @@ export default function PolicyDetails() {
/>
)}
>
{t("common:cancel")}
{t("cancel")}
</Button>
</div>
</ActionGroup>

View file

@ -17,7 +17,7 @@ export const Regex = () => {
<FormGroup
label={t("targetClaim")}
fieldId="targetClaim"
helperTextInvalid={t("common:required")}
helperTextInvalid={t("required")}
validated={errors.targetClaim ? "error" : "default"}
isRequired
labelIcon={
@ -45,7 +45,7 @@ export const Regex = () => {
}
isRequired
validated={errors.pattern ? "error" : "default"}
helperTextInvalid={t("common:required")}
helperTextInvalid={t("required")}
>
<KeycloakTextInput
id="pattern"

View file

@ -143,7 +143,7 @@ const FromTo = ({ name, ...rest }: NumberControlProps) => {
<SplitItem>
<NumberControl name={name} {...rest} />
</SplitItem>
<SplitItem>{t("common:to")}</SplitItem>
<SplitItem>{t("to")}</SplitItem>
<SplitItem>
<NumberControl name={`${name}End`} {...rest} />
</SplitItem>
@ -208,7 +208,7 @@ export const Time = () => {
<HelpItem helpText={t("startTimeHelp")} fieldLabelId="startTime" />
}
isRequired
helperTextInvalid={t("common:required")}
helperTextInvalid={t("required")}
validated={
errors.notBefore ? ValidatedOptions.error : ValidatedOptions.default
}
@ -222,7 +222,7 @@ export const Time = () => {
<HelpItem helpText={t("expireTimeHelp")} fieldLabelId="expireTime" />
}
isRequired
helperTextInvalid={t("common:required")}
helperTextInvalid={t("required")}
validated={
errors.notOnOrAfter
? ValidatedOptions.error

View file

@ -101,7 +101,7 @@ export const ClientSecret = ({ client, secret, toggle }: ClientSecretProps) => {
const [toggleInvalidateConfirm, InvalidateConfirm] = useConfirmDialog({
titleKey: "invalidateRotatedSecret",
messageKey: "invalidateRotatedSecretExplain",
continueButtonLabel: "common:confirm",
continueButtonLabel: "confirm",
onConfirm: async () => {
try {
await adminClient.clients.invalidateSecret({

View file

@ -108,8 +108,8 @@ export const Credentials = ({ client, save, refresh }: CredentialsProps) => {
const [toggleClientSecretConfirm, ClientSecretConfirm] = useConfirmDialog({
titleKey: "confirmClientSecretTitle",
messageKey: "confirmClientSecretBody",
continueButtonLabel: "common:yes",
cancelButtonLabel: "common:no",
continueButtonLabel: "yes",
cancelButtonLabel: "no",
onConfirm: regenerateClientSecret,
});
@ -125,8 +125,8 @@ export const Credentials = ({ client, save, refresh }: CredentialsProps) => {
const [toggleAccessTokenConfirm, AccessTokenConfirm] = useConfirmDialog({
titleKey: "confirmAccessTokenTitle",
messageKey: "confirmAccessTokenBody",
continueButtonLabel: "common:yes",
cancelButtonLabel: "common:no",
continueButtonLabel: "yes",
cancelButtonLabel: "no",
onConfirm: regenerateAccessToken,
});
@ -196,7 +196,7 @@ export const Credentials = ({ client, save, refresh }: CredentialsProps) => {
{clientAuthenticatorType === "client-x509" && <X509 />}
<ActionGroup>
<Button variant="primary" type="submit" isDisabled={!isDirty}>
{t("common:save")}
{t("save")}
</Button>
</ActionGroup>
</CardBody>

View file

@ -35,8 +35,8 @@ export const X509 = () => {
render={({ field }) => (
<Switch
id="allowRegexComparison"
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked={field.value === "true"}
onChange={(value) => field.onChange(value.toString())}
aria-label={t("allowRegexComparison")}
@ -50,7 +50,7 @@ export const X509 = () => {
labelIcon={
<HelpItem helpText={t("subjectHelp")} fieldLabelId="subject" />
}
helperTextInvalid={t("common:required")}
helperTextInvalid={t("required")}
validated={
errors.attributes?.[beerify("x509.subjectdn")]
? ValidatedOptions.error

View file

@ -111,11 +111,11 @@ export default function ImportForm() {
id="realm-file"
language={Language.json}
extension=".json,.xml"
helpText={t("common-help:helpFileUploadClient")}
helpText={t("helpFileUploadClient")}
onChange={handleFileChange}
/>
<ClientDescription hasConfigureAccess />
<FormGroup label={t("common:type")} fieldId="kc-type">
<FormGroup label={t("type")} fieldId="kc-type">
<KeycloakTextInput
id="kc-type"
isReadOnly
@ -125,7 +125,7 @@ export default function ImportForm() {
<CapabilityConfig unWrap={true} />
<ActionGroup>
<Button variant="primary" type="submit">
{t("common:save")}
{t("save")}
</Button>
<Button
variant="link"
@ -133,7 +133,7 @@ export default function ImportForm() {
<Link {...props} to={toClients({ realm })} />
)}
>
{t("common:cancel")}
{t("cancel")}
</Button>
</ActionGroup>
</FormProvider>

View file

@ -132,7 +132,7 @@ export default function CreateInitialAccessToken() {
data-testid="save"
isDisabled={!isValid}
>
{t("common:save")}
{t("save")}
</Button>
<Button
data-testid="cancel"
@ -144,7 +144,7 @@ export default function CreateInitialAccessToken() {
/>
)}
>
{t("common:cancel")}
{t("cancel")}
</Button>
</ActionGroup>
</FormAccess>

View file

@ -39,7 +39,7 @@ export const InitialAccessTokenList = () => {
const [toggleDeleteDialog, DeleteConfirm] = useConfirmDialog({
titleKey: "tokenDeleteConfirmTitle",
messageKey: t("tokenDeleteConfirm", { id: token?.id }),
continueButtonLabel: "common:delete",
continueButtonLabel: "delete",
continueButtonVariant: ButtonVariant.danger,
onConfirm: async () => {
try {
@ -69,12 +69,12 @@ export const InitialAccessTokenList = () => {
<Link {...props} to={toCreateInitialAccessToken({ realm })} />
)}
>
{t("common:create")}
{t("create")}
</Button>
}
actions={[
{
title: t("common:delete"),
title: t("delete"),
onRowClick: (token) => {
setToken(token);
toggleDeleteDialog();
@ -84,7 +84,7 @@ export const InitialAccessTokenList = () => {
columns={[
{
name: "id",
displayKey: "common:id",
displayKey: "id",
},
{
name: "timestamp",
@ -115,7 +115,7 @@ export const InitialAccessTokenList = () => {
<ListEmptyState
message={t("noTokens")}
instructions={t("noTokensInstructions")}
primaryActionText={t("common:create")}
primaryActionText={t("create")}
onPrimaryAction={() =>
navigate(toCreateInitialAccessToken({ realm }))
}

View file

@ -61,7 +61,7 @@ export const ExportSamlKeyDialog = ({
type="submit"
form="export-saml-key-form"
>
{t("common:export")}
{t("export")}
</Button>,
<Button
id="modal-cancel"
@ -72,7 +72,7 @@ export const ExportSamlKeyDialog = ({
close();
}}
>
{t("common:cancel")}
{t("cancel")}
</Button>,
]}
>

View file

@ -195,7 +195,7 @@ export const GenerateKeyDialog = ({
toggleDialog();
}}
>
{t("common:cancel")}
{t("cancel")}
</Button>,
]}
>

View file

@ -84,7 +84,7 @@ export const ImportKeyDialog = ({
toggleDialog();
}}
>
{t("common:cancel")}
{t("cancel")}
</Button>,
]}
>

View file

@ -156,8 +156,8 @@ export const Keys = ({ clientId, save, hasConfigureAccess }: KeysProps) => {
<Switch
data-testid="useJwksUrl"
id="useJwksUrl-switch"
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked={field.value === "true"}
onChange={(value) => field.onChange(`${value}`)}
aria-label={t("useJwksUrl")}
@ -197,7 +197,7 @@ export const Keys = ({ clientId, save, hasConfigureAccess }: KeysProps) => {
onClick={save}
isDisabled={!isDirty}
>
{t("common:save")}
{t("save")}
</Button>
<Button
data-testid="generate"

View file

@ -108,8 +108,8 @@ const KeySection = ({
<Switch
data-testid={key}
id={key}
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked={field.value === "true"}
onChange={(value) => {
const v = value.toString();
@ -143,7 +143,7 @@ const KeySection = ({
{t("importKey")}
</Button>
<Button variant="tertiary" onClick={toggleImportDialog}>
{t("common:export")}
{t("export")}
</Button>
</ActionGroup>
</Form>
@ -207,8 +207,8 @@ export const SamlKeys = ({ clientId, save }: SamlKeysProps) => {
messageKey: t("disableSigningExplain", {
key: t(key),
}),
continueButtonLabel: "common:yes",
cancelButtonLabel: "common:no",
continueButtonLabel: "yes",
cancelButtonLabel: "no",
onConfirm: () => {
setValue(KEYS_MAPPING[selectedType!].name, "false");
save();
@ -218,8 +218,8 @@ export const SamlKeys = ({ clientId, save }: SamlKeysProps) => {
const [toggleReGenerateDialog, ReGenerateConfirm] = useConfirmDialog({
titleKey: "reGenerateSigning",
messageKey: "reGenerateSigningExplain",
continueButtonLabel: "common:yes",
cancelButtonLabel: "common:no",
continueButtonLabel: "yes",
cancelButtonLabel: "no",
onConfirm: () => {
generate(selectedType!);
},

View file

@ -146,7 +146,7 @@ export const SamlKeysDialog = ({
variant={ButtonVariant.link}
onClick={onCancel}
>
{t("common:cancel")}
{t("cancel")}
</Button>,
]}
>

View file

@ -29,7 +29,7 @@ export const StoreSettings = ({
labelIcon={
<HelpItem helpText={t("keyAliasHelp")} fieldLabelId="keyAlias" />
}
helperTextInvalid={t("common:required")}
helperTextInvalid={t("required")}
validated={errors.keyAlias ? "error" : "default"}
>
<KeycloakTextInput
@ -50,7 +50,7 @@ export const StoreSettings = ({
fieldLabelId="keyPassword"
/>
}
helperTextInvalid={t("common:required")}
helperTextInvalid={t("required")}
validated={errors.keyPassword ? "error" : "default"}
>
<PasswordInput
@ -89,7 +89,7 @@ export const StoreSettings = ({
fieldLabelId="storePassword"
/>
}
helperTextInvalid={t("common:required")}
helperTextInvalid={t("required")}
validated={errors.storePassword ? "error" : "default"}
>
<PasswordInput

View file

@ -59,13 +59,11 @@ export const AddProviderDialog = ({
<DataListItem aria-label={t("headerName")} id="header">
<DataListItemRow>
<DataListItemCells
dataListCells={[t("common:name"), t("common:description")].map(
(name) => (
<DataListCell style={{ fontWeight: 700 }} key={name}>
{name}
</DataListCell>
),
)}
dataListCells={[t("name"), t("description")].map((name) => (
<DataListCell style={{ fontWeight: 700 }} key={name}>
{name}
</DataListCell>
))}
/>
</DataListItemRow>
</DataListItem>

View file

@ -69,7 +69,7 @@ export const ClientRegistrationList = ({
messageKey: t("clientRegisterPolicyDeleteConfirm", {
name: selectedPolicy?.name,
}),
continueButtonLabel: "common:delete",
continueButtonLabel: "delete",
continueButtonVariant: ButtonVariant.danger,
onConfirm: async () => {
try {
@ -115,7 +115,7 @@ export const ClientRegistrationList = ({
}
actions={[
{
title: t("common:delete"),
title: t("delete"),
onRowClick: (policy) => {
setSelectedPolicy(policy);
toggleDeleteDialog();
@ -125,7 +125,7 @@ export const ClientRegistrationList = ({
columns={[
{
name: "name",
displayKey: "common:name",
displayKey: "name",
cellRenderer: DetailLink,
},
{

View file

@ -101,7 +101,7 @@ export default function DetailProvider() {
messageKey: t("clientRegisterPolicyDeleteConfirm", {
name: providerName,
}),
continueButtonLabel: "common:delete",
continueButtonLabel: "delete",
continueButtonVariant: ButtonVariant.danger,
onConfirm: async () => {
try {
@ -134,7 +134,7 @@ export default function DetailProvider() {
key="delete"
onClick={toggleDeleteDialog}
>
{t("common:delete")}
{t("delete")}
</DropdownItem>,
]
: undefined
@ -156,9 +156,9 @@ export default function DetailProvider() {
/>
</FormGroup>
<FormGroup
label={t("common:name")}
label={t("name")}
fieldId="kc-name"
helperTextInvalid={t("common:required")}
helperTextInvalid={t("required")}
validated={
errors.name ? ValidatedOptions.error : ValidatedOptions.default
}
@ -184,7 +184,7 @@ export default function DetailProvider() {
</FormProvider>
<ActionGroup>
<Button data-testid="save" type="submit">
{t("common:save")}
{t("save")}
</Button>
<Button
variant="link"
@ -195,7 +195,7 @@ export default function DetailProvider() {
></Link>
)}
>
{t("common:cancel")}
{t("cancel")}
</Button>
</ActionGroup>
</FormAccess>

View file

@ -16,7 +16,7 @@ const MappingDetails = lazy(
export const MapperRoute: AppRouteObject = {
path: "/:realm/clients/:id/clientScopes/dedicated/mappers/:mapperId",
element: <MappingDetails />,
breadcrumb: (t) => t("common:mappingDetails"),
breadcrumb: (t) => t("mappingDetails"),
handle: {
access: "view-clients",
},

View file

@ -151,7 +151,7 @@ export const AddScopeDialog = ({
}}
isDisabled={rows.length === 0}
>
{t("common:add")}
{t("add")}
</Button>,
<Button
id="modal-cancel"
@ -163,7 +163,7 @@ export const AddScopeDialog = ({
toggleDialog();
}}
>
{t("common:cancel")}
{t("cancel")}
</Button>,
]
: [
@ -181,7 +181,7 @@ export const AddScopeDialog = ({
toggleIndicator={CaretUpIcon}
id="add-scope-toggle"
>
{t("common:add")}
{t("add")}
</DropdownToggle>
}
dropdownItems={clientScopeTypesDropdown(t, action)}
@ -195,7 +195,7 @@ export const AddScopeDialog = ({
toggleDialog();
}}
>
{t("common:cancel")}
{t("cancel")}
</Button>,
]
}
@ -229,9 +229,7 @@ export const AddScopeDialog = ({
data-testid="filter-type-dropdown-item"
key="filter-type"
>
{filterType === FilterType.Name
? t("protocol")
: t("common:name")}
{filterType === FilterType.Name ? t("protocol") : t("name")}
</DropdownItem>,
]}
/>
@ -260,14 +258,14 @@ export const AddScopeDialog = ({
data-testid="filter-type-dropdown-item"
key="filter-type"
>
{t("common:name")}
{t("name")}
</DropdownItem>,
]}
/>
<Select
variant={SelectVariant.single}
className="kc-protocolType-select"
aria-label={t("common:selectOne")}
aria-label={t("selectOne")}
onToggle={toggleIsProtocolTypeDropdownOpen}
onSelect={(_, value) =>
onProtocolTypeDropdownSelect(value.toString())

View file

@ -196,7 +196,7 @@ export const ClientScopes = ({
name: selectedRows[0]?.name,
}),
messageKey: "deleteConfirmClientScopes",
continueButtonLabel: "common:delete",
continueButtonLabel: "delete",
continueButtonVariant: ButtonVariant.danger,
onConfirm: async () => {
try {
@ -313,7 +313,7 @@ export const ClientScopes = ({
}
}}
>
{t("common:remove")}
{t("remove")}
</DropdownItem>,
]}
/>
@ -350,7 +350,7 @@ export const ClientScopes = ({
isManager
? [
{
title: t("common:remove"),
title: t("remove"),
onRowClick: async (row) => {
setSelectedRows([row]);
toggleDeleteDialog();

View file

@ -96,8 +96,8 @@ export const DedicatedScope = ({
>
<Switch
id="fullScopeAllowed"
label={t("common:on")}
labelOff={t("common:off")}
label={t("on")}
labelOff={t("off")}
isChecked={client.fullScopeAllowed}
onChange={update}
aria-label={t("fullScopeAllowed")}

View file

@ -69,9 +69,9 @@ export default function DedicatedScopes() {
mappers as ProtocolMapperRepresentation[],
);
setClient(await adminClient.clients.findOne({ id: client.id! }));
addAlert(t("common:mappingCreatedSuccess"), AlertVariant.success);
addAlert(t("mappingCreatedSuccess"), AlertVariant.success);
} catch (error) {
addError("common:mappingCreatedError", error);
addError("mappingCreatedError", error);
}
}
};
@ -88,9 +88,9 @@ export default function DedicatedScopes() {
(m) => m.id !== mapper.id,
),
});
addAlert(t("common:mappingDeletedSuccess"), AlertVariant.success);
addAlert(t("mappingDeletedSuccess"), AlertVariant.success);
} catch (error) {
addError("common:mappingDeletedError", error);
addError("mappingDeletedError", error);
}
return true;
};

View file

@ -62,7 +62,7 @@ const ProtocolMappers = ({
columns={[
{
name: "mapperName",
displayKey: "common:name",
displayKey: "name",
},
{
name: "containerName",
@ -70,11 +70,11 @@ const ProtocolMappers = ({
},
{
name: "type.category",
displayKey: "common:category",
displayKey: "category",
},
{
name: "type.priority",
displayKey: "common:priority",
displayKey: "priority",
},
]}
/>

View file

@ -41,7 +41,7 @@ export const GroupBreadCrumbs = () => {
</Link>
)}
{isLastGroup &&
(group.id === "search" ? group.name : t("groups:groupDetails"))}
(group.id === "search" ? group.name : t("groupDetails"))}
</BreadcrumbItem>
);
})}

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