added Swedish/SE - Multi-language/I18n support #22

This commit is contained in:
Proddy
2022-09-09 21:09:51 +02:00
parent 5845c37672
commit 4cd655fb36
16 changed files with 347 additions and 63 deletions

View File

@@ -580,11 +580,11 @@ const DashboardData: FC = () => {
return (
<Dialog open={sensor !== undefined} onClose={() => setSensor(undefined)}>
<DialogTitle>
{LL.EDIT()} {LL.TEMP_SENSORS()}
{LL.EDIT()} {LL.TEMP_SENSOR()}
</DialogTitle>
<DialogContent dividers>
<Box color="warning.main" p={0} pl={0} pr={0} mt={0} mb={2}>
<Typography variant="body2">Sensor ID {sensor.id}</Typography>
<Typography variant="body2">Sensor ID: {sensor.id}</Typography>
</Box>
<Grid container spacing={1}>
<Grid item>
@@ -1034,7 +1034,7 @@ const DashboardData: FC = () => {
return (
<Dialog open={analog !== undefined} onClose={() => setAnalog(undefined)}>
<DialogTitle>
{LL.EDIT()} {LL.ANALOG_SENSORS()}
{LL.EDIT()} {LL.ANALOG_SENSOR()}
</DialogTitle>
<DialogContent dividers>
<Grid container spacing={2}>

View File

@@ -338,9 +338,10 @@ const SettingsApplication: FC = () => {
size="small"
select
>
<MenuItem value="en">English (en)</MenuItem>
<MenuItem value="de">Deutsch (de)</MenuItem>
<MenuItem value="nl">Nederlands (nl)</MenuItem>
<MenuItem value="en">English (EN)</MenuItem>
<MenuItem value="de">Deutsch (DE)</MenuItem>
<MenuItem value="nl">Nederlands (NL)</MenuItem>
<MenuItem value="se">Svenska (SE)</MenuItem>
</ValidatedTextField>
</Box>
{data.led_gpio !== 0 && (

View File

@@ -284,7 +284,7 @@ const SettingsCustomization: FC = () => {
return (
<>
<Box mb={2} color="warning.main">
<Typography variant="body2">{LL.CUSTOMIZATIONS_HELP_1()}:</Typography>
<Typography variant="body2">{LL.CUSTOMIZATIONS_HELP_1()}</Typography>
<Typography variant="body2">
<OptionIcon type="favorite" isSet={true} />={LL.CUSTOMIZATIONS_HELP_2()}&nbsp;&nbsp;
<OptionIcon type="readonly" isSet={true} />={LL.CUSTOMIZATIONS_HELP_3()}&nbsp;&nbsp;
@@ -558,10 +558,10 @@ const SettingsCustomization: FC = () => {
);
};
const renderEditEntity = () => (
<Dialog open={!!deviceEntity} onClose={() => setDeviceEntity(undefined)}>
{deviceEntity && (
<>
const renderEditEntity = () => {
if (deviceEntity) {
return (
<Dialog open={!!deviceEntity} onClose={() => setDeviceEntity(undefined)}>
<DialogTitle>{LL.RENAME() + ' ' + LL.ENTITY_NAME()}</DialogTitle>
<DialogContent dividers>
<Box color="warning.main" p={0} pl={0} pr={0} mt={0} mb={2}>
@@ -599,10 +599,10 @@ const SettingsCustomization: FC = () => {
{LL.SAVE()}
</Button>
</DialogActions>
</>
)}
</Dialog>
);
</Dialog>
);
}
};
return (
<SectionContent title={LL.USER_CUSTOMIZATION()} titleGutter>