diff --git a/src/api/common.js b/src/api/common.js index e8e99c6e..44569ece 100644 --- a/src/api/common.js +++ b/src/api/common.js @@ -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) diff --git a/src/boot/routes.js b/src/boot/routes.js index 24ac9e5f..94c378c4 100644 --- a/src/boot/routes.js +++ b/src/boot/routes.js @@ -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('/') diff --git a/src/i18n/de.json b/src/i18n/de.json index 267f126d..e46d6895 100644 --- a/src/i18n/de.json +++ b/src/i18n/de.json @@ -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", diff --git a/src/i18n/en.json b/src/i18n/en.json index b84f8af5..7226aaf3 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -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", diff --git a/src/i18n/es.json b/src/i18n/es.json index 09813ac8..dfe5e448 100644 --- a/src/i18n/es.json +++ b/src/i18n/es.json @@ -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", diff --git a/src/i18n/fr.json b/src/i18n/fr.json index 9033fdb4..48f300e1 100644 --- a/src/i18n/fr.json +++ b/src/i18n/fr.json @@ -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", diff --git a/src/i18n/it.json b/src/i18n/it.json index d617b5e0..b41e2c94 100644 --- a/src/i18n/it.json +++ b/src/i18n/it.json @@ -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",