mirror of
https://github.com/dec0dOS/zero-ui.git
synced 2025-07-07 05:21:40 -07:00
feat: i18n
This commit is contained in:
parent
d65e6fb71a
commit
61fd0e7186
24 changed files with 416 additions and 79 deletions
|
@ -18,6 +18,8 @@ import DeleteIcon from "@material-ui/icons/Delete";
|
|||
|
||||
import API from "utils/API";
|
||||
|
||||
import { useTranslation } from "react-i18next";
|
||||
|
||||
function NetworkManagement() {
|
||||
const { nwid } = useParams();
|
||||
const history = useHistory();
|
||||
|
@ -42,10 +44,12 @@ function NetworkManagement() {
|
|||
history.go(0);
|
||||
};
|
||||
|
||||
const { t, i18n } = useTranslation();
|
||||
|
||||
return (
|
||||
<Accordion>
|
||||
<AccordionSummary expandIcon={<ExpandMoreIcon />}>
|
||||
<Typography>Management</Typography>
|
||||
<Typography>{t("management")}</Typography>
|
||||
</AccordionSummary>
|
||||
<AccordionDetails>
|
||||
<Button
|
||||
|
@ -54,21 +58,19 @@ function NetworkManagement() {
|
|||
startIcon={<DeleteIcon />}
|
||||
onClick={handleClickOpen}
|
||||
>
|
||||
Delete Network
|
||||
{t("deleteNetwork")}
|
||||
</Button>
|
||||
<Dialog open={open} onClose={handleClose}>
|
||||
<DialogTitle>
|
||||
{"Are you sure you want to delete this network?"}
|
||||
</DialogTitle>
|
||||
<DialogTitle>{t("deleteNetworkConfirm")}</DialogTitle>
|
||||
<DialogContent>
|
||||
<DialogContentText>This action cannot be undone.</DialogContentText>
|
||||
<DialogContentText>{t("deleteAlert")}</DialogContentText>
|
||||
</DialogContent>
|
||||
<DialogActions>
|
||||
<Button onClick={handleClose} color="primary">
|
||||
Cancel
|
||||
{t("cancel")}
|
||||
</Button>
|
||||
<Button onClick={deleteNetwork} color="secondary">
|
||||
Delete
|
||||
{t("delete")}
|
||||
</Button>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue