Skip to content

Commit

Permalink
Merge pull request emsesp#2203 from proddy/dev
Browse files Browse the repository at this point in the history
use translations for version types
  • Loading branch information
proddy authored Nov 14, 2024
2 parents fdc3b19 + fa4dcdc commit a33d116
Show file tree
Hide file tree
Showing 15 changed files with 47 additions and 57 deletions.
61 changes: 30 additions & 31 deletions interface/src/app/main/Help.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -78,39 +78,38 @@ const Help = () => {

return (
<SectionContent>
<Stack
padding={1}
mb={2}
direction="row"
divider={<Divider orientation="vertical" flexItem />}
sx={{
borderRadius: 3,
border: '2px solid grey',
justifyContent: 'space-evenly',
alignItems: 'center'
}}
>
<Typography variant="subtitle1">
{customSupportHTML ? (
<div dangerouslySetInnerHTML={{ __html: customSupportHTML }} />
) : (
LL.HELP_INFORMATION_5()
)}
</Typography>
<Box
component="img"
referrerPolicy="no-referrer"
{customSupportHTML && (
<Stack
padding={1}
mb={2}
direction="row"
divider={<Divider orientation="vertical" flexItem />}
sx={{
maxHeight: { xs: 100, md: 250 }
borderRadius: 3,
border: '2px solid grey',
justifyContent: 'space-evenly',
alignItems: 'center'
}}
onError={() => setNotFound(true)}
src={
notFound
? ''
: customSupportIMG || 'https://emsesp.org/_media/images/installer.jpeg'
}
/>
</Stack>
>
<Typography variant="subtitle1">
<div dangerouslySetInnerHTML={{ __html: customSupportHTML }} />
</Typography>
<Box
component="img"
referrerPolicy="no-referrer"
sx={{
maxHeight: { xs: 100, md: 250 }
}}
onError={() => setNotFound(true)}
src={
notFound
? ''
: customSupportIMG ||
'https://emsesp.org/_media/images/installer.jpeg'
}
/>
</Stack>
)}

{me.admin && (
<List sx={{ borderRadius: 3, border: '2px solid grey' }}>
Expand Down
6 changes: 3 additions & 3 deletions interface/src/app/settings/Version.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ const Version = () => {
Firmware Version
</Typography>

<Grid container spacing={11}>
<Grid container spacing={4}>
<Grid mb={1}>
<Typography mb={1} color="secondary">
{LL.VERSION()}
Expand Down Expand Up @@ -243,10 +243,10 @@ const Version = () => {
<Grid container spacing={4}>
<Grid mb={1}>
<Typography mb={1} color="secondary">
Stable Release
{LL.STABLE()}
</Typography>
<Typography mb={1} color="secondary">
Development Release
{LL.DEVELOPMENT()}
</Typography>
</Grid>
<Grid mb={1}>
Expand Down
1 change: 0 additions & 1 deletion interface/src/i18n/cz/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ const cz: Translation = {
HELP_INFORMATION_2: 'Pro živý chat s komunitou se připojte k našemu serveru Discord',
HELP_INFORMATION_3: 'Požádejte o funkci nebo nahlášte chybu',
HELP_INFORMATION_4: 'Stáhněte a připojte informace podpoře pro rychlejší odezvu při hlášení problému',
HELP_INFORMATION_5: 'Pro pomoc a dotazy kontaktujte svého instalatéra',
UPLOAD: 'Nahrát',
DOWNLOAD: '{{S|s|s}}táhnout',
INSTALL: 'Instalovat {0}',
Expand Down
1 change: 0 additions & 1 deletion interface/src/i18n/de/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ const de: Translation = {
HELP_INFORMATION_2: 'Für einen Live-Community-Chat besuchen Sie unseren Discord-Server',
HELP_INFORMATION_3: 'Um neue Funktionen anzufragen oder Fehler zu melden, eröffnen Sie ein Issue auf GitHub',
HELP_INFORMATION_4: 'Bitte laden Sie die Systemdetails und hängen Sie sie an das Support-Issue an',
HELP_INFORMATION_5: 'Für Hilfe und Fragen wenden Sie sich bitte an Ihren Installateur',
UPLOAD: 'Hochladen',
DOWNLOAD: '{{H|h|h}}erunterladen',
INSTALL: 'Installieren {0}',
Expand Down
1 change: 0 additions & 1 deletion interface/src/i18n/en/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ const en: Translation = {
HELP_INFORMATION_2: 'For live community chat join our Discord server',
HELP_INFORMATION_3: 'To request a feature or report a bug',
HELP_INFORMATION_4: 'Download and attach your support information for a faster response when reporting an issue',
HELP_INFORMATION_5: 'For help and questions please contact your installer',
UPLOAD: 'Upload',
DOWNLOAD: '{{D|d|d}}ownload',
INSTALL: 'Install {0}',
Expand Down
1 change: 0 additions & 1 deletion interface/src/i18n/fr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ const fr: Translation = {
HELP_INFORMATION_2: 'Pour une discussion en direct avec la communauté, rejoignez notre serveur Discord',
HELP_INFORMATION_3: 'Pour demander une fonctionnalité ou signaler un problème',
HELP_INFORMATION_4: "N'oubliez pas de télécharger et de joindre les informations relatives à votre système pour obtenir une réponse plus rapide lorsque vous signalez un problème",
HELP_INFORMATION_5: 'For help and questions please contact your installer', // TODO translate
UPLOAD: 'Upload',
DOWNLOAD: '{{D|d|d}}ownload',
INSTALL: 'Installer {0}',
Expand Down
1 change: 0 additions & 1 deletion interface/src/i18n/it/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ const it: Translation = {
HELP_INFORMATION_2: 'Per la chat della community dal vivo unisciti al nostro server Discord',
HELP_INFORMATION_3: 'Per richiedere una funzionalità o segnalare un errore',
HELP_INFORMATION_4: 'Ricordati di scaricare e allegare le informazioni del tuo sistema per una risposta più rapida quando segnali un problema',
HELP_INFORMATION_5: 'For help and questions please contact your installer', // TODO translate
UPLOAD: 'Carica',
DOWNLOAD: 'Scarica',
INSTALL: 'Installare {0}',
Expand Down
1 change: 0 additions & 1 deletion interface/src/i18n/nl/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ const nl: Translation = {
HELP_INFORMATION_2: 'Voor de live community ga naar de Discord server',
HELP_INFORMATION_3: 'Om een nieuwe feature te vragen of een bug te rapporteren',
HELP_INFORMATION_4: 'Zorg dat je ook je systeem details zijn toevoeged voor een sneller antwoord',
HELP_INFORMATION_5: 'For help and questions please contact your installer', // TODO translate
UPLOAD: 'Upload',
DOWNLOAD: '{{D|d|d}}ownload',
INSTALL: 'Installeren {0}',
Expand Down
1 change: 0 additions & 1 deletion interface/src/i18n/no/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ const no: Translation = {
HELP_INFORMATION_2: 'For community-support besøk vår Discord-server',
HELP_INFORMATION_3: 'For å be om en ny funksjon eller melde feil',
HELP_INFORMATION_4: 'Husk å laste ned og legg ved din systeminformasjon for en raskere respons når du rapporterer et problem',
HELP_INFORMATION_5: 'For help and questions please contact your installer', // TODO translate
UPLOAD: 'Opplasning',
DOWNLOAD: '{{N|n|n}}edlasting',
INSTALL: 'Installer {0}',
Expand Down
1 change: 0 additions & 1 deletion interface/src/i18n/pl/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ const pl: BaseTranslation = {
HELP_INFORMATION_2: 'Dołącz do naszego serwera Discord by komunikować się na żywo ze społecznością',
HELP_INFORMATION_3: 'Zaproponuj nową funkcjonalność lub zgłoś problem',
HELP_INFORMATION_4: 'Zgłaszając problem, nie zapomnij pobrać i dołączyć informacji o swoim systemie!',
HELP_INFORMATION_5: 'For help and questions please contact your installer', // TODO translate
UPLOAD: 'Wysyłanie',
DOWNLOAD: '{{P|p||P}}obier{{anie|z||z}}',
INSTALL: 'Zainstalować {0}',
Expand Down
1 change: 0 additions & 1 deletion interface/src/i18n/sk/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ const sk: Translation = {
HELP_INFORMATION_2: 'Pre živý komunitný chat sa pripojte na náš Discord server',
HELP_INFORMATION_3: 'Ak chcete požiadať o funkciu alebo nahlásiť chybu',
HELP_INFORMATION_4: 'nezabudnite si stiahnuť a pripojiť informácie o vašom systéme, aby ste mohli rýchlejšie reagovať pri nahlasovaní problému',
HELP_INFORMATION_5: 'Pre pomoc a otázky, kontaktujte svojho inštalatéra',
UPLOAD: 'Nahrať',
DOWNLOAD: '{{S|s|s}}tiahnuť',
INSTALL: 'Inštalovať {0}',
Expand Down
1 change: 0 additions & 1 deletion interface/src/i18n/sv/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ const sv: Translation = {
HELP_INFORMATION_2: 'För community-support besök vår Discord-server',
HELP_INFORMATION_3: 'Önska en ny funktion eller rapportera en bugg',
HELP_INFORMATION_4: 'Bifoga din systeminformation för snabbare hantering när du rapporterar ett problem',
HELP_INFORMATION_5: 'For help and questions please contact your installer', // TODO translate
UPLOAD: 'Uppladdning',
DOWNLOAD: '{{N|n|n}}edladdning',
INSTALL: 'Installera {0}',
Expand Down
1 change: 0 additions & 1 deletion interface/src/i18n/tr/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,6 @@ const tr: Translation = {
HELP_INFORMATION_2: 'Canlı topluluk sohbeti için Discord sunucumuza katılın',
HELP_INFORMATION_3: 'Yeni bir özellik talep etmek yada hata bildirmek için',
HELP_INFORMATION_4: 'Bir sorun bildirirken daha hızlı bir dönüş için sistem bilginizi indirip eklemeyi unutmayın',
HELP_INFORMATION_5: 'For help and questions please contact your installer', // TODO translate
UPLOAD: 'Yükleme',
DOWNLOAD: '{{İ|i|i}}İndirme',
INSTALL: 'Düzenlemek {0}',
Expand Down
19 changes: 10 additions & 9 deletions src/devices/heatpump.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -81,17 +81,18 @@ Heatpump::Heatpump(uint8_t device_type, uint8_t device_id, uint8_t product_id, c
FL_(lowNoiseMode),
DeviceValueUOM::NONE,
MAKE_CF_CB(set_lowNoiseMode));
register_device_value(
DeviceValueTAG::TAG_DEVICE_DATA, &lowNoiseStart_, DeviceValueType::UINT8, FL_(lowNoiseStart), DeviceValueUOM::HOURS, MAKE_CF_CB(set_lowNoiseStart), 0, 23);
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&lowNoiseStart_,
DeviceValueType::UINT8,
FL_(lowNoiseStart),
DeviceValueUOM::HOURS,
MAKE_CF_CB(set_lowNoiseStart),
0,
23);
register_device_value(
DeviceValueTAG::TAG_DEVICE_DATA, &lowNoiseStop_, DeviceValueType::UINT8, FL_(lowNoiseStop), DeviceValueUOM::HOURS, MAKE_CF_CB(set_lowNoiseStop), 0, 23);
register_device_value(DeviceValueTAG::TAG_DHW1,
&hybridDHW_,
DeviceValueType::ENUM,
FL_(enum_comfort2),
FL_(hybridDHW),
DeviceValueUOM::NONE,
MAKE_CF_CB(set_hybridDHW));
register_device_value(
DeviceValueTAG::TAG_DHW1, &hybridDHW_, DeviceValueType::ENUM, FL_(enum_comfort2), FL_(hybridDHW), DeviceValueUOM::NONE, MAKE_CF_CB(set_hybridDHW));
register_device_value(DeviceValueTAG::TAG_DEVICE_DATA,
&energyPriceGas_,
DeviceValueType::UINT8,
Expand Down
7 changes: 4 additions & 3 deletions src/emsdevicevalue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,10 @@ DeviceValue::DeviceValue(uint8_t device_type,
const char * DeviceValue::DeviceValueUOM_s[] = {

F_(uom_blank), // 0
F_(uom_degrees), F_(uom_degrees), F_(uom_percent), F_(uom_lmin), F_(uom_kwh), F_(uom_wh), FL_(hours)[0], FL_(minutes)[0], F_(uom_ua),
F_(uom_bar), F_(uom_kw), F_(uom_w), F_(uom_kb), FL_(seconds)[0], F_(uom_dbm), F_(uom_fahrenheit), F_(uom_mv), F_(uom_sqm),
F_(uom_m3), F_(uom_l), F_(uom_kmin), F_(uom_k), F_(uom_volts), F_(uom_mbar), F_(uom_lh), F_(uom_ctkwh), F_(uom_blank)
F_(uom_degrees), F_(uom_degrees), F_(uom_percent), F_(uom_lmin), F_(uom_kwh), F_(uom_wh), FL_(hours)[0],
FL_(minutes)[0], F_(uom_ua), F_(uom_bar), F_(uom_kw), F_(uom_w), F_(uom_kb), FL_(seconds)[0],
F_(uom_dbm), F_(uom_fahrenheit), F_(uom_mv), F_(uom_sqm), F_(uom_m3), F_(uom_l), F_(uom_kmin),
F_(uom_k), F_(uom_volts), F_(uom_mbar), F_(uom_lh), F_(uom_ctkwh), F_(uom_blank)

};

Expand Down

0 comments on commit a33d116

Please sign in to comment.