From e8affd1c982a98e62298602a4459c5c33859701c 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) (cherry picked from commit aff1ba751d56320fc42d8399ee3f29cc418760cd) --- 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 | 3 +++ 6 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/i18n/de.json b/src/i18n/de.json index 7f691c79..8b76d737 100644 --- a/src/i18n/de.json +++ b/src/i18n/de.json @@ -530,7 +530,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 0810f5b5..83b0a6cc 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -514,6 +514,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 2f02db5e..cdd26850 100644 --- a/src/i18n/es.json +++ b/src/i18n/es.json @@ -532,6 +532,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 7188d343..83989300 100644 --- a/src/i18n/fr.json +++ b/src/i18n/fr.json @@ -531,6 +531,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 080b3f9c..bedf2c1e 100644 --- a/src/i18n/it.json +++ b/src/i18n/it.json @@ -522,6 +522,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 bd09718e..ad0497eb 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 QRCode from 'qrcode' import { date } from 'quasar' @@ -353,6 +354,8 @@ export default { context.commit('loginFailed', err.message) if (err.message === 'Password expired') { this.$router.push({ path: PATH_CHANGE_PASSWORD }) + } else if (err.message === 'Banned') { + context.commit('loginFailed', i18n.global.t('There is a problem with your account, please contact support')) } } },