From 98dffb177b98a2cf9d422b322021f218f4a9f6b0 Mon Sep 17 00:00:00 2001 From: nidrissi-zouggari Date: Mon, 24 Feb 2025 11:11:18 +0100 Subject: [PATCH] MT#62117 Handle ban error - The ban error is now handled, and an error message is displayed when a user is banned. - The translation of the error message has been added. Change-Id: I3fc4c8d18136f4954b2cb9ccd7b896688e0f20de (cherry picked from commit d0308acabe103aea5356570b001b1d122433939e) --- src/i18n/de.json | 2 +- src/i18n/en.json | 1 + src/i18n/es.json | 1 + src/i18n/fr.json | 1 + src/i18n/it.json | 1 + src/store/user.js | 4 ++++ 6 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/i18n/de.json b/src/i18n/de.json index 83989eee..158290ee 100644 --- a/src/i18n/de.json +++ b/src/i18n/de.json @@ -520,7 +520,7 @@ "The Destination Email is already used": "Die Ziel-E-Mail-Adresse wird bereits verwendet", "The Notify Email is already used": "Diese E-Mail-Adresse wird bereits zur Benachrichtigung verwendet", "There are no ACLs yet": "Es wurden noch keine ACLs erstellt", - "There are no Key Renew Notify Emails yet": "Es wurden noch keine E-Mail-Adressen zum Senden von Benachrichtigungen zur Schlüsselerneuerung eingetragen", + "There is a problem with your account, please contact support": "Es gibt ein Problem mit deinem Konto, bitte kontaktiere den Support", "There was an error, please retry later": "Es ist ein Fehler aufgetreten. Bitte versuchen Sie es später erneut", "This number is already in use.": "This number is already in use.", "Thursday": "Donnerstag", diff --git a/src/i18n/en.json b/src/i18n/en.json index c0c9128e..63f65d19 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -503,6 +503,7 @@ "The Notify Email is already used": "The Notify Email is already used", "There are no ACLs yet": "There are no ACLs yet", "There are no Key Renew Notify Emails yet": "There are no Key Renew Notify Emails yet", + "There is a problem with your account, please contact support": "There is a problem with your account, please contact support", "There was an error, please retry later": "There was an error, please retry later", "This number is already in use.": "This number is already in use.", "Thursday": "Thursday", diff --git a/src/i18n/es.json b/src/i18n/es.json index 62f1d2ba..48767b78 100644 --- a/src/i18n/es.json +++ b/src/i18n/es.json @@ -521,6 +521,7 @@ "The Notify Email is already used": "El correo electrónico de notificación ya está en uso", "There are no ACLs yet": "Aún no hay ACLs", "There are no Key Renew Notify Emails yet": "Aún no hay correos electrónicos para notificaciones de renovación de claves", + "There is a problem with your account, please contact support": "Hay un problema con tu cuenta, por favor contacta con el soporte", "There was an error, please retry later": "Se ha producido un error, por favor vuelva a intentarlo más tarde", "This number is already in use.": "This number is already in use.", "Thursday": "Jueves", diff --git a/src/i18n/fr.json b/src/i18n/fr.json index 04d9cc07..4e8ea928 100644 --- a/src/i18n/fr.json +++ b/src/i18n/fr.json @@ -520,6 +520,7 @@ "The Notify Email is already used": "L'e-mail de notification est déjà utilisé", "There are no ACLs yet": "Il n'y a pas encore d'ACLs", "There are no Key Renew Notify Emails yet": "Il n'y a pas encore d'e-mails de notification de renouvellement des clés", + "There is a problem with your account, please contact support": "Il y a un problème avec votre compte, veuillez contacter le support", "There was an error, please retry later": "Il y a eu une erreur, veuillez réessayer plus tard", "This number is already in use.": "Ce numéro est déjà utilisé.", "Thursday": "Jeudi", diff --git a/src/i18n/it.json b/src/i18n/it.json index 39ffb95a..a7ebd5c2 100644 --- a/src/i18n/it.json +++ b/src/i18n/it.json @@ -511,6 +511,7 @@ "The Notify Email is already used": "The Notify Email is already used", "There are no ACLs yet": "There are no ACLs yet", "There are no Key Renew Notify Emails yet": "There are no Key Renew Notify Emails yet", + "There is a problem with your account, please contact support": "C'è un problema con il tuo account, contatta l'assistenza", "There was an error, please retry later": "There was an error, please retry later", "This number is already in use.": "Questo numero è già in uso.", "Thursday": "Giovedì", diff --git a/src/store/user.js b/src/store/user.js index 490239e5..967932c6 100644 --- a/src/store/user.js +++ b/src/store/user.js @@ -1,4 +1,5 @@ 'use strict' +import { i18n } from 'boot/i18n' import _ from 'lodash' import { RequestState @@ -340,6 +341,9 @@ export default { await this.$router.push({ name: 'dashboard' }) } catch (err) { context.commit('loginFailed', err.message) + if (err.message === 'Banned') { + context.commit('loginFailed', i18n.global.t('There is a problem with your account, please contact support')) + } } }, logout () {