MT#60623 Add translations for invalid license error message

Add translations for the error message shown when license is invalid
and fix a small bug in the router guard, in fact we were checking
the licenses list against the attribute which are different values.

Change-Id: Ic595f731cd770f932e30fe9b649d68bcc3af7119
(cherry picked from commit f301d02b3f)
mr12.5
Debora Crescenzo 9 months ago committed by Crescenzo Debora
parent 1c1f7b5ee3
commit 7002e660ce

@ -9,6 +9,8 @@ import {
hasJwt
} from 'src/auth'
import { getCurrentLangAsV1Format } from 'src/i18n'
import { i18n } from 'src/boot/i18n'
import saveAs from 'file-saver'
export const LIST_DEFAULT_PAGE = 1
export const LIST_DEFAULT_ROWS = 24
@ -170,7 +172,7 @@ function handleResponseError (err) {
const code = _.get(err, 'response.data.code', null)
let message = _.get(err, 'response.data.message', null)
if (code === 403 && message === 'Invalid license') {
message = 'Invalid or expired license. Contact your administrator to activate this functionality'
message = i18n.global.tc('Contact your administrator to activate this functionality')
}
if (code !== null && message !== null) {
throw new ApiResponseError(code, message)

@ -38,7 +38,7 @@ export default ({ app, router, store }) => {
if (to.meta.license && hasSubscriberProfileAttribute) {
// Guard to assure that users cannot click on menu if
// it is mistakenly visible when the license is inactive
store.getters['user/isLicenseActive'](to.meta.profileAttribute) ? next() : next('/')
store.getters['user/isLicenseActive'](to.meta.license) ? next() : next('/')
}
hasSubscriberProfileAttribute ? next() : next('/')

@ -107,6 +107,7 @@
"Conference name": "Konferenzname",
"Confirm": "Bestätigen",
"Contact": "Kontakt",
"Contact your administrator to activate this functionality":"Zur Aktivierung dieser Funktion kontaktieren Sie Ihren Administrator.",
"Content": "Inhalt",
"Conversations": "Konversationen",
"Copy link": "Link kopieren",

@ -105,6 +105,7 @@
"Conference": "Conference",
"Confirm": "Confirm",
"Contact": "Contact",
"Contact your administrator to activate this functionality":"Contact your administrator to activate this functionality",
"Content": "Content",
"Conversations": "Conversations",
"Cost": "Cost",

@ -107,6 +107,7 @@
"Conference name": "Nombre de la conferencia",
"Confirm": "Confirmar",
"Contact": "Contacto",
"Contact your administrator to activate this functionality":"Póngase en contacto con su administrador para activar esta funcionalidad",
"Content": "Contenido",
"Conversations": "Conversaciones",
"Copy link": "Copiar enlace",

@ -107,6 +107,7 @@
"Conference name": "Nom de la conférence",
"Confirm": "Confirmer",
"Contact": "Contact",
"Contact your administrator to activate this functionality":"Contactez votre administrateur pour activer cette fonctionnalité",
"Content": "Contenu",
"Conversations": "Conversations",
"Copy link": "Copier le lien",

@ -105,6 +105,7 @@
"Conference name": "Nome conferenza",
"Confirm": "Conferma",
"Contact": "Contatto",
"Contact your administrator to activate this functionality": "Contatta l'amministratore per attivare questa funzionalità",
"Content": "Contenuto",
"Conversations": "Conversazioni",
"Copy link": "Copia il link",

Loading…
Cancel
Save