From 5f11bb3bb0a8c8ea6440d8955470899324dbd748 Mon Sep 17 00:00:00 2001 From: proddy Date: Thu, 14 Nov 2024 21:14:11 +0100 Subject: [PATCH 1/2] formatting --- src/devices/heatpump.cpp | 19 ++++++++++--------- src/emsdevicevalue.cpp | 7 ++++--- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/src/devices/heatpump.cpp b/src/devices/heatpump.cpp index f4549edfe..0026882aa 100644 --- a/src/devices/heatpump.cpp +++ b/src/devices/heatpump.cpp @@ -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, diff --git a/src/emsdevicevalue.cpp b/src/emsdevicevalue.cpp index 9a5c4f6ec..82bb45732 100644 --- a/src/emsdevicevalue.cpp +++ b/src/emsdevicevalue.cpp @@ -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) }; From fa4dcdcc6be317fb0497c69477fe7a7ccca68dbd Mon Sep 17 00:00:00 2001 From: proddy Date: Thu, 14 Nov 2024 21:14:31 +0100 Subject: [PATCH 2/2] use version translations --- interface/src/app/main/Help.tsx | 61 +++++++++++++------------- interface/src/app/settings/Version.tsx | 6 +-- interface/src/i18n/cz/index.ts | 1 - interface/src/i18n/de/index.ts | 1 - interface/src/i18n/en/index.ts | 1 - interface/src/i18n/fr/index.ts | 1 - interface/src/i18n/it/index.ts | 1 - interface/src/i18n/nl/index.ts | 1 - interface/src/i18n/no/index.ts | 1 - interface/src/i18n/pl/index.ts | 1 - interface/src/i18n/sk/index.ts | 1 - interface/src/i18n/sv/index.ts | 1 - interface/src/i18n/tr/index.ts | 1 - 13 files changed, 33 insertions(+), 45 deletions(-) diff --git a/interface/src/app/main/Help.tsx b/interface/src/app/main/Help.tsx index 6c8f6f26b..593f79d08 100644 --- a/interface/src/app/main/Help.tsx +++ b/interface/src/app/main/Help.tsx @@ -78,39 +78,38 @@ const Help = () => { return ( - } - sx={{ - borderRadius: 3, - border: '2px solid grey', - justifyContent: 'space-evenly', - alignItems: 'center' - }} - > - - {customSupportHTML ? ( -
- ) : ( - LL.HELP_INFORMATION_5() - )} - - } 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' - } - /> - + > + +
+ + setNotFound(true)} + src={ + notFound + ? '' + : customSupportIMG || + 'https://emsesp.org/_media/images/installer.jpeg' + } + /> + + )} {me.admin && ( diff --git a/interface/src/app/settings/Version.tsx b/interface/src/app/settings/Version.tsx index 94332f96a..f673fd92a 100644 --- a/interface/src/app/settings/Version.tsx +++ b/interface/src/app/settings/Version.tsx @@ -193,7 +193,7 @@ const Version = () => { Firmware Version - + {LL.VERSION()} @@ -243,10 +243,10 @@ const Version = () => { - Stable Release + {LL.STABLE()} - Development Release + {LL.DEVELOPMENT()} diff --git a/interface/src/i18n/cz/index.ts b/interface/src/i18n/cz/index.ts index e8935fa62..5193c7460 100644 --- a/interface/src/i18n/cz/index.ts +++ b/interface/src/i18n/cz/index.ts @@ -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}', diff --git a/interface/src/i18n/de/index.ts b/interface/src/i18n/de/index.ts index a1a384452..d93f06b4b 100644 --- a/interface/src/i18n/de/index.ts +++ b/interface/src/i18n/de/index.ts @@ -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}', diff --git a/interface/src/i18n/en/index.ts b/interface/src/i18n/en/index.ts index e52b31977..2a186439b 100644 --- a/interface/src/i18n/en/index.ts +++ b/interface/src/i18n/en/index.ts @@ -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}', diff --git a/interface/src/i18n/fr/index.ts b/interface/src/i18n/fr/index.ts index f29674778..7f6ea844b 100644 --- a/interface/src/i18n/fr/index.ts +++ b/interface/src/i18n/fr/index.ts @@ -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}', diff --git a/interface/src/i18n/it/index.ts b/interface/src/i18n/it/index.ts index 582490226..1166a76a0 100644 --- a/interface/src/i18n/it/index.ts +++ b/interface/src/i18n/it/index.ts @@ -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}', diff --git a/interface/src/i18n/nl/index.ts b/interface/src/i18n/nl/index.ts index 2e5314a00..eeb1d7a99 100644 --- a/interface/src/i18n/nl/index.ts +++ b/interface/src/i18n/nl/index.ts @@ -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}', diff --git a/interface/src/i18n/no/index.ts b/interface/src/i18n/no/index.ts index 2ea128bb8..aa24806a8 100644 --- a/interface/src/i18n/no/index.ts +++ b/interface/src/i18n/no/index.ts @@ -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}', diff --git a/interface/src/i18n/pl/index.ts b/interface/src/i18n/pl/index.ts index 3910815af..cfa6ddef4 100644 --- a/interface/src/i18n/pl/index.ts +++ b/interface/src/i18n/pl/index.ts @@ -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}', diff --git a/interface/src/i18n/sk/index.ts b/interface/src/i18n/sk/index.ts index 13e2bfcdc..4a10defde 100644 --- a/interface/src/i18n/sk/index.ts +++ b/interface/src/i18n/sk/index.ts @@ -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}', diff --git a/interface/src/i18n/sv/index.ts b/interface/src/i18n/sv/index.ts index ce9b6a3b1..65f01d877 100644 --- a/interface/src/i18n/sv/index.ts +++ b/interface/src/i18n/sv/index.ts @@ -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}', diff --git a/interface/src/i18n/tr/index.ts b/interface/src/i18n/tr/index.ts index 0ac801948..bbe1c4b93 100644 --- a/interface/src/i18n/tr/index.ts +++ b/interface/src/i18n/tr/index.ts @@ -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}',