{config.HTTPConfig.TLSCert}
@@ -846,7 +841,7 @@ const ConfigManagement = () => {
diff --git a/client/src/pages/config/users/containerPicker.jsx b/client/src/pages/config/users/containerPicker.jsx
index d052bddc..432b5c13 100644
--- a/client/src/pages/config/users/containerPicker.jsx
+++ b/client/src/pages/config/users/containerPicker.jsx
@@ -28,12 +28,14 @@ import AnimateButton from '../../../components/@extended/AnimateButton';
import RestartModal from './restart';
import Autocomplete from '@mui/material/Autocomplete';
import CircularProgress from '@mui/material/CircularProgress';
+import { useTranslation } from 'react-i18next';
import defaultport from '../../servapps/defaultport.json';
import * as API from '../../../api';
export function CosmosContainerPicker({formik, nameOnly, lockTarget, TargetContainer, onTargetChange, label = "Container Name", name = "Target"}) {
+ const { t } = useTranslation();
const [open, setOpen] = React.useState(false);
const [containers, setContainers] = React.useState([]);
const [hasPublicPorts, setHasPublicPorts] = React.useState(false);
@@ -177,7 +179,7 @@ export function CosmosContainerPicker({formik, nameOnly, lockTarget, TargetConta
return (
- {label}
+ {t('mgmt.config.containerPicker.containerPortInput')}
{!loading && (
}
{!nameOnly && <>
- Container Port
+ {t('mgmt.config.containerPicker.containerPortInput')}
}
/>
{targetResult.port == '' && targetResult.port == 0 &&
- Please select a port
+ {t('mgmt.config.containerPicker.containerPortSelection.containerPortValidation')}
}
- Container Protocol (use HTTP if unsure, or tcp for non-http proxying)
+ {t('mgmt.config.containerPicker.containerProtocolInput')}
- Result Target Preview
+ {t('mgmt.config.containerPicker.targetTypePreview')}
{
+ const { t } = useTranslation();
const [level, setLevel] = React.useState();
const [showPassword, setShowPassword] = React.useState(false);
const handleClickShowPassword = () => {
@@ -88,7 +90,7 @@ export const CosmosInputPassword = ({ name, noStrength, type, placeholder, autoC
const changePassword = (value) => {
const temp = strengthIndicator(value);
- setLevel(strengthColor(temp));
+ setLevel(strengthColor(temp, t));
};
React.useEffect(() => {
diff --git a/client/src/pages/config/users/proxyman.jsx b/client/src/pages/config/users/proxyman.jsx
index 51f190ed..5934c796 100644
--- a/client/src/pages/config/users/proxyman.jsx
+++ b/client/src/pages/config/users/proxyman.jsx
@@ -40,6 +40,7 @@ import NewRouteCreate from '../routes/newRoute';
import LazyLoad from 'react-lazyload';
import MiniPlotComponent from '../../dashboard/components/mini-plot';
import ImageWithPlaceholder from '../../../components/imageWithPlaceholder';
+import { useTranslation } from 'react-i18next';
const stickyButton = {
position: 'fixed',
@@ -57,6 +58,7 @@ function shorten(test) {
}
const ProxyManagement = () => {
+ const { t } = useTranslation();
const theme = useTheme();
const isDark = theme.palette.mode === 'dark';
const [config, setConfig] = React.useState(null);
@@ -143,7 +145,7 @@ const ProxyManagement = () => {
// if exist, increment the copy number
do {
- suffix += ' - Copy';
+ suffix += ' - '+t('global.copyFilenameSuffix');
} while (routes.filter((r) => r.Name === newRoute.Name + suffix).length > 0);
newRoute.Name = newRoute.Name + suffix;
@@ -164,10 +166,10 @@ const ProxyManagement = () => {
} onClick={() => {
refresh();
- }}>Refresh
+ }}>{t('global.refresh')}
} onClick={() => {
setOpenNewModal(true);
- }}>Create
+ }}>{t('global.createAction')}
{config && <>
@@ -189,14 +191,14 @@ const ProxyManagement = () => {
},
},
{
- title: 'Enabled',
+ title: t('global.enabled'),
clickable:true,
field: (r, k) => ,
},
- { title: 'URL',
+ { title: t('mgmt.config.proxy.urlTitle'),
search: (r) => r.Name + ' ' + r.Description,
style: {
textDecoration: 'inherit',
@@ -207,7 +209,7 @@ const ProxyManagement = () => {
{r.Description}
>
},
- { title: 'Network', screenMin: 'lg', clickable:false, field: (r) =>
+ { title: t('global.network'), screenMin: 'lg', clickable:false, field: (r) =>
{
]} noLabels noBackground/>
},
- { title: 'Origin', screenMin: 'md', clickable:true, search: (r) => r.Host + ' ' + r.PathPrefix, field: (r) => },
- { title: 'Target', screenMin: 'md', search: (r) => r.Target, field: (r) => <> > },
- { title: 'Security', screenMin: 'lg', field: (r) => ,
+ { title: t('mgmt.config.proxy.originTitle'), screenMin: 'md', clickable:true, search: (r) => r.Host + ' ' + r.PathPrefix, field: (r) => },
+ { title: t('global.target'), screenMin: 'md', search: (r) => r.Target, field: (r) => <> > },
+ { title: t('global.securityTitle'), screenMin: 'lg', field: (r) => ,
style: {minWidth: '70px'} },
{ title: '', clickable:true, field: (r, k) => {
variant="contained"
color="primary"
>
- Save Changes
+ {t('mgmt.config.proxy.saveChangesButton')}
@@ -285,7 +287,7 @@ const ProxyManagement = () => {
}
{!routes && <>
- No routes configured.
+ {t('mgmt.config.proxy.noRoutesConfiguredText')}
>
}
diff --git a/client/src/pages/config/users/restart.jsx b/client/src/pages/config/users/restart.jsx
index 40d8e173..90299775 100644
--- a/client/src/pages/config/users/restart.jsx
+++ b/client/src/pages/config/users/restart.jsx
@@ -22,6 +22,7 @@ import * as API from '../../../api';
import MainCard from '../../../components/MainCard';
import { useEffect, useState } from 'react';
import { isDomain } from '../../../utils/indexs';
+import { useTranslation } from 'react-i18next';
function checkIsOnline() {
API.isOnline().then((res) => {
@@ -34,6 +35,7 @@ function checkIsOnline() {
}
const RestartModal = ({openModal, setOpenModal, config, newRoute }) => {
+ const { t } = useTranslation();
const [isRestarting, setIsRestarting] = useState(false);
const [warn, setWarn] = useState(false);
const needsRefresh = config && (config.HTTPConfig.HTTPSCertificateMode == "SELFSIGNED" ||
@@ -45,54 +47,54 @@ const RestartModal = ({openModal, setOpenModal, config, newRoute }) => {
return config ? (<>
{needsRefresh && <>
>}
{newRouteWarning && <>
>}
>)
:(<>
>);
diff --git a/client/src/pages/config/users/usermanagement.jsx b/client/src/pages/config/users/usermanagement.jsx
index 80f48d34..3a04bceb 100644
--- a/client/src/pages/config/users/usermanagement.jsx
+++ b/client/src/pages/config/users/usermanagement.jsx
@@ -22,8 +22,10 @@ import * as API from '../../../api';
import MainCard from '../../../components/MainCard';
import { useEffect, useState } from 'react';
import PrettyTableView from '../../../components/tableView/prettyTableView';
+import { Trans, useTranslation } from 'react-i18next';
const UserManagement = () => {
+ const { t } = useTranslation();
const [isLoading, setIsLoading] = useState(false);
const [openCreateForm, setOpenCreateForm] = React.useState(false);
const [openDeleteForm, setOpenDeleteForm] = React.useState(false);
@@ -64,7 +66,7 @@ const UserManagement = () => {
return <>
{openInviteForm ? : ''}
} onClick={() => {
refresh();
- }}>Refresh
+ }}>{t('global.refresh')}
} onClick={() => {
setOpenCreateForm(true)
- }}>Create
+ }}>{t('global.createAction')}
{isLoading &&
}
@@ -208,7 +210,7 @@ const UserManagement = () => {
getKey={(r) => r.nickname}
columns={[
{
- title: 'User',
+ title: t('global.user'),
// underline: true,
field: (r) => {r.nickname},
},
@@ -221,18 +223,18 @@ const UserManagement = () => {
return <>{isRegistered ? (r.role > 1 ? }
- label="Admin"
+ label={t('mgmt.usermgmt.adminLabel')}
/> : }
- label="User"
+ label={t('global.user')}
/>) : (
inviteExpired ? }
- label="Invite Expired"
+ label={t('mgmt.usermgmt.inviteExpiredLabel')}
color="error"
/> : }
- label="Invite Pending"
+ label={t('mgmt.usermgmt.invitePendingLabel')}
color="warning"
/>
)}>
@@ -244,16 +246,16 @@ const UserManagement = () => {
field: (r) => r.email,
},
{
- title: 'Created At',
+ title: t('global.createdAt'),
screenMin: 'lg',
field: (r) => new Date(r.createdAt).toLocaleString(),
},
{
- title: 'Last Login',
+ title: t('mgmt.usermgmt.lastLogin'),
screenMin: 'lg',
field: (r) => {
const hasLastLogin = new Date(r.lastLogin).getTime() > 0;
- return <>{hasLastLogin ? new Date(r.lastLogin).toLocaleString() : 'Never'}>
+ return <>{hasLastLogin ? new Date(r.lastLogin).toLocaleString() : t('global.never')}>
},
},
{
@@ -273,13 +275,13 @@ const UserManagement = () => {
setLoadingRow(r.nickname);
sendlink(r.nickname, 1);
}
- }>Send password reset) :
+ }>{t('mgmt.usermgmt.sendPasswordResetButton')}) :
()
+ } color="primary">{t('newInstall.usermgmt.inviteUser.resendInviteButton')})
}
+ }>{t('global.delete')}
>
+ }>{t('mgmt.usermgmt.reset2faButton')}>
}
},
]}
diff --git a/client/src/pages/constellation/addDevice.jsx b/client/src/pages/constellation/addDevice.jsx
index 7ee3c5f1..666cb602 100644
--- a/client/src/pages/constellation/addDevice.jsx
+++ b/client/src/pages/constellation/addDevice.jsx
@@ -16,6 +16,7 @@ import { CosmosCheckbox, CosmosFormDivider, CosmosInputText, CosmosSelect } from
import { DownloadFile } from '../../api/downloadButton';
import QRCode from 'qrcode';
import { useClientInfos } from '../../utils/hooks';
+import { useTranslation } from 'react-i18next';
const getDocker = (data, isCompose) => {
let lighthouses = '';
@@ -75,6 +76,7 @@ docker run -d \\
const AddDeviceModal = ({ users, config, refreshConfig, devices }) => {
+ const { t } = useTranslation();
const [openModal, setOpenModal] = useState(false);
const [isDone, setIsDone] = useState(null);
const canvasRef = React.useRef(null);
@@ -146,15 +148,12 @@ const AddDeviceModal = ({ users, config, refreshConfig, devices }) => {
>
{(formik) => (