From c4416545f8483064ea1f7022827b1da3c7c2be3f Mon Sep 17 00:00:00 2001 From: Javier Segarra Date: Fri, 15 Dec 2023 10:07:41 +0100 Subject: [PATCH] refs #6172 feat: use RegExp when message finish with . --- src/boot/axios.js | 2 +- src/i18n/en/index.js | 3 +-- src/i18n/es/index.js | 3 +-- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/boot/axios.js b/src/boot/axios.js index 1f17d8c8c..adf150d46 100644 --- a/src/boot/axios.js +++ b/src/boot/axios.js @@ -55,7 +55,7 @@ const onResponseError = (error) => { break; default: - message = `errors.${dataError?.message}`; + message = `errors.${dataError?.message.replace(/\.*$/, '')}`; break; } if (code) message = code; diff --git a/src/i18n/en/index.js b/src/i18n/en/index.js index 3f97d6bf9..7c4ea9798 100644 --- a/src/i18n/en/index.js +++ b/src/i18n/en/index.js @@ -71,9 +71,8 @@ export default { statusGatewayTimeout: 'Could not contact the server', userConfig: 'Error fetching user config', create: 'Error during creation', - 'This ticket is locked': 'dEste ticket está bloqueado', + 'This ticket is locked.': 'This ticket is locked', }, - 'This ticket is locked': 'dEste ticket está bloqueado', login: { title: 'Login', username: 'Username', diff --git a/src/i18n/es/index.js b/src/i18n/es/index.js index ff412dc1d..013c26b6d 100644 --- a/src/i18n/es/index.js +++ b/src/i18n/es/index.js @@ -70,9 +70,8 @@ export default { statusGatewayTimeout: 'No se ha podido contactar con el servidor', userConfig: 'Error al obtener configuración de usuario', create: 'Error al crear', - 'This ticket is locked': 'Este ticket está bloqueado', + 'This ticket is locked.': 'Este ticket está bloqueado', }, - 'This ticket is locked': 'Este ticket está bloqueado', login: { title: 'Inicio de sesión', username: 'Nombre de usuario',