mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-07 08:19:52 +03:00
The translation of the web interface into Polish has been corrected and completed (e.g. the word order has been fixed).
Newly added words should be translated from English into other languages in index.ts files
This commit is contained in:
@@ -332,7 +332,7 @@ const DashboardData: FC = () => {
|
||||
{ accessor: (dv: any) => dv.id.slice(2), name: LL.ENTITY_NAME() },
|
||||
{
|
||||
accessor: (dv: any) => (typeof dv.v === 'number' ? new Intl.NumberFormat().format(dv.v) : dv.v),
|
||||
name: LL.VALUE()
|
||||
name: LL.VALUE(0)
|
||||
},
|
||||
{ accessor: (dv: any) => DeviceValueUOM_s[dv.u], name: 'UoM' }
|
||||
];
|
||||
@@ -559,11 +559,11 @@ const DashboardData: FC = () => {
|
||||
offset: sensor.o
|
||||
});
|
||||
if (response.status === 204) {
|
||||
enqueueSnackbar(LL.TEMP_SENSOR() + ' ' + LL.UPLOAD_TEXT() + ' ' + LL.FAILED(), { variant: 'error' });
|
||||
enqueueSnackbar(LL.UPLOAD_OF( LL.TEMP_SENSOR() ) + ' ' + LL.FAILED(), { variant: 'error' });
|
||||
} else if (response.status === 403) {
|
||||
enqueueSnackbar(LL.ACCESS_DENIED(), { variant: 'error' });
|
||||
} else {
|
||||
enqueueSnackbar(LL.TEMP_SENSOR() + ' ' + LL.UPDATED(), { variant: 'success' });
|
||||
enqueueSnackbar(LL.UPDATED_OF( LL.TEMP_SENSOR() ), { variant: 'success' });
|
||||
}
|
||||
setSensor(undefined);
|
||||
} catch (error) {
|
||||
@@ -802,7 +802,7 @@ const DashboardData: FC = () => {
|
||||
endIcon={getSortIcon(dv_sort.state, 'VALUE')}
|
||||
onClick={() => dv_sort.fns.onToggleSort({ sortKey: 'VALUE' })}
|
||||
>
|
||||
{LL.VALUE()}
|
||||
{LL.VALUE(0)}
|
||||
</Button>
|
||||
</HeaderCell>
|
||||
<HeaderCell stiff />
|
||||
@@ -878,7 +878,7 @@ const DashboardData: FC = () => {
|
||||
endIcon={getSortIcon(sensor_sort.state, 'TEMPERATURE')}
|
||||
onClick={() => sensor_sort.fns.onToggleSort({ sortKey: 'TEMPERATURE' })}
|
||||
>
|
||||
{LL.VALUE()}
|
||||
{LL.VALUE(0)}
|
||||
</Button>
|
||||
</HeaderCell>
|
||||
<HeaderCell stiff />
|
||||
@@ -946,7 +946,7 @@ const DashboardData: FC = () => {
|
||||
{LL.TYPE()}
|
||||
</Button>
|
||||
</HeaderCell>
|
||||
<HeaderCell stiff>{LL.VALUE()}</HeaderCell>
|
||||
<HeaderCell stiff>{LL.VALUE(0)}</HeaderCell>
|
||||
<HeaderCell stiff />
|
||||
</HeaderRow>
|
||||
</Header>
|
||||
@@ -986,11 +986,11 @@ const DashboardData: FC = () => {
|
||||
});
|
||||
|
||||
if (response.status === 204) {
|
||||
enqueueSnackbar(LL.ANALOG_SENSOR() + ' ' + LL.DELETION() + ' ' + LL.FAILED(), { variant: 'error' });
|
||||
enqueueSnackbar(LL.DELETION_OF( LL.ANALOG_SENSOR() ) + ' ' + LL.FAILED(), { variant: 'error' });
|
||||
} else if (response.status === 403) {
|
||||
enqueueSnackbar(LL.ACCESS_DENIED(), { variant: 'error' });
|
||||
} else {
|
||||
enqueueSnackbar(LL.ANALOG_SENSOR() + ' ' + LL.REMOVED(), { variant: 'success' });
|
||||
enqueueSnackbar( LL.REMOVED_OF( LL.ANALOG_SENSOR() ), { variant: 'success' });
|
||||
}
|
||||
} catch (error) {
|
||||
enqueueSnackbar(extractErrorMessage(error, LL.PROBLEM_UPDATING()), { variant: 'error' });
|
||||
@@ -1014,11 +1014,11 @@ const DashboardData: FC = () => {
|
||||
});
|
||||
|
||||
if (response.status === 204) {
|
||||
enqueueSnackbar(LL.ANALOG_SENSOR() + ' ' + LL.UPDATE() + ' ' + LL.FAILED(), { variant: 'error' });
|
||||
enqueueSnackbar(LL.UPDATE_OF( LL.ANALOG_SENSOR() ) + ' ' + LL.FAILED(), { variant: 'error' });
|
||||
} else if (response.status === 403) {
|
||||
enqueueSnackbar(LL.ACCESS_DENIED(), { variant: 'error' });
|
||||
} else {
|
||||
enqueueSnackbar(LL.ANALOG_SENSOR() + ' ' + LL.UPDATED(), { variant: 'success' });
|
||||
enqueueSnackbar(LL.UPDATED_OF( LL.ANALOG_SENSOR() ), { variant: 'success' });
|
||||
}
|
||||
} catch (error) {
|
||||
enqueueSnackbar(extractErrorMessage(error, LL.PROBLEM_UPDATING()), { variant: 'error' });
|
||||
@@ -1077,7 +1077,7 @@ const DashboardData: FC = () => {
|
||||
{analog.t >= AnalogType.COUNTER && analog.t <= AnalogType.RATE && (
|
||||
<>
|
||||
<Grid item>
|
||||
<ValidatedTextField name="u" label="UoM" value={analog.u} select onChange={updateValue(setAnalog)}>
|
||||
<ValidatedTextField name="u" label={LL.UNIT()} value={analog.u} select onChange={updateValue(setAnalog)}>
|
||||
{DeviceValueUOM_s.map((val, i) => (
|
||||
<MenuItem key={i} value={i}>
|
||||
{val}
|
||||
@@ -1135,7 +1135,7 @@ const DashboardData: FC = () => {
|
||||
<Grid item>
|
||||
<ValidatedTextField
|
||||
name="o"
|
||||
label={LL.VALUE()}
|
||||
label={LL.VALUE(0)}
|
||||
value={numberValue(analog.o)}
|
||||
sx={{ width: '20ch' }}
|
||||
type="number"
|
||||
@@ -1151,7 +1151,7 @@ const DashboardData: FC = () => {
|
||||
<Grid item>
|
||||
<ValidatedTextField
|
||||
name="o"
|
||||
label={LL.VALUE()}
|
||||
label={LL.VALUE(0)}
|
||||
value={numberValue(analog.o)}
|
||||
sx={{ width: '20ch' }}
|
||||
type="number"
|
||||
@@ -1182,7 +1182,7 @@ const DashboardData: FC = () => {
|
||||
<Grid item>
|
||||
<ValidatedTextField
|
||||
name="o"
|
||||
label="Duty Cycle"
|
||||
label={LL.DUTY_CYCLE()}
|
||||
value={numberValue(analog.o)}
|
||||
sx={{ width: '20ch' }}
|
||||
type="number"
|
||||
|
||||
@@ -88,7 +88,7 @@ const DashboardStatus: FC = () => {
|
||||
const busStatus = ({ status }: Status) => {
|
||||
switch (status) {
|
||||
case busConnectionStatus.BUS_STATUS_CONNECTED:
|
||||
return LL.CONNECTED();
|
||||
return LL.CONNECTED(0);
|
||||
case busConnectionStatus.BUS_STATUS_TX_ERRORS:
|
||||
return LL.TX_ISSUES();
|
||||
case busConnectionStatus.BUS_STATUS_OFFLINE:
|
||||
@@ -158,7 +158,7 @@ const DashboardStatus: FC = () => {
|
||||
|
||||
const formatDurationSec = (duration_sec: number) => {
|
||||
const { days, hours, minutes, seconds } = parseMilliseconds(duration_sec * 1000);
|
||||
let formatted = ' ';
|
||||
let formatted = '';
|
||||
if (days) {
|
||||
formatted += LL.NUM_DAYS({ num: days }) + ' ';
|
||||
}
|
||||
@@ -201,7 +201,7 @@ const DashboardStatus: FC = () => {
|
||||
<DirectionsBusIcon />
|
||||
</Avatar>
|
||||
</ListItemAvatar>
|
||||
<ListItemText primary={LL.EMS_BUS_STATUS()} secondary={busStatus(data) + formatDurationSec(data.uptime)} />
|
||||
<ListItemText primary={LL.EMS_BUS_STATUS()} secondary={busStatus(data) + ' (' + formatDurationSec(data.uptime) + ')'} />
|
||||
</ListItem>
|
||||
<ListItem>
|
||||
<ListItemAvatar>
|
||||
|
||||
@@ -13,12 +13,12 @@ const Help: FC = () => {
|
||||
const { LL } = useI18nContext();
|
||||
const { routerTab } = useRouterTab();
|
||||
|
||||
useLayoutTitle(LL.HELP());
|
||||
useLayoutTitle(LL.HELP_OF(""));
|
||||
|
||||
return (
|
||||
<>
|
||||
<RouterTabs value={routerTab}>
|
||||
<Tab value="information" label={'EMS-ESP ' + LL.HELP()} />
|
||||
<Tab value="information" label={LL.HELP_OF("EMS-ESP")} />
|
||||
</RouterTabs>
|
||||
<Routes>
|
||||
<Route path="information" element={<HelpInformation />} />
|
||||
|
||||
@@ -22,11 +22,11 @@ const ProjectMenu: FC = () => {
|
||||
<LayoutMenuItem icon={DashboardIcon} label={LL.DASHBOARD()} to={`/${PROJECT_PATH}/dashboard`} />
|
||||
<LayoutMenuItem
|
||||
icon={TuneIcon}
|
||||
label={LL.SETTINGS()}
|
||||
label={LL.SETTINGS_OF("")}
|
||||
to={`/${PROJECT_PATH}/settings`}
|
||||
disabled={!authenticatedContext.me.admin}
|
||||
/>
|
||||
<LayoutMenuItem icon={InfoIcon} label={LL.HELP()} to={`/${PROJECT_PATH}/help`} />
|
||||
<LayoutMenuItem icon={InfoIcon} label={LL.HELP_OF("")} to={`/${PROJECT_PATH}/help`} />
|
||||
</List>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -14,7 +14,7 @@ const Settings: FC = () => {
|
||||
const { LL } = useI18nContext();
|
||||
const { routerTab } = useRouterTab();
|
||||
|
||||
useLayoutTitle(LL.SETTINGS());
|
||||
useLayoutTitle(LL.SETTINGS_OF(""));
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -115,7 +115,7 @@ const SettingsApplication: FC = () => {
|
||||
return (
|
||||
<>
|
||||
<Typography sx={{ pt: 2 }} variant="h6" color="primary">
|
||||
Interface {LL.BOARD_PROFILE()}
|
||||
{LL.INTERFACE_BOARD_PROFILE()}
|
||||
</Typography>
|
||||
<Box color="warning.main">
|
||||
<Typography variant="body2">{LL.BOARD_PROFILE_TEXT()}</Typography>
|
||||
@@ -213,7 +213,7 @@ const SettingsApplication: FC = () => {
|
||||
<Grid item xs={4}>
|
||||
<ValidatedTextField
|
||||
name="phy_type"
|
||||
label="Eth PHY Type"
|
||||
label={LL.PHY_TYPE()}
|
||||
disabled={saving}
|
||||
value={data.phy_type}
|
||||
fullWidth
|
||||
@@ -245,7 +245,7 @@ const SettingsApplication: FC = () => {
|
||||
<Grid item>
|
||||
<ValidatedTextField
|
||||
name="eth_phy_addr"
|
||||
label="Eth I²C-address"
|
||||
label="Eth I²C Address"
|
||||
fullWidth
|
||||
variant="outlined"
|
||||
value={numberValue(data.eth_phy_addr)}
|
||||
@@ -258,7 +258,7 @@ const SettingsApplication: FC = () => {
|
||||
<Grid item>
|
||||
<ValidatedTextField
|
||||
name="eth_clock_mode"
|
||||
label="Eth Clock Mode"
|
||||
label="Eth Clk Mode"
|
||||
disabled={saving}
|
||||
value={data.eth_clock_mode}
|
||||
fullWidth
|
||||
@@ -278,13 +278,13 @@ const SettingsApplication: FC = () => {
|
||||
</>
|
||||
)}
|
||||
<Typography variant="h6" color="primary">
|
||||
EMS Bus {LL.SETTINGS()}
|
||||
{LL.SETTINGS_OF("EMS BUS")}
|
||||
</Typography>
|
||||
<Grid container spacing={1} direction="row" justifyContent="flex-start" alignItems="flex-start">
|
||||
<Grid item xs={6}>
|
||||
<ValidatedTextField
|
||||
name="tx_mode"
|
||||
label="Tx Mode"
|
||||
label={LL.TX_MODE()}
|
||||
disabled={saving}
|
||||
value={data.tx_mode}
|
||||
fullWidth
|
||||
@@ -483,7 +483,7 @@ const SettingsApplication: FC = () => {
|
||||
margin="normal"
|
||||
select
|
||||
>
|
||||
<MenuItem value={1}>{LL.VALUE()}</MenuItem>
|
||||
<MenuItem value={1}>{LL.VALUE(1)}</MenuItem>
|
||||
<MenuItem value={2}>{LL.INDEX()}</MenuItem>
|
||||
</ValidatedTextField>
|
||||
</Grid>
|
||||
@@ -551,7 +551,7 @@ const SettingsApplication: FC = () => {
|
||||
<Grid item xs={4}>
|
||||
<ValidatedTextField
|
||||
name="syslog_level"
|
||||
label="Log Level"
|
||||
label={LL.LOG_LEVEL()}
|
||||
value={data.syslog_level}
|
||||
fullWidth
|
||||
variant="outlined"
|
||||
|
||||
@@ -296,7 +296,7 @@ const SettingsCustomization: FC = () => {
|
||||
</Box>
|
||||
<ValidatedTextField
|
||||
name="device"
|
||||
label={'EMS ' + LL.DEVICE()}
|
||||
label={LL.EMS_DEVICE()}
|
||||
variant="outlined"
|
||||
fullWidth
|
||||
value={selectedDevice}
|
||||
@@ -449,7 +449,7 @@ const SettingsCustomization: FC = () => {
|
||||
{LL.NAME()}
|
||||
</Button>
|
||||
</HeaderCell>
|
||||
<HeaderCell resize>{LL.VALUE()}</HeaderCell>
|
||||
<HeaderCell resize>{LL.VALUE(0)}</HeaderCell>
|
||||
</HeaderRow>
|
||||
</Header>
|
||||
<Body>
|
||||
@@ -513,7 +513,7 @@ const SettingsCustomization: FC = () => {
|
||||
|
||||
const renderResetDialog = () => (
|
||||
<Dialog open={confirmReset} onClose={() => setConfirmReset(false)}>
|
||||
<DialogTitle>{LL.RESET()}</DialogTitle>
|
||||
<DialogTitle>{LL.RESET(1)}</DialogTitle>
|
||||
<DialogContent dividers>{LL.CUSTOMIZATIONS_RESET()}</DialogContent>
|
||||
<DialogActions>
|
||||
<Button startIcon={<CancelIcon />} variant="outlined" onClick={() => setConfirmReset(false)} color="secondary">
|
||||
@@ -526,7 +526,7 @@ const SettingsCustomization: FC = () => {
|
||||
autoFocus
|
||||
color="error"
|
||||
>
|
||||
{LL.RESET()}
|
||||
{LL.RESET(0)}
|
||||
</Button>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
@@ -555,7 +555,7 @@ const SettingsCustomization: FC = () => {
|
||||
color="error"
|
||||
onClick={() => setConfirmReset(true)}
|
||||
>
|
||||
{LL.RESET()}
|
||||
{LL.RESET(0)}
|
||||
</Button>
|
||||
</ButtonRow>
|
||||
</Box>
|
||||
|
||||
Reference in New Issue
Block a user