Alteração para exibir traduções de acordo com o idioma do navegador

pull/20/head
adriano 2022-11-25 13:09:24 -03:00
parent ddf026a168
commit 8e3861afb4
6 changed files with 50 additions and 6 deletions

View File

@ -11,6 +11,8 @@ import {
import { i18n } from "../../../translate/i18n";
import ptBrLocale from "date-fns/locale/pt-BR"; import ptBrLocale from "date-fns/locale/pt-BR";

View File

@ -89,7 +89,12 @@ const MainListItems = (props) => {
primary={i18n.t("mainDrawer.listItems.contacts")} primary={i18n.t("mainDrawer.listItems.contacts")}
icon={<ContactPhoneOutlinedIcon />} icon={<ContactPhoneOutlinedIcon />}
/> />
<ListItemLink to="/schedulesReminder" primary="Lembretes" icon={<SendOutlined />} />
<ListItemLink to="/schedulesReminder"
primary={i18n.t("mainDrawer.listItems.reminders")}
icon={<SendOutlined />}
/>
<ListItemLink <ListItemLink
to="/quickAnswers" to="/quickAnswers"
primary={i18n.t("mainDrawer.listItems.quickAnswers")} primary={i18n.t("mainDrawer.listItems.quickAnswers")}

View File

@ -29,7 +29,8 @@ import { render } from '@testing-library/react';
import Modal from "../../components/ModalUpdateScheduleReminder"; import Modal from "../../components/ModalUpdateScheduleReminder";
import openSocket from "socket.io-client"; import openSocket from "socket.io-client";
import { i18n } from "../../translate/i18n";
@ -449,7 +450,8 @@ const SchedulesReminder = () => {
<Item> <Item>
<TextField <TextField
placeholder='Numero/Nome...' // placeholder='Numero/Nome...'
placeholder= {i18n.t("report.search.search1")}
type="search" type="search"
value={contactNumber} value={contactNumber}
onChange={handleSearch} onChange={handleSearch}
@ -465,7 +467,7 @@ const SchedulesReminder = () => {
<Item><DatePicker1 func={datePicker1Value} minDate={false} startEmpty={true} reset={resetChild} setReset={setReset} title={'Data inicio'} /></Item> <Item><DatePicker1 func={datePicker1Value} minDate={false} startEmpty={true} reset={resetChild} setReset={setReset} title={i18n.t("report.date.dateStart")} /></Item>
<Item><DatePicker2 func={datePicker2Value} minDate={false} startEmpty={true} reset={resetChild} setReset={setReset} title={'Data fim'} /></Item> <Item><DatePicker2 func={datePicker2Value} minDate={false} startEmpty={true} reset={resetChild} setReset={setReset} title={'Data fim'} /></Item>
<Item sx={{ gridColumn: '4 / 5' }}> <Item sx={{ gridColumn: '4 / 5' }}>
@ -501,7 +503,8 @@ const SchedulesReminder = () => {
</ConfirmationModal> </ConfirmationModal>
<MaterialTable <MaterialTable
title="Lembretes/Agendamentos" // title="Lembretes/Agendamentos"
title={i18n.t("report.listTitle.title1")}
columns={ columns={
[ [

View File

@ -308,6 +308,7 @@ const messages = {
connections: "Connections", connections: "Connections",
tickets: "Tickets", tickets: "Tickets",
contacts: "Contacts", contacts: "Contacts",
reminders: "Reminders",
quickAnswers: "Quick Answers", quickAnswers: "Quick Answers",
queues: "Queues", queues: "Queues",
administration: "Administration", administration: "Administration",
@ -322,6 +323,14 @@ const messages = {
}, },
}, },
}, },
report: {
listTitle: {
title1: "Reminders/Schedules",
},
search: {
search1: "Number/Name...",
}
},
notifications: { notifications: {
noTickets: "No notifications.", noTickets: "No notifications.",
}, },

View File

@ -313,6 +313,7 @@ const messages = {
connections: "Conexiones", connections: "Conexiones",
tickets: "Tickets", tickets: "Tickets",
contacts: "Contactos", contacts: "Contactos",
reminders: "Recordatorio",
quickAnswers: "Respuestas rápidas", quickAnswers: "Respuestas rápidas",
queues: "Linhas", queues: "Linhas",
administration: "Administración", administration: "Administración",
@ -327,6 +328,14 @@ const messages = {
}, },
}, },
}, },
report: {
listTitle: {
title1: "Recordatorios/Programación",
},
search: {
search1: "Número/Nombre...",
}
},
notifications: { notifications: {
noTickets: "Sin notificaciones.", noTickets: "Sin notificaciones.",
}, },

View File

@ -307,10 +307,11 @@ const messages = {
}, },
mainDrawer: { mainDrawer: {
listItems: { listItems: {
dashboard: "Dashboard", dashboard: "Dashboard",
connections: "Conexões", connections: "Conexões",
tickets: "Tickets", tickets: "Tickets",
contacts: "Contatos", contacts: "Contatos",
reminders: "Lembretes",
quickAnswers: "Respostas Rápidas", quickAnswers: "Respostas Rápidas",
queues: "Filas", queues: "Filas",
administration: "Administração", administration: "Administração",
@ -325,6 +326,21 @@ const messages = {
}, },
}, },
}, },
report: {
listTitle: {
title1: "Lembretes/Agendamentos",
},
search: {
search1: "Numero/Nome...",
},
date:{
dateStart: "Data início",
dateEnd: "Data fim"
},
button:{
}
},
notifications: { notifications: {
noTickets: "Nenhuma notificação.", noTickets: "Nenhuma notificação.",
}, },