Skip to content

Commit

Permalink
Move all texts to i18n module
Browse files Browse the repository at this point in the history
  • Loading branch information
Shenali-SJ committed Jan 16, 2025
1 parent 9a1c599 commit 11a4b9a
Show file tree
Hide file tree
Showing 11 changed files with 338 additions and 115 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@
font-weight: bold;
margin: 20px;
}
.p {
.examples {
display: flex;
flex-direction: column;
justify-content: space-between;
Expand Down

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion features/admin.core.v1/configs/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,8 @@ export class Config {
I18nConstants.APPLICATION_TEMPLATES_NAMESPACE,
I18nConstants.ACTIONS_NAMESPACE,
I18nConstants.TENANTS_NAMESPACE,
I18nConstants.REMOTE_USER_STORES_NAMESPACE
I18nConstants.REMOTE_USER_STORES_NAMESPACE,
I18nConstants.CUSTOM_AUTHENTICATION_NAMESPACE
],
preload: []
};
Expand Down
9 changes: 8 additions & 1 deletion features/admin.core.v1/constants/i18n-constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,12 @@ export class I18nConstants {
*/
public static readonly REMOTE_USER_STORES_NAMESPACE: string = I18nModuleConstants.REMOTE_USER_STORES_NAMESPACE;

/**
* Remote User Stores namespace.
*/
public static readonly CUSTOM_AUTHENTICATION_NAMESPACE: string = I18nModuleConstants.
CUSTOM_AUTHENTICATION_NAMESPACE;

/**
* Locations of the I18n namespaces.
*/
Expand Down Expand Up @@ -327,7 +333,8 @@ export class I18nConstants {
[ I18nConstants.IMPERSONATION_CONFIGURATION_NAMESPACE, "portals" ],
[ I18nConstants.ACTIONS_NAMESPACE, "portals" ],
[ I18nConstants.TENANTS_NAMESPACE, "portals" ],
[ I18nConstants.REMOTE_USER_STORES_NAMESPACE, "portals" ]
[ I18nConstants.REMOTE_USER_STORES_NAMESPACE, "portals" ],
[ I18nConstants.CUSTOM_AUTHENTICATION_NAMESPACE, "portals" ]
]);

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1316,6 +1316,10 @@ export interface AuthenticationProviderNS {
message: string;
description: string;
};
serverError: {
message: string;
description: string;
}
success: {
message: string;
description: string;
Expand Down
42 changes: 0 additions & 42 deletions modules/i18n/src/models/namespaces/custom-auth-connection-ns.ts

This file was deleted.

130 changes: 130 additions & 0 deletions modules/i18n/src/models/namespaces/custom-authentication-ns.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
/**
* Copyright (c) 2024, WSO2 LLC. (https://www.wso2.com).
*
* WSO2 LLC. licenses this file to you under the Apache License,
* Version 2.0 (the "License"); you may not use this file except
* in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*/

export interface customAuthenticationNS {
fields: {
createWizard: {
authenticationTypeStep: {
label: string;
externalAuthenticationCard: {
header: string;
mainDescription: string;
examples: string;
};
internalUserAuthenticationCard: {
header: string;
mainDescription: string;
examples: string;
};
title: string;
twoFactorAuthenticationCard: {
header: string;
mainDescription: string;
examples: string;
}
};
generalSettingsStep: {
title: string;
identifier: {
label: string;
hint: string;
placeholder: string;
validations: {
empty: string
invalid: string
};
};
displayName: {
label: string;
placeholder: string;
hint: string;
validations: {
empty: string
invalid: string
};
};
};
configurationsStep: {
title: string;
endpoint: {
label: string;
placeholder: string;
hint: string;
validations: {
empty: string;
invalid: string;
general: string;
};
};
authenticationTypeDropdown: {
label: string;
placeholder: string;
hint: string;
authProperties: {
username: {
label: string;
placeholder: string;
validations: {
required: string;
};
};
password: {
label: string;
placeholder: string;
validations: {
required: string;
};
};
accessToken: {
label: string;
placeholder: string;
validations: {
required: string;
};
};
header: {
label: string;
placeholder: string;
validations: {
required: string;
invalid: string;
};
};
value: {
label: string;
placeholder: string;
validations: {
required: string;
};
}
};
validations: {
required: string;
};
}
}
helpPanel: {
hint: {
header: string;
description: string;
warning: string;
}
}
};
};
};
2 changes: 1 addition & 1 deletion modules/i18n/src/models/namespaces/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,4 @@ export * from "./actions-ns";
export * from "./tenants-ns";
export * from "./sms-templates-ns";
export * from "./remote-user-stores-ns";
export * from "./custom-auth-connection-ns";
export * from "./custom-authentication-ns";
Original file line number Diff line number Diff line change
Expand Up @@ -1065,6 +1065,10 @@ export const authenticationProvider:AuthenticationProviderNS = {
description: "An error occurred while creating the connection.",
message: "Create error"
},
serverError: {
description: "You are trying to add a provider with an existing Identity Provider Entity ID or a Service Provider Entity ID.",
message: "There's a Conflicting Entity"
},
success: {
description: "Successfully created the connection.",
message: "Create successful"
Expand Down
100 changes: 95 additions & 5 deletions modules/i18n/src/translations/en-US/portals/custom-auth-connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,28 +16,118 @@
* under the License.
*/

import { customAuthConnectionNS } from "../../../models";
import { customAuthenticationNS } from "../../../models";

export const customAuthentication: customAuthConnectionNS = {
export const customAuthentication: customAuthenticationNS = {
fields: {
createWizard: {
authenticationTypeStep: {
cardExternalAuthentication: {
externalAuthenticationCard: {
examples: "Eg: Social Login, Enterprise IdP",
header: "External (Federated) User Authentication",
mainDescription: "Authenticate and provision federated users."
},
cardInternalUserAuthentication: {
internalUserAuthenticationCard: {
examples: "Eg: Username & Password, Email OTP",
header: "Internal User Authentication",
mainDescription: "Collect identifier and authenticate user accounts managed in the organization."
},
label: "Select the authentication type you are implementing",
twoFactorAuthentication: {
title: "Authentication Type",
twoFactorAuthenticationCard: {
examples: "Eg: TOTP",
header: "2FA Authentication",
mainDescription: "Only verify users in a second or later step in the login flow."
}
},
configurationsStep: {
authenticationTypeDropdown: {
authProperties: {
accessToken: {
label: "Access token",
placeholder: "Access Token",
validations: {
required: "Access Token is a required field."
}
},
header: {
label: "Header",
placeholder: "Header",
validations: {
invalid: "Please choose a valid header name that adheres to the given guidelines.",
required: "Header is a required field."
}
},
password: {
label: "Password",
placeholder: "Password",
validations: {
required: "Password is a required field."
}
},
username: {
label: "Username",
placeholder: "Username",
validations: {
required: "Username is a required field."
}
},
value: {
label: "Value",
placeholder: "Value",
validations: {
required: "Value is a required field."
}
}
},
hint: "Once added, these secrets will not be displayed. You will only be able to reset them.",
label: "Authentication Scheme",
placeholder: "Select Authentication Type",
validations: {
required: "Authentication Type is a required field."
}
},
endpoint: {
hint: "The URL of the configured external endpoint to integrate with the authenticator",
label: "Endpoint",
placeholder: "https://abc.external.authenticator/authenticate",
validations: {
empty: "Empty endpoint URI",
general: "Please enter a valid URL.",
invalid: "The entered URL is not HTTPS. Please add a valid URL."
}
},
title: "Configuration"
},
generalSettingsStep: {
displayName: {
hint: "",
label: "Identifier",
placeholder: "ABC Authenticator",
validations: {
empty: "",
invalid: "Invalid Display Name"
}
},
identifier: {
hint: "",
label: "Identifier",
placeholder: "ABC_authenticator",
validations: {
empty: "",
invalid: "Invalid Identifier"
}
},
title: "General Settings"
},
helpPanel: {
hint: {
description: "We recommend using a URI as the identifier, but you do not need to make the URI" +
"publicly available since WSO2 Identity Server will not access your API. WSO2 Identity Server" +
"will use this identifier value as the audience(aud) claim in the issued JWT tokens.",
header: "Identifier",
warning: "This field should be unique; once created, it is not editable. "
}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions modules/i18n/src/translations/en-US/portals/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,4 @@ export * from "./actions";
export * from "./tenants";
export * from "./sms-templates";
export * from "./remote-user-stores";
export * from "./custom-auth-connection";

0 comments on commit 11a4b9a

Please sign in to comment.