From a3d467c23a890b0d2f3f6fc69fb93dcf00e737a0 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Tue, 5 Nov 2019 18:15:59 +0100 Subject: [PATCH] Make error when last identity translatable Signed-off-by: Thomas Citharel --- js/src/i18n/en_US.json | 1 + js/src/i18n/fr_FR.json | 1 + js/src/utils/errors.ts | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/js/src/i18n/en_US.json b/js/src/i18n/en_US.json index 5d00b9e4a..fd0f92998 100644 --- a/js/src/i18n/en_US.json +++ b/js/src/i18n/en_US.json @@ -298,6 +298,7 @@ "You are already a participant of this event.": "You are already a participant of this event.", "You are already logged-in.": "You are already logged-in.", "You can add tags by hitting the Enter key or by adding a comma": "You can add tags by hitting the Enter key or by adding a comma", + "You can't remove your last identity.": "You can't remove your last identity.", "You have been disconnected": "You have been disconnected", "You have cancelled your participation": "You have cancelled your participation", "You have one event in {days} days.": "You have no events in {days} days | You have one event in {days} days. | You have {count} events in {days} days", diff --git a/js/src/i18n/fr_FR.json b/js/src/i18n/fr_FR.json index 4c68d77bd..59b066a5c 100644 --- a/js/src/i18n/fr_FR.json +++ b/js/src/i18n/fr_FR.json @@ -298,6 +298,7 @@ "You are already a participant of this event.": "Vous participez déjà à cet événement.", "You are already logged-in.": "Vous êtes déjà connecté.", "You can add tags by hitting the Enter key or by adding a comma": "Vous pouvez ajouter des tags en appuyant sur la touche Entrée ou bien en ajoutant une virgule", + "You can't remove your last identity.": "Vous ne pouvez pas supprimer votre dernière identité", "You have been disconnected": "Vous avez été déconnecté⋅e", "You have cancelled your participation": "Vous avez annulé votre participation", "You have one event in {days} days.": "Vous n'avez pas d'événements dans {days} jours | Vous avez un événement dans {days} jours. | Vous avez {count} événements dans {days} jours", diff --git a/js/src/utils/errors.ts b/js/src/utils/errors.ts index 1fd723b3b..95f8ead37 100644 --- a/js/src/utils/errors.ts +++ b/js/src/utils/errors.ts @@ -48,6 +48,11 @@ export const errors: IError[] = [ value: i18n.t("The current identity doesn't have any permission on this event. You should probably change it.") as string, suggestRefresh: false, }, + { + match: /Cannot remove the last identity of a user/, + value: i18n.t("You can't remove your last identity.") as string, + suggestRefresh: false, + }, { match: /^No user with this email was found$/, value: null,