Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
8 changes: 7 additions & 1 deletion js/apps/admin-ui/public/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
"testConnection": "Test connection",
"name": "Name",
"role": "Role",
"description": "description",
"description": "Description",
"type": "Type",
"category": "Category",
"priority": "Priority",
Expand Down Expand Up @@ -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.",
Expand Down
1 change: 1 addition & 0 deletions js/apps/admin-ui/public/locales/ja/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,7 @@
"titleUsers": "ユーザー",
"titleSessions": "セッション",
"authenticationAliasHelp": "この設定の名前を設定します。",
"clientScopeTypes": { "default": "DEFAULT" },
"authenticationFlowTypeHelp": "どの種類のフォームかを設定します。",
"scopeNameHelp": "クライアント・スコープの名前。レルム内でユニークでなければなりません。スコープ・パラメーターの値として使用されるため、名前には空白文字を含めないでください",
"scopeDescriptionHelp": "クライアント・スコープの説明",
Expand Down
2 changes: 2 additions & 0 deletions js/apps/admin-ui/public/locales/zh-CN/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -3246,6 +3246,8 @@
"orderChangeErrorUserFed": "由于{{error}},无法更改用户联盟供应商的优先顺序。",
"authenticationAliasHelp": "配置名称",
"authenticationFlowTypeHelp": "它是一种什么样的形式?",
"clientScopeTypes": { "default": "默认", "optional": "非必需", "none": "无" },
"realmNameTitle": "{{name}} 领域",
"authenticationCreateFlowHelp": "创建流程",
"scopeNameHelp": "客户端作用域的名称。在领域中必须是唯一的。名称不应包含空格字符,因为它用作作用域参数的值。",
"scopeDescriptionHelp": "客户作用域说明",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -234,7 +234,7 @@ export default function AuthenticationSection() {
...(!data.builtIn && !data.usedBy
? [
{
title: t("common:delete"),
title: t("delete"),
onClick: () => {
setSelectedFlow(data);
toggleDeleteDialog();
Expand All @@ -258,7 +258,7 @@ export default function AuthenticationSection() {
},
{
name: "description",
displayKey: "common:description",
displayKey: "description",
},
]}
emptyState={
Expand Down
4 changes: 2 additions & 2 deletions js/apps/admin-ui/src/authentication/BindFlowDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,15 @@ 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"
key="cancel"
variant={ButtonVariant.link}
onClick={onClose}
>
{t("common:cancel")}
{t("cancel")}
</Button>,
]}
isOpen
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const DuplicateFlowModal = ({
variant={ButtonVariant.link}
onClick={toggleDialog}
>
{t("common:cancel")}
{t("cancel")}
</Button>,
]}
isOpen
Expand Down
2 changes: 1 addition & 1 deletion js/apps/admin-ui/src/authentication/EditFlowModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ export const EditFlowModal = ({ flow, toggleDialog }: EditFlowModalProps) => {
variant={ButtonVariant.link}
onClick={() => toggleDialog()}
>
{t("common:cancel")}
{t("cancel")}
</Button>,
]}
isOpen
Expand Down
20 changes: 8 additions & 12 deletions js/apps/admin-ui/src/authentication/FlowDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down Expand Up @@ -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 {
Expand All @@ -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 {
Expand Down Expand Up @@ -275,7 +275,7 @@ export default function FlowDetails() {
key="delete"
onClick={() => toggleDeleteFlow()}
>
{t("common:delete")}
{t("delete")}
</DropdownItem>,
]
: []),
Expand Down Expand Up @@ -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!,
Expand All @@ -387,21 +387,17 @@ 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;
setExecutionList(executionList.clone());
}
}}
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!),
Expand Down
10 changes: 5 additions & 5 deletions js/apps/admin-ui/src/authentication/RequiredActions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand All @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ export const AddFlowDropdown = ({
);

return (
<Tooltip content={t("common:add")}>
<Tooltip content={t("add")}>
<>
<Dropdown
isPlain
position="right"
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>
}
Expand Down
14 changes: 7 additions & 7 deletions js/apps/admin-ui/src/authentication/components/EditFlow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 />
Expand All @@ -76,7 +76,7 @@ export const EditFlow = ({ execution, onRowChange }: EditFlowProps) => {
variant={ButtonVariant.link}
onClick={toggle}
>
{t("common:cancel")}
{t("cancel")}
</Button>,
]}
isOpen
Expand All @@ -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
Expand All @@ -113,7 +113,7 @@ export const EditFlow = ({ execution, onRowChange }: EditFlowProps) => {
/>
</FormGroup>
<FormGroup
label={t("common:description")}
label={t("description")}
fieldId="kc-description"
labelIcon={
<HelpItem
Expand All @@ -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 }),
},
})}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 />
Expand All @@ -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
}
Expand Down Expand Up @@ -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"
Expand All @@ -174,7 +174,7 @@ export const ExecutionConfigModal = ({
setShow(false);
}}
>
{t("common:cancel")}
{t("cancel")}
</Button>
{config && (
<Button
Expand All @@ -189,7 +189,7 @@ export const ExecutionConfigModal = ({
setShow(false);
}}
>
{t("common:clear")} <TrashIcon />
{t("clear")} <TrashIcon />
</Button>
)}
</ActionGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 3 additions & 3 deletions js/apps/admin-ui/src/authentication/components/FlowRow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 />
Expand Down
4 changes: 2 additions & 2 deletions js/apps/admin-ui/src/authentication/components/UsedBy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,15 +75,15 @@ const UsedByModal = ({ id, isSpecificClient, onClose }: UsedByModalProps) => {
key="cancel"
onClick={onClose}
>
{t("common:close")}
{t("close")}
</Button>,
]}
>
<KeycloakDataTable
loader={loader}
isPaginated
ariaLabelKey="usedBy"
searchPlaceholderKey="common:search"
searchPlaceholderKey="search"
columns={[
{
name: "name",
Expand Down
Loading