mirror of
https://github.com/cheveguerra/whaticket-community.git
synced 2026-04-18 03:39:29 +00:00
fix: Added missing english translations
This commit is contained in:
@@ -6,6 +6,8 @@ import DialogContent from "@material-ui/core/DialogContent";
|
||||
import DialogTitle from "@material-ui/core/DialogTitle";
|
||||
import Typography from "@material-ui/core/Typography";
|
||||
|
||||
import { i18n } from "../../translate/i18n";
|
||||
|
||||
const ConfirmationModal = ({ title, children, open, setOpen, onConfirm }) => {
|
||||
return (
|
||||
<Dialog
|
||||
@@ -21,9 +23,9 @@ const ConfirmationModal = ({ title, children, open, setOpen, onConfirm }) => {
|
||||
<Button
|
||||
variant="contained"
|
||||
onClick={() => setOpen(false)}
|
||||
color="secondary"
|
||||
color="default"
|
||||
>
|
||||
Cancelar
|
||||
{i18n.t("confirmationModal.buttons.cancel")}
|
||||
</Button>
|
||||
<Button
|
||||
variant="contained"
|
||||
@@ -31,9 +33,9 @@ const ConfirmationModal = ({ title, children, open, setOpen, onConfirm }) => {
|
||||
setOpen(false);
|
||||
onConfirm();
|
||||
}}
|
||||
color="default"
|
||||
color="secondary"
|
||||
>
|
||||
Confirmar
|
||||
{i18n.t("confirmationModal.buttons.confirm")}
|
||||
</Button>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
|
||||
@@ -59,12 +59,16 @@ const TicketOptionsMenu = ({ ticket, menuOpen, handleClose, anchorEl }) => {
|
||||
</MenuItem>
|
||||
</Menu>
|
||||
<ConfirmationModal
|
||||
title={`Deletar o ticket #${ticket.id} do contato ${ticket.contact.name}?`}
|
||||
title={`${i18n.t("ticketOptionsMenu.confirmationModal.title")}${
|
||||
ticket.id
|
||||
} ${i18n.t("ticketOptionsMenu.confirmationModal.titleFrom")} ${
|
||||
ticket.contact.name
|
||||
}?`}
|
||||
open={confirmationOpen}
|
||||
setOpen={setConfirmationOpen}
|
||||
onConfirm={handleDeleteTicket}
|
||||
>
|
||||
Atenção, todas as mensagens relacionadas a este ticket serão apagadas.
|
||||
{i18n.t("ticketOptionsMenu.confirmationModal.message")}
|
||||
</ConfirmationModal>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -116,21 +116,23 @@ const TicketsList = ({ status, searchParam, showAll }) => {
|
||||
<List style={{ paddingTop: 0 }}>
|
||||
{status === "open" && (
|
||||
<div className={classes.ticketsListHeader}>
|
||||
{i18n.t("tickets.tabs.open.assignedHeader")}
|
||||
{i18n.t("ticketsList.assignedHeader")}
|
||||
<span className={classes.ticketsCount}>{tickets.length}</span>
|
||||
</div>
|
||||
)}
|
||||
{status === "pending" && (
|
||||
<div className={classes.ticketsListHeader}>
|
||||
{i18n.t("tickets.tabs.open.pendingHeader")}
|
||||
{i18n.t("ticketsList.pendingHeader")}
|
||||
<span className={classes.ticketsCount}>{tickets.length}</span>
|
||||
</div>
|
||||
)}
|
||||
{tickets.length === 0 && !loading ? (
|
||||
<div className={classes.noTicketsDiv}>
|
||||
<span className={classes.noTicketsTitle}>Nothing here!</span>
|
||||
<span className={classes.noTicketsTitle}>
|
||||
{i18n.t("ticketsList.noTicketsTitle")}
|
||||
</span>
|
||||
<p className={classes.noTicketsText}>
|
||||
No tickets found with this status or search term.
|
||||
{i18n.t("ticketsList.noTicketsMessage")}
|
||||
</p>
|
||||
</div>
|
||||
) : (
|
||||
|
||||
@@ -6,7 +6,7 @@ import { messages } from "./languages";
|
||||
i18n.use(LanguageDetector).init({
|
||||
debug: false,
|
||||
defaultNS: ["translations"],
|
||||
fallbackLng: "pt",
|
||||
fallbackLng: "en",
|
||||
ns: ["translations"],
|
||||
resources: messages,
|
||||
});
|
||||
|
||||
@@ -107,22 +107,9 @@ const messages = {
|
||||
message: "Message from",
|
||||
},
|
||||
tabs: {
|
||||
open: {
|
||||
title: "Inbox",
|
||||
assignedHeader: "Working on",
|
||||
pendingHeader: "Queue",
|
||||
openNoTicketsTitle: "Ready for more?",
|
||||
openNoTicketsMessage:
|
||||
"Accept a ticket from the queue to get started.",
|
||||
pendingNoTicketsTitle: "Everything is resolved!",
|
||||
pendingNoTicketsMessage: "No tickets pending.",
|
||||
},
|
||||
open: { title: "Inbox" },
|
||||
closed: { title: "Resolved" },
|
||||
search: {
|
||||
title: "Search",
|
||||
noTicketsTitle: "Nothing found!",
|
||||
noTicketsMessage: "Try searching for another term.",
|
||||
},
|
||||
search: { title: "Search" },
|
||||
},
|
||||
search: {
|
||||
placeholder: "Search tickets and messages.",
|
||||
@@ -132,6 +119,10 @@ const messages = {
|
||||
},
|
||||
},
|
||||
ticketsList: {
|
||||
pendingHeader: "Queue",
|
||||
assignedHeader: "Working on",
|
||||
noTicketsTitle: "Nothing here!",
|
||||
noTicketsMessage: "No tickets found with this status or search term.",
|
||||
buttons: {
|
||||
accept: "Accept",
|
||||
},
|
||||
@@ -175,6 +166,21 @@ const messages = {
|
||||
ticketOptionsMenu: {
|
||||
delete: "Delete",
|
||||
transfer: "Transfer",
|
||||
confirmationModal: {
|
||||
title: "Delete ticket #",
|
||||
titleFrom: "from contact ",
|
||||
message: "Attention! All ticket's related messages will be lost.",
|
||||
},
|
||||
buttons: {
|
||||
delete: "Delete",
|
||||
cancel: "Cancel",
|
||||
},
|
||||
},
|
||||
confirmationModal: {
|
||||
buttons: {
|
||||
confirm: "Ok",
|
||||
cancel: "Cancel",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
@@ -107,21 +107,9 @@ const messages = {
|
||||
message: "Mensagem de",
|
||||
},
|
||||
tabs: {
|
||||
open: {
|
||||
title: "Inbox",
|
||||
assignedHeader: "Atendendo",
|
||||
pendingHeader: "Aguardando",
|
||||
openNoTicketsTitle: "Pronto pra mais?",
|
||||
openNoTicketsMessage: "Aceite um ticket da fila para começar.",
|
||||
pendingNoTicketsTitle: "Tudo resolvido!",
|
||||
pendingNoTicketsMessage: "Nenhum ticket pendente.",
|
||||
},
|
||||
open: { title: "Inbox" },
|
||||
closed: { title: "Resolvidos" },
|
||||
search: {
|
||||
title: "Busca",
|
||||
noTicketsTitle: "Nada encontrado!",
|
||||
noTicketsMessage: "Tente pesquisar por outro termo.",
|
||||
},
|
||||
search: { title: "Busca" },
|
||||
},
|
||||
search: {
|
||||
placeholder: "Pesquisar tickets e mensagens.",
|
||||
@@ -131,6 +119,11 @@ const messages = {
|
||||
},
|
||||
},
|
||||
ticketsList: {
|
||||
pendingHeader: "Aguardando",
|
||||
assignedHeader: "Atendendo",
|
||||
noTicketsTitle: "Nada aqui!",
|
||||
noTicketsMessage:
|
||||
"Nenhum ticket encontrado com esse status ou termo pesquisado",
|
||||
buttons: {
|
||||
accept: "Aceitar",
|
||||
},
|
||||
@@ -174,6 +167,18 @@ const messages = {
|
||||
ticketOptionsMenu: {
|
||||
delete: "Deletar",
|
||||
transfer: "Transferir",
|
||||
confirmationModal: {
|
||||
title: "Deletar o ticket #",
|
||||
titleFrom: "do contato ",
|
||||
message:
|
||||
"Atenção! Todas as mensagens relacionadas ao ticket serão perdidas.",
|
||||
},
|
||||
},
|
||||
confirmationModal: {
|
||||
buttons: {
|
||||
confirm: "Ok",
|
||||
cancel: "Cancelar",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user