From 814c892e081f6e206dddae79c077227754378d84 Mon Sep 17 00:00:00 2001 From: adriano Date: Fri, 26 Jul 2024 15:23:02 -0500 Subject: [PATCH] fix(i18n): correct translation bugs --- frontend/server.js | 2 +- frontend/src/components/ConfigModal/index.js | 2 -- .../components/DashboardUser/TableUser.jsx | 4 +-- .../src/components/PositionModal/index.js | 3 -- frontend/src/translate/languages/en.js | 4 ++- frontend/src/translate/languages/es.js | 30 +++++++++---------- frontend/src/translate/languages/pt.js | 4 +-- 7 files changed, 23 insertions(+), 26 deletions(-) diff --git a/frontend/server.js b/frontend/server.js index cd23e05..a05ba32 100644 --- a/frontend/server.js +++ b/frontend/server.js @@ -6,4 +6,4 @@ app.use(express.static(path.join(__dirname, "build"))); app.get("/*", function (req, res) { res.sendFile(path.join(__dirname, "build", "index.html")); }); -app.listen(3337); +app.listen(3333); diff --git a/frontend/src/components/ConfigModal/index.js b/frontend/src/components/ConfigModal/index.js index c07218e..9ae3bc4 100644 --- a/frontend/src/components/ConfigModal/index.js +++ b/frontend/src/components/ConfigModal/index.js @@ -13,8 +13,6 @@ import DateFnsUtils from '@date-io/date-fns' import ptBrLocale from "date-fns/locale/pt-BR" import esLocale from 'date-fns/locale/es'; -import { i18n } from '../../../translate/i18n'; - import { WhatsAppsContext } from "../../context/WhatsApp/WhatsAppsContext" import { diff --git a/frontend/src/components/DashboardUser/TableUser.jsx b/frontend/src/components/DashboardUser/TableUser.jsx index e574d56..899f98f 100644 --- a/frontend/src/components/DashboardUser/TableUser.jsx +++ b/frontend/src/components/DashboardUser/TableUser.jsx @@ -75,7 +75,7 @@ const TableUser = ({ classes, usersOnlineInfo, logout }) => { Todos Online Offline - Não entrou + {i18n.t('dashboard.titles.notEnter')} @@ -221,7 +221,7 @@ const TableUser = ({ classes, usersOnlineInfo, logout }) => { - {user.sumOnlineTime ? user.sumOnlineTime.sum : "Não entrou"} + {user.sumOnlineTime ? user.sumOnlineTime.sum : i18n.t('dashboard.titles.notEnter')} {user.statusOnline && user.statusOnline.status === "online" ? ( diff --git a/frontend/src/components/PositionModal/index.js b/frontend/src/components/PositionModal/index.js index d1b68b7..4489f8d 100644 --- a/frontend/src/components/PositionModal/index.js +++ b/frontend/src/components/PositionModal/index.js @@ -5,9 +5,6 @@ import { Formik, Form, Field } from "formik" import { toast } from "react-toastify" import openSocket from 'socket.io-client' -import { i18n } from "../../translate/i18n"; - - import { makeStyles, Button, diff --git a/frontend/src/translate/languages/en.js b/frontend/src/translate/languages/en.js index e5bc319..9f10bd6 100644 --- a/frontend/src/translate/languages/en.js +++ b/frontend/src/translate/languages/en.js @@ -348,7 +348,9 @@ const messages = { title0_1: "Reminders/Schedulings", title1_1: "Calls by attendants", title2_1: "Whatsapp chat", - title3_1: "Users online/offline" + title3_1: "Users online/offline", + title4_1: "Attendance report by numbers", + title5_1: "Queue service report" }, listColumns: { column0_1: 'Actions', diff --git a/frontend/src/translate/languages/es.js b/frontend/src/translate/languages/es.js index 5021cb0..6611563 100644 --- a/frontend/src/translate/languages/es.js +++ b/frontend/src/translate/languages/es.js @@ -52,15 +52,15 @@ const messages = { } }, - table_users:{ - - title: 'Lista de usuarios', - column0: 'Nombre', - column1: 'En servicio/Terminado(S)', - column2: 'Abrir por cola', - column3: 'Cerrado por cola', - column4: 'Tiempo Online', - column5: 'Actions', + table_users: { + + title: 'Lista de usuarios', + column0: 'Nombre', + column1: 'En servicio/Terminado(S)', + column2: 'Abrir por cola', + column3: 'Cerrado por cola', + column4: 'Tiempo Online', + column5: 'Actions', }, titles: { selectQueues: 'Colas', @@ -71,8 +71,8 @@ const messages = { attendant: 'Agente', dialogTitle: 'Reportes', dialogContentText: 'Escoja una opción de reporte abajo.', - transfer: 'Transferir para outras filas', - title: 'Entradas de cierre', + transfer: 'Transferir para otras Colas', + title: 'Cierre de Tickets', confirmationModal: 'Está seguro de que desea eliminar este estado de cierre: ', status: 'Status de cierre', listUser: 'Lista de Usuarios', @@ -356,10 +356,10 @@ const messages = { title1_1: "Atención por agentes", title2_1: "Chat de whatsapp", title3_1: "Usuarios online/offline", - title4_1: "Relatório de atendimento por números", - title5_1: "Relatório de atendimento por filas" + title4_1: "Reporte de atención por números", + title5_1: "Reporte de atención por colas" }, - listColumns:{ + listColumns: { column0_1: 'Acción', column0_2: 'Pic', column0_3: 'Nombre', @@ -370,7 +370,7 @@ const messages = { column0_8: 'Mensaje', column1_1: 'Almacenar', - column1_2: 'Secretario', + column1_2: 'Secretario', column1_5: 'Tema', column1_6: 'Status', column1_7: 'Creado', diff --git a/frontend/src/translate/languages/pt.js b/frontend/src/translate/languages/pt.js index b3d8cd3..8c1af2b 100644 --- a/frontend/src/translate/languages/pt.js +++ b/frontend/src/translate/languages/pt.js @@ -75,8 +75,8 @@ const messages = { status: 'Status de encerramento', listUser: 'Lista de Usuarios', user: 'Usuario', - notEnter: 'No ingresó', - notEnterToday: 'Não entrou' + notEnter: 'Não entrou', + notEnterToday: 'Não entrou hoje' } }, reportOptType: {