Skip to content

Commit

Permalink
Move common i18n extensions in console app to i18n module
Browse files Browse the repository at this point in the history
  • Loading branch information
pavinduLakshan committed Jan 9, 2025
1 parent d1828de commit 4230aa5
Show file tree
Hide file tree
Showing 45 changed files with 244 additions and 248 deletions.
88 changes: 0 additions & 88 deletions apps/console/src/extensions/i18n/models/extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,94 +20,6 @@ import { FormAttributes, Notification, NotificationItem } from "@wso2is/i18n";

// eslint-disable-next-line @typescript-eslint/no-empty-interface
export interface Extensions {
common: {
community: string;
help: {
communityLinks: {
discord: string;
stackOverflow: string;
};
docSiteLink: string;
helpCenterLink: {
title: string;
subtitle: string;
};
helpDropdownLink: string;
};
learnMore: string;
quickStart: {
greeting: {
alternativeHeading: string;
heading: string;
subHeading: string;
};
sections: {
addSocialLogin: {
actions: {
setup: string;
view: string;
};
description: string;
heading: string;
};
integrateApps: {
actions: {
create: string;
manage: string;
view: string;
};
capabilities: {
sso: string;
mfa: string;
social: string;
};
description: string;
heading: string;
};
learn: {
actions: {
view: string;
};
description: string;
heading: string;
};
manageUsers: {
actions: {
create: string;
manage: string;
view: string;
};
capabilities: {
collaborators: string;
customers: string;
groups: string;
};
description: string;
heading: string;
};
asgardeoTryIt: {
errorMessages: {
appCreateGeneric: {
message: string;
description: string;
};
appCreateDuplicate: {
message: string;
description: string;
};
}
}
};
};
upgrade: string;
dropdown: {
footer: {
privacyPolicy: string;
cookiePolicy: string;
termsOfService: string;
}
};
};
console: {
application: {
quickStart: {
Expand Down
95 changes: 0 additions & 95 deletions apps/console/src/extensions/i18n/resources/en-US/extensions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,101 +26,6 @@ import { Extensions } from "../../models";
/* eslint-disable max-len */
/* eslint-disable sort-keys */
export const extensions: Extensions = {
common: {
community: "Community",
help: {
communityLinks: {
discord: "Ask on Discord",
stackOverflow: "Ask on Stack Overflow"
},
docSiteLink: "Documentation",
helpCenterLink: {
title: "Contact Support",
subtitle: "Talk to the {{productName}} team to obtain personalized assistance."
},
helpDropdownLink: "Get Help"
},
learnMore: "Learn More",
quickStart: {
greeting: {
alternativeHeading: "Welcome back, {{username}}!",
heading: "Welcome, {{username}}!",
subHeading: "Here’s how you can get started"
},
sections: {
addSocialLogin: {
actions: {
setup: "Set Up Social Connections",
view: "View Social Connections"
},
description:
"Let your users log in to your applications with an Identity Provider of " + "their choice",
heading: "Add social login"
},
integrateApps: {
actions: {
create: "Register Application",
manage: "Explore Applications",
view: "View Applications"
},
capabilities: {
sso: "SSO",
mfa: "MFA",
social: "Social Login"
},
description:
"Register your app and design the user login experience you want by configuring " +
"SSO, MFA, social login, and various flexible authentication rules.",
heading: "Add login to your apps"
},
learn: {
actions: {
view: "View Docs"
},
description:
"Get started using Asgardeo. Implement authentication for any kind of application " +
"in minutes.",
heading: "Learn"
},
manageUsers: {
actions: {
create: "Add Users",
manage: "Manage Users",
view: "View Users"
},
capabilities: {
collaborators: "Administrators",
customers: "Users",
groups: "User Groups"
},
description:
"Create user accounts for users and invite administrators to your organization. " +
"Allow your users to securely self-manage their profiles.",
heading: "Manage users and groups"
},
asgardeoTryIt: {
errorMessages: {
appCreateGeneric: {
message: "Something went wrong!",
description: "Failed to initialize the Try It app."
},
appCreateDuplicate: {
message: "Application already exists!",
description: "Please delete the existing {{productName}} Try It application."
}
}
}
}
},
upgrade: "Upgrade",
dropdown: {
footer: {
privacyPolicy: "Privacy",
cookiePolicy: "Cookies",
termsOfService: "Terms"
}
}
},
console: {
application: {
quickStart: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ const GuestUsersPage: FunctionComponent<GuestUsersPageInterface> = (
<DocumentationLink
link={ getLink("manage.users.collaboratorAccounts.learnMore") }
>
{ t("extensions:common.learnMore") }
{ t("console:common.learnMore") }
</DocumentationLink>
</>
</Text>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ export const InviteeRoleSelection: FunctionComponent<InviteeRoleSelectionPropsIn
<DocumentationLink
link={ getLink("manage.users.collaboratorAccounts.roles.learnMore") }
>
{ t("extensions:common.learnMore") }
{ t("console:common.learnMore") }
</DocumentationLink>
</Heading>
</Modal.Header>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -714,7 +714,7 @@ export const UserRolesList: FunctionComponent<UserRolesPropsInterface> = (
link={ getLink("manage.users.collaboratorAccounts." +
"roles.learnMore") }
>
{ t("extensions:common.learnMore") }
{ t("console:common.learnMore") }
</DocumentationLink>
</>
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ export const AdminSettingsPage: FunctionComponent<AdminSettingsPageInterface> =
<DocumentationLink
link={ getLink("manage.users.collaboratorAccounts.adminSettingsLearnMore") }
>
{ t("extensions:common.learnMore") }
{ t("console:common.learnMore") }
</DocumentationLink>
</>
) }
Expand Down
2 changes: 1 addition & 1 deletion features/admin.administrators.v1/pages/administrators.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1582,7 +1582,7 @@ const CollaboratorsPage: FunctionComponent<CollaboratorsPageInterface> = (
<DocumentationLink
link={ getLink("manage.users.collaboratorAccounts.learnMore") }
>
{ t("extensions:common.learnMore") }
{ t("console:common.learnMore") }
</DocumentationLink>
</>
) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,7 @@ export const AddAdminUserBasic: React.FunctionComponent<AddAdminUserBasicProps>
<DocumentationLink
link={ getLink("manage.users.newCollaboratorUser.learnMore") }
>
{ t("extensions:common.learnMore") }
{ t("console:common.learnMore") }
</DocumentationLink>
</Hint>
</Grid.Column>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const AuthorizationAPIResource: FunctionComponent<AuthorizationAPIResourc
link={ getLink("develop.apiResources.addAPIResource." +
"requiredAuthorization.learnMore") }
>
{ t("extensions:common.learnMore") }
{ t("console:common.learnMore") }
</DocumentationLink>
</>)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export const AddAPIResourceAuthorization: FunctionComponent<AddAPIResourceAuthor
<DocumentationLink
link={ getLink("develop.apiResources.addAPIResource.rbacInfoBox.learnMore") }
>
{ t("extensions:common.learnMore") }
{ t("console:common.learnMore") }
</DocumentationLink>
</>)
}
Expand All @@ -123,7 +123,7 @@ export const AddAPIResourceAuthorization: FunctionComponent<AddAPIResourceAuthor
<DocumentationLink
link={ getLink("develop.apiResources.addAPIResource.requiredAuthorization.learnMore") }
>
{ t("extensions:common.learnMore") }
{ t("console:common.learnMore") }
</DocumentationLink>
</>)
}
Expand Down
2 changes: 1 addition & 1 deletion features/admin.api-resources.v1/pages/api-resources.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ const APIResourcesPage: FunctionComponent<APIResourcesPageInterface> = (
<DocumentationLink
link={ getLink("develop.apiResources.learnMore") }
>
{ t("extensions:common.learnMore") }
{ t("console:common.learnMore") }
</DocumentationLink>
</>
) }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export const AuthorizationAPIResource: FunctionComponent<AuthorizationAPIResourc
link={ getLink("develop.apiResources.addAPIResource." +
"requiredAuthorization.learnMore") }
>
{ t("extensions:common.learnMore") }
{ t("console:common.learnMore") }
</DocumentationLink>
</>)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ export const AddAPIResourceAuthorization: FunctionComponent<AddAPIResourceAuthor
<DocumentationLink
link={ getLink("develop.apiResources.addAPIResource.rbacInfoBox.learnMore") }
>
{ t("extensions:common.learnMore") }
{ t("console:common.learnMore") }
</DocumentationLink>
</>)
}
Expand All @@ -122,7 +122,7 @@ export const AddAPIResourceAuthorization: FunctionComponent<AddAPIResourceAuthor
<DocumentationLink
link={ getLink("develop.apiResources.addAPIResource.requiredAuthorization.learnMore") }
>
{ t("extensions:common.learnMore") }
{ t("console:common.learnMore") }
</DocumentationLink>
</>)
}
Expand Down
2 changes: 1 addition & 1 deletion features/admin.api-resources.v2/pages/api-resources.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ const APIResourcesPage: FunctionComponent<APIResourcesPageInterface> = (
<DocumentationLink
link={ getLink("develop.apiResources.learnMore") }
>
{ t("extensions:common.learnMore") }
{ t("console:common.learnMore") }
</DocumentationLink>
</>
) : (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -324,7 +324,7 @@ export const APIAuthorization: FunctionComponent<APIAuthorizationResourcesProps>
<DocumentationLink
link={ getLink("develop.applications.apiAuthorization.learnMore") }
>
{ t("extensions:common.learnMore") }
{ t("console:common.learnMore") }
</DocumentationLink>
</Heading>
</Grid.Column>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ export const AuthorizeAPIResource: FunctionComponent<AuthorizeAPIResourcePropsIn
.documentationLink())
}
>
{ t("extensions:common.learnMore") }
{ t("console:common.learnMore") }
</DocumentationLink>
</>)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ export const AdvancedConfigurationsForm: FunctionComponent<AdvancedConfiguration
link={ getLink("develop.applications.editApplication." +
"common.advanced.trustedApps.learnMore") }
>
{ t("extensions:common.learnMore") }
{ t("console:common.learnMore") }
</DocumentationLink>
</>
</Alert>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ const MyAccountOverview: FunctionComponent<MyAccountOverviewPropsInterface> = ({
link={ getLink("develop.applications.myaccount.overview.learnMore") }
>
<Trans
i18nKey={ "extensions:common.learnMore" }
i18nKey={ "console:common.learnMore" }
>
Learn More
</Trans>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -339,21 +339,21 @@ const TryItCreateWizard: FunctionComponent<TryItCreateWizardPropsInterface> = (
ApplicationManagementConstants.ERROR_CODE_APPLICATION_ALREADY_EXISTS) {
closeWizard();
dispatch(addAlert({
description: t("extensions:common.quickStart.sections.asgardeoTryIt.errorMessages." +
description: t("console:common.quickStart.sections.asgardeoTryIt.errorMessages." +
"appCreateDuplicate.description", { productName }),
level: AlertLevels.ERROR,
message: t("extensions:common.quickStart.sections.asgardeoTryIt.errorMessages." +
message: t("console:common.quickStart.sections.asgardeoTryIt.errorMessages." +
"appCreateDuplicate.message")
}));

return;
} else {
closeWizard();
dispatch(addAlert({
description: t("extensions:common.quickStart.sections.asgardeoTryIt.errorMessages." +
description: t("console:common.quickStart.sections.asgardeoTryIt.errorMessages." +
"appCreateGeneric.description"),
level: AlertLevels.ERROR,
message: t("extensions:common.quickStart.sections.asgardeoTryIt.errorMessages." +
message: t("console:common.quickStart.sections.asgardeoTryIt.errorMessages." +
"appCreateGeneric.message")
}));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ const BrandingAIBanner: FunctionComponent<PropsWithChildren<BrandingAIBannerProp
<DocumentationLink
link={ getLink("develop.branding.ai.learnMore") }
>
<Trans i18nKey={ "extensions:common.learnMore" }>
<Trans i18nKey={ "console:common.learnMore" }>
Learn more
</Trans>
</DocumentationLink>
Expand Down
Loading

0 comments on commit 4230aa5

Please sign in to comment.