Skip to content

Commit

Permalink
changing innovation library name, login error and more (#7283)
Browse files Browse the repository at this point in the history
* changing innovation library name, login error and more

* Login message and innovationPack errors

---------

Co-authored-by: Carlos Cano <[email protected]>
Co-authored-by: Valentin Yanakiev <[email protected]>
  • Loading branch information
3 people authored Dec 6, 2024
1 parent 97879b8 commit d69585d
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 21 deletions.
1 change: 1 addition & 0 deletions src/core/auth/authentication/components/Kratos/messages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ const messages: Record<string, string> = {
'4060005': 'recovery-flow-expired',
'1070009': 'verification-flow-continue',
'4000007': 'login-flow-account-exists',
'4000006': 'invalid-credentials',
};

export const useKratosT = () => {
Expand Down
26 changes: 14 additions & 12 deletions src/core/i18n/en/translation.en.json
Original file line number Diff line number Diff line change
Expand Up @@ -350,10 +350,10 @@
"loading": "Loading...",
"innovation-flow": "Innovation flow",
"innovation-flows": "Innovation Flows",
"innovation-packs": "Innovation Packs",
"innovation-packs": "Template Packs",
"innovation-hub": "Innovation Hub",
"innovation-hubs": "Innovation Hubs",
"innovationPack": "Innovation Pack",
"innovationPack": "Template Pack",
"more": "More",
"url": "URL",
"sources": "Sources",
Expand Down Expand Up @@ -499,7 +499,7 @@
"hidden": true
},
"INNOVATION_PACK_PROVIDER": {
"name": "Innovation Pack Provider",
"name": "Template Pack Provider",
"order": 17,
"hidden": true
}
Expand Down Expand Up @@ -1819,9 +1819,9 @@
},
"innovationLibrary": {
"shortName": "$t(common.library)",
"fullName": "Best practices",
"title": "Innovation Library on Alkemio is here to guide your way to impact",
"subtitle": "Open the innovation packs below to explore all the Whiteboard templates, post templates and innovation flows you can use. If you want to know more <click>click here</click>.",
"fullName": "Template Library",
"title": "Template Library on Alkemio is here to guide your way to impact",
"subtitle": "Open the template packs below to explore all the Whiteboard templates, post templates and innovation flows you can use. If you want to know more <click>click here</click>.",
"useTemplateButton": "Access this template from your Space to use it.",
"innovationPacks": {
"headerTitle": "$t(common.innovation-packs)",
Expand Down Expand Up @@ -1908,7 +1908,7 @@
"hostedSpaces": "Hosted Spaces",
"virtualContributors": "Virtual Contributors",
"innovationPacks": "$t(common.innovation-packs)",
"noTemplates": "This Innovation Pack doesn't have any template yet",
"noTemplates": "This Template Pack doesn't have any template yet",
"customHomepages": "Custom Homepages",
"hostTitle": "Host",
"contactsLink": "If you want to change any of these settings, please contact the Alkemio team here.",
Expand All @@ -1926,7 +1926,8 @@
"deleteSpace_disallowed": "The Space can only be deleted by the host of this Space.",
"moreInfo": "More about Alkemio licenses can be found <moreinfo>here</moreinfo>.",
"moreInfoUrl": "$t(plansTable.seeMoreUrl)",
"licenseUpdated": "License updated successfully"
"licenseUpdated": "License updated successfully",
"deletedSuccessfully": "{{entity}} deleted successfully"
},
"settings": {
"description": "Here you can edit the visibility settings of your {{entity}}."
Expand Down Expand Up @@ -2080,14 +2081,14 @@
}
},
"innovation-packs": {
"create": "Create Innovation Pack",
"create": "Create Template Pack",
"fields": {
"provider": "Provider organization",
"listedInStore": "Listed in Store",
"searchVisibility": "Search Visibility"
},
"back-button": "All $t(common.innovation-packs)",
"save-new-for-details": "Save the new Innovation Pack to edit the rest of the details",
"save-new-for-details": "Save the new Template Pack to edit the rest of the details",
"saved-successfully": "Saved Successfully"
},
"innovationHubs": {
Expand Down Expand Up @@ -2329,7 +2330,7 @@
},
"new-to-alkemio": {
"header": "New to Alkemio?",
"subheader": "Easy for you to engage in effective and meaningful ways. Find solutions to Subspaces.",
"subheader": "Easy for you to engage in effective and meaningful ways. Find Subspaces to contribute.",
"more-info": "Contact us!",
"more-info-url": "https://alkemio.foundation/feedback/"
}
Expand Down Expand Up @@ -2799,7 +2800,8 @@
"verification-flow-expired": "The verification link has expired. Please request a fresh one by submitting your email once again.",
"recovery-flow-expired": "This password reset link has expired. Please request a new one by submitting your email once again.",
"verification-flow-continue": "Continue",
"login-flow-account-exists": "You're trying to sign in with a LinkedIn/Microsoft account, but the associated email address was already used before. Please sign in with this e-mail address and password or try to reset the password. If that doesn't work, please send an email to [email protected]."
"login-flow-account-exists": "You're trying to sign in with a LinkedIn/Microsoft account, but the associated email address was already used before. Please sign in with this e-mail address and password or try to reset the password. If that doesn't work, please send an email to [email protected].",
"invalid-credentials": "The email address or password you inserted is invalid. Please check your credentials and try again. Are you trying to sign up instead? You can do so by clicking the link above."
},
"fields": {
"ID": "ID",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const InnovationPackProfilePage = () => {
const { templateNameId, innovationPackNameId } = useUrlParams();

if (!innovationPackNameId) {
throw new Error('Must be within Innovation Pack');
throw new Error('Must be within Template Pack');
}

const { data: innovationPackResolverData, loading: resolvingInnovationPack } = useInnovationPackResolveIdQuery({
Expand All @@ -38,7 +38,7 @@ const InnovationPackProfilePage = () => {

const innovationPackId = innovationPackResolverData?.lookupByName.innovationPack?.id;
if (innovationPackNameId && !resolvingInnovationPack && !innovationPackId) {
throw new Error('Innovation pack not found.');
throw new Error('Template pack not found.');
}

const { data, loading: loadingInnovationPack } = useInnovationPackProfilePageQuery({
Expand Down
6 changes: 3 additions & 3 deletions src/domain/InnovationPack/admin/AdminInnovationPackPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const AdminInnovationPackPage = () => {
const { innovationPackNameId, templateNameId } = useUrlParams();

if (!innovationPackNameId) {
throw new Error('Must be within Innovation Pack');
throw new Error('Must be within Template Pack');
}

const { data: innovationPackResolverData, loading: resolvingInnovationPack } = useInnovationPackResolveIdQuery({
Expand All @@ -58,7 +58,7 @@ const AdminInnovationPackPage = () => {

const innovationPackId = innovationPackResolverData?.lookupByName.innovationPack?.id;
if (innovationPackNameId && !resolvingInnovationPack && !innovationPackId) {
throw new Error('Innovation pack not found.');
throw new Error('Template pack not found.');
}

const { data, loading: loadingInnovationPack } = useAdminInnovationPackQuery({
Expand Down Expand Up @@ -132,7 +132,7 @@ const AdminInnovationPackPage = () => {
templatesSetId={templatesSetId}
templateId={selectedTemplateId}
baseUrl={buildInnovationPackSettingsUrl(innovationPack.profile.url)}
alwaysEditTemplate // When editing an Innovation pack, we don't want to see template preview, just go to Edit mode always
alwaysEditTemplate // When editing an Template pack, we don't want to see template preview, just go to Edit mode always
canCreateTemplates={templateType => TemplateTypePermissions.create.includes(templateType)}
canEditTemplates={templateType => TemplateTypePermissions.edit.includes(templateType)}
canDeleteTemplates={templateType => TemplateTypePermissions.delete.includes(templateType)}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ export const ContributorAccountView = ({ accountHostName, account, loading }: Co
const [deleteSpaceMutation, { loading: deleteSpaceLoading }] = useDeleteSpaceMutation({
onCompleted: () => {
clearDeleteState();
notify('Space deleted successfully!', 'success');
notify(t('pages.admin.generic.sections.account.deletedSuccessfully', { entity: t('common.space') }), 'success');
},
refetchQueries: ['AccountInformation'],
});
Expand Down Expand Up @@ -230,7 +230,10 @@ export const ContributorAccountView = ({ accountHostName, account, loading }: Co
const [deleteVCMutation, { loading: deleteVCLoading }] = useDeleteVirtualContributorOnAccountMutation({
onCompleted: () => {
clearDeleteState();
notify('Virtual Contributor deleted successfully!', 'success');
notify(
t('pages.admin.generic.sections.account.deletedSuccessfully', { entity: t('common.virtual-contributor') }),
'success'
);
},
refetchQueries: ['AccountInformation'],
});
Expand Down Expand Up @@ -259,7 +262,10 @@ export const ContributorAccountView = ({ accountHostName, account, loading }: Co
const [deletePackMutation, { loading: deletePackLoading }] = useDeleteInnovationPackMutation({
onCompleted: () => {
clearDeleteState();
notify('Innovation Pack deleted successfully!', 'success');
notify(
t('pages.admin.generic.sections.account.deletedSuccessfully', { entity: t('common.innovationPack') }),
'success'
);
},
refetchQueries: ['AccountInformation'],
});
Expand All @@ -286,7 +292,10 @@ export const ContributorAccountView = ({ accountHostName, account, loading }: Co
const [deleteHubMutation, { loading: deleteHubLoading }] = useDeleteInnovationHubMutation({
onCompleted: () => {
clearDeleteState();
notify('Innovation Hub deleted successfully!', 'success');
notify(
t('pages.admin.generic.sections.account.deletedSuccessfully', { entity: t('common.innovation-hub') }),
'success'
);
},
refetchQueries: ['AccountInformation'],
});
Expand Down

0 comments on commit d69585d

Please sign in to comment.