From 36056fe393d90cab97fccda7cafefae9a2da88cd Mon Sep 17 00:00:00 2001 From: kim Date: Tue, 27 Aug 2024 16:02:47 +0200 Subject: [PATCH 1/4] feat: add membership request messages --- src/constants/messages.ts | 3 +++ src/langs/en/messages.json | 4 +++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/src/constants/messages.ts b/src/constants/messages.ts index 5fe36172..bef3754f 100644 --- a/src/constants/messages.ts +++ b/src/constants/messages.ts @@ -190,6 +190,9 @@ export const SUCCESS_MESSAGES = { PUT_ITEM_GEOLOCATION: 'PUT_ITEM_GEOLOCATION', DELETE_ITEM_GEOLOCATION: 'DELETE_ITEM_GEOLOCATION', + + REQUEST_MEMBERSHIP: 'REQUEST_MEMBERSHIP', + DELETE_MEMBERSHIP_REQUEST: 'DELETE_MEMBERSHIP_REQUEST', }; export const REQUEST_MESSAGES = { diff --git a/src/langs/en/messages.json b/src/langs/en/messages.json index 99e2823e..c504c434 100644 --- a/src/langs/en/messages.json +++ b/src/langs/en/messages.json @@ -148,5 +148,7 @@ "ACCOUNT_NOT_FOUND": "An account was not found", "CANNOT_CREATE_MEMBERSHIP_CAUSE_ITEM_LOGIN_SCHEMA_EXISTS": "You cannot request a membership because the targeted ressource allows pseudonimized users", "CANNOT_MODIFY_GUEST_ITEM_MEMBERSHIP": "Cannot modify the permission of targeted account because it is a pseudonymized user", - "CANNOT_ENROLL_ITEM_WITHOUT_ITEM_LOGIN_SCHEMA": "Cannot enroll in the targeted item because it doesn't allow pseudonymized users" + "CANNOT_ENROLL_ITEM_WITHOUT_ITEM_LOGIN_SCHEMA": "Cannot enroll in the targeted item because it doesn't allow pseudonymized users", + "REQUEST_MEMBERSHIP": "Membership requests has been sent successfully!", + "DELETE_MEMBERSHIP_REQUEST": "Membership request has been deleted" } From 8688b46fe8914628784f0e33b6f460aa011ff966 Mon Sep 17 00:00:00 2001 From: kim Date: Fri, 30 Aug 2024 15:46:02 +0200 Subject: [PATCH 2/4] feat: add account type translations --- src/langs/ar/accountTypes.json | 1 + src/langs/de/accountTypes.json | 1 + src/langs/en/accountTypes.json | 5 +++++ src/langs/es/accountTypes.json | 1 + src/langs/fr/accountTypes.json | 5 +++++ src/langs/index.ts | 12 ++++++++++++ src/langs/it/accountTypes.json | 1 + 7 files changed, 26 insertions(+) create mode 100644 src/langs/ar/accountTypes.json create mode 100644 src/langs/de/accountTypes.json create mode 100644 src/langs/en/accountTypes.json create mode 100644 src/langs/es/accountTypes.json create mode 100644 src/langs/fr/accountTypes.json create mode 100644 src/langs/it/accountTypes.json diff --git a/src/langs/ar/accountTypes.json b/src/langs/ar/accountTypes.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/src/langs/ar/accountTypes.json @@ -0,0 +1 @@ +{} diff --git a/src/langs/de/accountTypes.json b/src/langs/de/accountTypes.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/src/langs/de/accountTypes.json @@ -0,0 +1 @@ +{} diff --git a/src/langs/en/accountTypes.json b/src/langs/en/accountTypes.json new file mode 100644 index 00000000..b5a0e4a4 --- /dev/null +++ b/src/langs/en/accountTypes.json @@ -0,0 +1,5 @@ +{ + "guest": "guest", + "individual": "member", + "group": "group" +} diff --git a/src/langs/es/accountTypes.json b/src/langs/es/accountTypes.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/src/langs/es/accountTypes.json @@ -0,0 +1 @@ +{} diff --git a/src/langs/fr/accountTypes.json b/src/langs/fr/accountTypes.json new file mode 100644 index 00000000..dc31d988 --- /dev/null +++ b/src/langs/fr/accountTypes.json @@ -0,0 +1,5 @@ +{ + "guest": "invité", + "individual": "membre", + "group": "groupe" +} diff --git a/src/langs/index.ts b/src/langs/index.ts index f398285b..1de5c791 100644 --- a/src/langs/index.ts +++ b/src/langs/index.ts @@ -70,6 +70,12 @@ import actionTypesDE from './de/actionTypes.json' with { type: 'json' }; import actionTypesIT from './it/actionTypes.json' with { type: 'json' }; import actionTypesAR from './ar/actionTypes.json' with { type: 'json' }; import actionTypesES from './es/actionTypes.json' with { type: 'json' }; +import accountTypesEN from './en/accountTypes.json' with { type: 'json' }; +import accountTypesFR from './fr/accountTypes.json' with { type: 'json' }; +import accountTypesDE from './de/accountTypes.json' with { type: 'json' }; +import accountTypesIT from './it/accountTypes.json' with { type: 'json' }; +import accountTypesAR from './ar/accountTypes.json' with { type: 'json' }; +import accountTypesES from './es/accountTypes.json' with { type: 'json' }; // define namespaces export const namespaces = { @@ -97,6 +103,7 @@ const en = { ...contextEN, ...flagEN, ...maxWidthEN, + ...accountTypesEN, }, [namespaces.messages]: messagesEN, [namespaces.uppy]: uppyEN, @@ -114,6 +121,7 @@ const fr = { ...contextFR, ...flagFR, ...maxWidthFR, + ...accountTypesFR, }, [namespaces.messages]: messagesFR, [namespaces.uppy]: uppyFR, @@ -131,6 +139,7 @@ const de = { ...contextDE, ...flagDE, ...maxWidthDE, + ...accountTypesDE, }, [namespaces.messages]: messagesDE, [namespaces.uppy]: uppyDE, @@ -148,6 +157,7 @@ const it = { ...contextIT, ...flagIT, ...maxWidthIT, + ...accountTypesIT, }, [namespaces.messages]: messagesIT, [namespaces.uppy]: uppyIT, @@ -165,6 +175,7 @@ const ar = { ...contextAR, ...flagAR, ...maxWidthAR, + ...accountTypesAR, }, [namespaces.messages]: messagesAR, [namespaces.uppy]: uppyAR, @@ -182,6 +193,7 @@ const es = { ...contextES, ...flagES, ...maxWidthES, + ...accountTypesES, }, [namespaces.messages]: messagesES, [namespaces.uppy]: uppyES, diff --git a/src/langs/it/accountTypes.json b/src/langs/it/accountTypes.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/src/langs/it/accountTypes.json @@ -0,0 +1 @@ +{} From 6f8b2c4ff14aaae4edd591065f6b268d64c11f86 Mon Sep 17 00:00:00 2001 From: kim Date: Thu, 19 Sep 2024 14:34:08 +0200 Subject: [PATCH 3/4] feat: add enroll success message --- src/constants/messages.ts | 1 + src/langs/en/messages.json | 3 ++- src/langs/fr/messages.json | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/constants/messages.ts b/src/constants/messages.ts index bef3754f..401f1009 100644 --- a/src/constants/messages.ts +++ b/src/constants/messages.ts @@ -193,6 +193,7 @@ export const SUCCESS_MESSAGES = { REQUEST_MEMBERSHIP: 'REQUEST_MEMBERSHIP', DELETE_MEMBERSHIP_REQUEST: 'DELETE_MEMBERSHIP_REQUEST', + ENROLL: 'ENROLL', }; export const REQUEST_MESSAGES = { diff --git a/src/langs/en/messages.json b/src/langs/en/messages.json index c504c434..6db9aff5 100644 --- a/src/langs/en/messages.json +++ b/src/langs/en/messages.json @@ -150,5 +150,6 @@ "CANNOT_MODIFY_GUEST_ITEM_MEMBERSHIP": "Cannot modify the permission of targeted account because it is a pseudonymized user", "CANNOT_ENROLL_ITEM_WITHOUT_ITEM_LOGIN_SCHEMA": "Cannot enroll in the targeted item because it doesn't allow pseudonymized users", "REQUEST_MEMBERSHIP": "Membership requests has been sent successfully!", - "DELETE_MEMBERSHIP_REQUEST": "Membership request has been deleted" + "DELETE_MEMBERSHIP_REQUEST": "Membership request has been successfully deleted.", + "ENROLL": "You successfully enrolled to the item." } diff --git a/src/langs/fr/messages.json b/src/langs/fr/messages.json index 2538d8ed..60872398 100644 --- a/src/langs/fr/messages.json +++ b/src/langs/fr/messages.json @@ -148,5 +148,6 @@ "ACCOUNT_NOT_FOUND": "Aucun compte n'a été trouvé", "CANNOT_CREATE_MEMBERSHIP_CAUSE_ITEM_LOGIN_SCHEMA_EXISTS": "Vous ne pouvez pas demander une adhésion car la ressource ciblée autorise les utilisateurs pseudonymisés", "CANNOT_MODIFY_GUEST_ITEM_MEMBERSHIP": "Impossible de modifier l'autorisation du compte ciblé car il s'agit d'un utilisateur pseudonymisé", - "CANNOT_ENROLL_ITEM_WITHOUT_ITEM_LOGIN_SCHEMA": "Impossible de s'inscrire à l'élément ciblé car il n'autorise pas les utilisateurs pseudonymisés" + "CANNOT_ENROLL_ITEM_WITHOUT_ITEM_LOGIN_SCHEMA": "Impossible de s'inscrire à l'élément ciblé car il n'autorise pas les utilisateurs pseudonymisés", + "ENROLL": "Vous avez rejoint l'élément avec succès." } From 57b1d285464118c090642630ffa1f5d48c16a271 Mon Sep 17 00:00:00 2001 From: kim Date: Mon, 23 Sep 2024 14:32:53 +0200 Subject: [PATCH 4/4] refactor: apply PR requested changes --- src/langs/en/messages.json | 2 +- src/langs/fr/messages.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/langs/en/messages.json b/src/langs/en/messages.json index 6db9aff5..9235d8aa 100644 --- a/src/langs/en/messages.json +++ b/src/langs/en/messages.json @@ -148,7 +148,7 @@ "ACCOUNT_NOT_FOUND": "An account was not found", "CANNOT_CREATE_MEMBERSHIP_CAUSE_ITEM_LOGIN_SCHEMA_EXISTS": "You cannot request a membership because the targeted ressource allows pseudonimized users", "CANNOT_MODIFY_GUEST_ITEM_MEMBERSHIP": "Cannot modify the permission of targeted account because it is a pseudonymized user", - "CANNOT_ENROLL_ITEM_WITHOUT_ITEM_LOGIN_SCHEMA": "Cannot enroll in the targeted item because it doesn't allow pseudonymized users", + "CANNOT_ENROLL_ITEM_WITHOUT_ITEM_LOGIN_SCHEMA": "Cannot enroll in this item because it doesn't allow pseudonymized users", "REQUEST_MEMBERSHIP": "Membership requests has been sent successfully!", "DELETE_MEMBERSHIP_REQUEST": "Membership request has been successfully deleted.", "ENROLL": "You successfully enrolled to the item." diff --git a/src/langs/fr/messages.json b/src/langs/fr/messages.json index 60872398..b0120c72 100644 --- a/src/langs/fr/messages.json +++ b/src/langs/fr/messages.json @@ -148,6 +148,6 @@ "ACCOUNT_NOT_FOUND": "Aucun compte n'a été trouvé", "CANNOT_CREATE_MEMBERSHIP_CAUSE_ITEM_LOGIN_SCHEMA_EXISTS": "Vous ne pouvez pas demander une adhésion car la ressource ciblée autorise les utilisateurs pseudonymisés", "CANNOT_MODIFY_GUEST_ITEM_MEMBERSHIP": "Impossible de modifier l'autorisation du compte ciblé car il s'agit d'un utilisateur pseudonymisé", - "CANNOT_ENROLL_ITEM_WITHOUT_ITEM_LOGIN_SCHEMA": "Impossible de s'inscrire à l'élément ciblé car il n'autorise pas les utilisateurs pseudonymisés", + "CANNOT_ENROLL_ITEM_WITHOUT_ITEM_LOGIN_SCHEMA": "Impossible de s'inscrire à cet élément car il n'autorise pas les utilisateurs pseudonymisés", "ENROLL": "Vous avez rejoint l'élément avec succès." }