mirror of
https://github.com/emsesp/EMS-ESP32.git
synced 2025-12-06 15:59:52 +03:00
DE translations for Settings, Customizations and Help
This commit is contained in:
@@ -38,9 +38,11 @@ const de: Translation = {
|
||||
SAVE: 'Speichern',
|
||||
REMOVE: 'Entfernen',
|
||||
PROBLEM_UPDATING: 'Problem beim Aktualisieren',
|
||||
PROBLEM_LOADING: 'Problem beim Holen',
|
||||
ACCESS_DENIED: 'Zugriff abgelehnt',
|
||||
ANALOG_SENSOR: 'Analoger Sensor{post}',
|
||||
TEMP_SENSOR: 'Temperatursensor{post}',
|
||||
TEMP_SENSORS: 'Temperatursensoren',
|
||||
WRITE_COMMAND: 'Befehl schreiben {cmd}',
|
||||
EMS_BUS_WARNING:
|
||||
'EMS-Bus getrennt. Wenn diese Warnung nach einigen Sekunden immer noch besteht, überprüfen Sie bitte die Einstellungen und das Board-Profil',
|
||||
@@ -52,7 +54,7 @@ const de: Translation = {
|
||||
EMS_SCAN: 'Möchten Sie wirklich einen vollständigen Gerätescan des EMS-Busses starten?',
|
||||
EMS_BUS_STATUS: 'EMS Bus Status',
|
||||
ACTIVE_DEVICES: 'Aktive Geräte und Sensoren',
|
||||
DEVICE: 'Device',
|
||||
DEVICE: 'Gerät',
|
||||
SUCCESS: 'ERFOLG',
|
||||
FAIL: 'SCHEITERN',
|
||||
QUALITY: 'QUALITÄT',
|
||||
@@ -75,7 +77,72 @@ const de: Translation = {
|
||||
NUM_DAYS: '{num} Tag{{en}}',
|
||||
NUM_SECONDS: '{num} Sekund{{en}}',
|
||||
NUM_HOURS: '{num} Stunde{{n}}',
|
||||
NUM_MINUTES: '{num} Minute{{en}}'
|
||||
NUM_MINUTES: '{num} Minute{{en}}',
|
||||
APPLICATION_SETTINGS: 'Anwendungseinstellungen',
|
||||
CUSTOMIZATION: 'Anpassung',
|
||||
APPLICATION_RESTARTING: 'EMS-ESP startet neu',
|
||||
BOARD_PROFILE_TEXT:
|
||||
'Wählen Sie ein vorkonfiguriertes Schnittstellenkartenprofil aus der Liste unten aus oder wählen Sie Benutzerdefiniert, um Ihre eigenen Hardwareeinstellungen zu konfigurieren',
|
||||
BOARD_PROFILE: 'Board Profil',
|
||||
BUTTON: 'Druckknopf',
|
||||
TEMPERATURE: 'Temperatur',
|
||||
DISABLED: 'deaktiviert',
|
||||
GENERAL_OPTIONS: 'Allgemeine Optionen',
|
||||
LANGUAGE_ENTITIES: 'Sprache (für Geräteentitäten)',
|
||||
HIDE_LED: 'ausblenden LED',
|
||||
ENABLE_TELNET: 'Ermöglichen Telnet Console',
|
||||
ENABLE_ANALOG: 'Ermöglichen Analogsensorsen',
|
||||
CONVERT_FAHRENHEIT: 'Konvertieren Sie Temperaturwerte in Fahrenheit',
|
||||
BYPASS_TOKEN: 'Zugriffstoken-Autorisierung bei API-Aufrufen umgehen',
|
||||
READONLY: 'Nur-Lese-Modus aktivieren (blockiert alle ausgehenden EMS Tx Write-Befehle)',
|
||||
UNDERCLOCK_CPU: 'CPU-Geschwindigkeit untertakten',
|
||||
ENABLE_SHOWER_TIMER: 'Duschtimer aktivieren',
|
||||
ENABLE_SHOWER_ALERT: 'Duschalarm aktivieren',
|
||||
TRIGGER_TIME: 'Auslösezeit',
|
||||
COLD_SHOT_DURATION: 'Kaltschussdauer',
|
||||
FORMATTING_OPTIONS: 'Formatierungsoptionen',
|
||||
BOOLEAN_FORMAT_DASHBOARD: 'Dashboard im booleschen Format',
|
||||
BOOLEAN_FORMAT_API: 'Boolesches Format API/MQTT',
|
||||
ENUM_FORMAT: 'Enum Format API/MQTT',
|
||||
INDEX: 'Index',
|
||||
ENABLE_PARASITE: 'Parasiten-Power aktivieren',
|
||||
LOGGING: 'Protokollierung',
|
||||
LOG_HEX: 'EMS-Telegramme hexadezimal protokollieren',
|
||||
ENABLE_SYSLOG: 'Syslog aktivieren',
|
||||
MARK_INTERVAL: 'Intervallmarke',
|
||||
SECONDS: 'sekunden',
|
||||
MINUTES: 'minuten',
|
||||
RESTART: 'Neu starten',
|
||||
RESTART_TEXT: 'muss neu gestartet werden, um geänderte Systemeinstellungen zu übernehmen',
|
||||
COMMAND: 'Befehl',
|
||||
CUSTOMIZATIONS_RESTART: 'Alle Anpassungen wurden entfernt. Neustart...',
|
||||
CUSTOMIZATIONS_FULL: 'Ausgewählte Entitäten haben das Limit von 60 überschritten. Bitte stapelweise speichern',
|
||||
CUSTOMIZATIONS_SAVED: 'Anpassungen gespeichert',
|
||||
CUSTOMIZATIONS_HELP_1: 'Wählen Sie ein Gerät aus und passen Sie die Entitäten mithilfe der Optionen an',
|
||||
CUSTOMIZATIONS_HELP_2: 'als Favorit markieren',
|
||||
CUSTOMIZATIONS_HELP_3: 'Schreibaktion deaktivieren',
|
||||
CUSTOMIZATIONS_HELP_4: 'von MQTT und API ausschließen',
|
||||
CUSTOMIZATIONS_HELP_5: 'Aus dem Dashboard ausblenden',
|
||||
SELECT_DEVICE: 'Wählen Sie ein Gerät aus',
|
||||
SET_ALL: 'setzen Sie alle',
|
||||
OPTIONS: 'Optionen',
|
||||
NAME: 'Name',
|
||||
CUSTOMIZATIONS_RESET:
|
||||
'Möchten Sie wirklich alle Anpassungen entfernen, einschließlich der benutzerdefinierten Einstellungen der Temperatur- und Analogsensoren?',
|
||||
DEVICE_ENTITIES: 'Geräteentitäten',
|
||||
CONFIGURE: 'konfigurieren',
|
||||
USER_CUSTOMIZATION: 'Benutzeranpassung',
|
||||
SUPPORT_INFORMATION: 'Unterstützende Informationen',
|
||||
HELP_INFORMATION_1: 'Besuchen Sie das Online',
|
||||
HELP_INFORMATION_2: 'um Anweisungen zu erhalten, wie es geht',
|
||||
HELP_INFORMATION_3: 'und auf andere Informationen zugreifen',
|
||||
HELP_INFORMATION_4: 'Für einen Live-Community-Chat treten Sie unserem bei',
|
||||
HELP_INFORMATION_5: 'Sende ein',
|
||||
HELP_INFORMATION_6: 'Support-Problem',
|
||||
HELP_INFORMATION_7: 'um eine neue Funktion anzufordern oder einen Fehler zu melden',
|
||||
HELP_INFORMATION_8: 'Überzeugen Sie sich auch',
|
||||
HELP_INFORMATION_9: 'und hängen Sie Ihre Systemdetails für eine schnellere Antwort an',
|
||||
HELP_INFORMATION_10: 'EMS-ESP wird immer ein kostenloses Open-Source-Projekt sein. Bitte erwägen Sie, es mit einem '
|
||||
};
|
||||
|
||||
export default de;
|
||||
|
||||
@@ -38,9 +38,11 @@ const en: BaseTranslation = {
|
||||
SAVE: 'Save',
|
||||
REMOVE: 'Remove',
|
||||
PROBLEM_UPDATING: 'Problem updating',
|
||||
PROBLEM_LOADING: 'Problem loading',
|
||||
ACCESS_DENIED: 'Access Denied',
|
||||
ANALOG_SENSOR: 'Analog Sensor{post}',
|
||||
TEMP_SENSOR: 'Temperature Sensor{post}',
|
||||
TEMP_SENSORS: 'Temperature Sensors',
|
||||
WRITE_COMMAND: 'Write command {cmd}',
|
||||
EMS_BUS_WARNING:
|
||||
'EMS bus disconnected. If this warning still persists after a few seconds please check settings and board profile',
|
||||
@@ -75,7 +77,72 @@ const en: BaseTranslation = {
|
||||
NUM_DAYS: '{num} Day{{s}}',
|
||||
NUM_SECONDS: '{num} Second{{s}}',
|
||||
NUM_HOURS: '{num} Hour{{s}}',
|
||||
NUM_MINUTES: '{num} Minute{{s}}'
|
||||
NUM_MINUTES: '{num} Minute{{s}}',
|
||||
APPLICATION_SETTINGS: 'Application Settings',
|
||||
CUSTOMIZATION: 'Customization',
|
||||
APPLICATION_RESTARTING: 'EMS-ESP is restarting',
|
||||
BOARD_PROFILE_TEXT:
|
||||
'Select a pre-configured interface board profile from the list below or choose Custom to configure your own hardware settings',
|
||||
BOARD_PROFILE: 'Board Profile',
|
||||
BUTTON: 'Button',
|
||||
TEMPERATURE: 'Temperature',
|
||||
DISABLED: 'disabled',
|
||||
GENERAL_OPTIONS: 'General Options',
|
||||
LANGUAGE_ENTITIES: 'Language (for device entities)',
|
||||
HIDE_LED: 'Hide LED',
|
||||
ENABLE_TELNET: 'Enable Telnet Console',
|
||||
ENABLE_ANALOG: 'Enable Analog Sensors',
|
||||
CONVERT_FAHRENHEIT: 'Convert temperature values to Fahrenheit',
|
||||
BYPASS_TOKEN: 'Bypass Access Token authorization on API calls',
|
||||
READONLY: 'Enable read-only mode (blocks all outgoing EMS Tx Write commands)',
|
||||
UNDERCLOCK_CPU: 'Underclock CPU speed',
|
||||
ENABLE_SHOWER_TIMER: 'Enable Shower Timer',
|
||||
ENABLE_SHOWER_ALERT: 'Enable Shower Alert',
|
||||
TRIGGER_TIME: 'Trigger Time',
|
||||
COLD_SHOT_DURATION: 'Cold Shot Duration',
|
||||
FORMATTING_OPTIONS: 'Formatting Options',
|
||||
BOOLEAN_FORMAT_DASHBOARD: 'Boolean Format Dashboard',
|
||||
BOOLEAN_FORMAT_API: 'Boolean Format API/MQTT',
|
||||
ENUM_FORMAT: 'Enum Format API/MQTT',
|
||||
INDEX: 'Index',
|
||||
ENABLE_PARASITE: 'Enable parasite power',
|
||||
LOGGING: 'Logging',
|
||||
LOG_HEX: 'Log EMS telegrams in hexadecimal',
|
||||
ENABLE_SYSLOG: 'Enable Syslog',
|
||||
MARK_INTERVAL: 'Mark Interval',
|
||||
SECONDS: 'seconds',
|
||||
MINUTES: 'minutes',
|
||||
RESTART: 'Restart',
|
||||
RESTART_TEXT: 'EMS-ESP needs to be restarted to apply changed system settings',
|
||||
COMMAND: 'Command',
|
||||
CUSTOMIZATIONS_RESTART: 'All customizations have been removed. Restarting...',
|
||||
CUSTOMIZATIONS_FULL: 'Selected entities exceeded limit of 60. Please Save in batches',
|
||||
CUSTOMIZATIONS_SAVED: 'Customizations saved',
|
||||
CUSTOMIZATIONS_HELP_1: 'Select a device and customize the entities using the options',
|
||||
CUSTOMIZATIONS_HELP_2: 'mark as favorite',
|
||||
CUSTOMIZATIONS_HELP_3: 'disable write action',
|
||||
CUSTOMIZATIONS_HELP_4: 'exclude from MQTT and API',
|
||||
CUSTOMIZATIONS_HELP_5: 'hide from Dashboard',
|
||||
SELECT_DEVICE: 'Select a device',
|
||||
SET_ALL: 'set all',
|
||||
OPTIONS: 'Options',
|
||||
NAME: 'Name',
|
||||
CUSTOMIZATIONS_RESET:
|
||||
'Are you sure you want remove all customizations including the custom settings of the Temperature and Analog sensors?',
|
||||
DEVICE_ENTITIES: 'Device Entities',
|
||||
CONFIGURE: 'configure',
|
||||
USER_CUSTOMIZATION: 'User Customization',
|
||||
SUPPORT_INFORMATION: 'Support Information',
|
||||
HELP_INFORMATION_1: 'Visit the online',
|
||||
HELP_INFORMATION_2: 'to get instructions on how to',
|
||||
HELP_INFORMATION_3: 'and access other information',
|
||||
HELP_INFORMATION_4: 'For live community chat join our',
|
||||
HELP_INFORMATION_5: 'Submit a',
|
||||
HELP_INFORMATION_6: 'support issue',
|
||||
HELP_INFORMATION_7: 'for requesting a new feature or reporting a bug',
|
||||
HELP_INFORMATION_8: 'Make sure you also',
|
||||
HELP_INFORMATION_9: 'and attach your system details for a faster response',
|
||||
HELP_INFORMATION_10: 'EMS-ESP will always be a free and open-source project. Please consider supporting it with a '
|
||||
};
|
||||
|
||||
export default en;
|
||||
|
||||
@@ -163,6 +163,10 @@ type RootTranslation = {
|
||||
* Problem updating
|
||||
*/
|
||||
PROBLEM_UPDATING: string
|
||||
/**
|
||||
* Problem loading
|
||||
*/
|
||||
PROBLEM_LOADING: string
|
||||
/**
|
||||
* Access Denied
|
||||
*/
|
||||
@@ -177,6 +181,10 @@ type RootTranslation = {
|
||||
* @param {unknown} post
|
||||
*/
|
||||
TEMP_SENSOR: RequiredParams<'post'>
|
||||
/**
|
||||
* Temperature Sensors
|
||||
*/
|
||||
TEMP_SENSORS: string
|
||||
/**
|
||||
* Write command {cmd}
|
||||
* @param {unknown} cmd
|
||||
@@ -315,6 +323,258 @@ type RootTranslation = {
|
||||
* @param {string | number | boolean} num
|
||||
*/
|
||||
NUM_MINUTES: RequiredParams<'num'>
|
||||
/**
|
||||
* Application Settings
|
||||
*/
|
||||
APPLICATION_SETTINGS: string
|
||||
/**
|
||||
* Customization
|
||||
*/
|
||||
CUSTOMIZATION: string
|
||||
/**
|
||||
* EMS-ESP is restarting
|
||||
*/
|
||||
APPLICATION_RESTARTING: string
|
||||
/**
|
||||
* Select a pre-configured interface board profile from the list below or choose Custom to configure your own hardware settings
|
||||
*/
|
||||
BOARD_PROFILE_TEXT: string
|
||||
/**
|
||||
* Board Profile
|
||||
*/
|
||||
BOARD_PROFILE: string
|
||||
/**
|
||||
* Button
|
||||
*/
|
||||
BUTTON: string
|
||||
/**
|
||||
* Temperature
|
||||
*/
|
||||
TEMPERATURE: string
|
||||
/**
|
||||
* disabled
|
||||
*/
|
||||
DISABLED: string
|
||||
/**
|
||||
* General Options
|
||||
*/
|
||||
GENERAL_OPTIONS: string
|
||||
/**
|
||||
* Language (for device entities)
|
||||
*/
|
||||
LANGUAGE_ENTITIES: string
|
||||
/**
|
||||
* Hide LED
|
||||
*/
|
||||
HIDE_LED: string
|
||||
/**
|
||||
* Enable Telnet Console
|
||||
*/
|
||||
ENABLE_TELNET: string
|
||||
/**
|
||||
* Enable Analog Sensors
|
||||
*/
|
||||
ENABLE_ANALOG: string
|
||||
/**
|
||||
* Convert temperature values to Fahrenheit
|
||||
*/
|
||||
CONVERT_FAHRENHEIT: string
|
||||
/**
|
||||
* Bypass Access Token authorization on API calls
|
||||
*/
|
||||
BYPASS_TOKEN: string
|
||||
/**
|
||||
* Enable read-only mode (blocks all outgoing EMS Tx Write commands)
|
||||
*/
|
||||
READONLY: string
|
||||
/**
|
||||
* Underclock CPU speed
|
||||
*/
|
||||
UNDERCLOCK_CPU: string
|
||||
/**
|
||||
* Enable Shower Timer
|
||||
*/
|
||||
ENABLE_SHOWER_TIMER: string
|
||||
/**
|
||||
* Enable Shower Alert
|
||||
*/
|
||||
ENABLE_SHOWER_ALERT: string
|
||||
/**
|
||||
* Trigger Time
|
||||
*/
|
||||
TRIGGER_TIME: string
|
||||
/**
|
||||
* Cold Shot Duration
|
||||
*/
|
||||
COLD_SHOT_DURATION: string
|
||||
/**
|
||||
* Formatting Options
|
||||
*/
|
||||
FORMATTING_OPTIONS: string
|
||||
/**
|
||||
* Boolean Format Dashboard
|
||||
*/
|
||||
BOOLEAN_FORMAT_DASHBOARD: string
|
||||
/**
|
||||
* Boolean Format API/MQTT
|
||||
*/
|
||||
BOOLEAN_FORMAT_API: string
|
||||
/**
|
||||
* Enum Format API/MQTT
|
||||
*/
|
||||
ENUM_FORMAT: string
|
||||
/**
|
||||
* Index
|
||||
*/
|
||||
INDEX: string
|
||||
/**
|
||||
* Enable parasite power
|
||||
*/
|
||||
ENABLE_PARASITE: string
|
||||
/**
|
||||
* Logging
|
||||
*/
|
||||
LOGGING: string
|
||||
/**
|
||||
* Log EMS telegrams in hexadecimal
|
||||
*/
|
||||
LOG_HEX: string
|
||||
/**
|
||||
* Enable Syslog
|
||||
*/
|
||||
ENABLE_SYSLOG: string
|
||||
/**
|
||||
* Mark Interval
|
||||
*/
|
||||
MARK_INTERVAL: string
|
||||
/**
|
||||
* seconds
|
||||
*/
|
||||
SECONDS: string
|
||||
/**
|
||||
* minutes
|
||||
*/
|
||||
MINUTES: string
|
||||
/**
|
||||
* Restart
|
||||
*/
|
||||
RESTART: string
|
||||
/**
|
||||
* EMS-ESP needs to be restarted to apply changed system settings
|
||||
*/
|
||||
RESTART_TEXT: string
|
||||
/**
|
||||
* Command
|
||||
*/
|
||||
COMMAND: string
|
||||
/**
|
||||
* All customizations have been removed. Restarting...
|
||||
*/
|
||||
CUSTOMIZATIONS_RESTART: string
|
||||
/**
|
||||
* Selected entities exceeded limit of 60. Please Save in batches
|
||||
*/
|
||||
CUSTOMIZATIONS_FULL: string
|
||||
/**
|
||||
* Customizations saved
|
||||
*/
|
||||
CUSTOMIZATIONS_SAVED: string
|
||||
/**
|
||||
* Select a device and customize the entities using the options
|
||||
*/
|
||||
CUSTOMIZATIONS_HELP_1: string
|
||||
/**
|
||||
* mark as favorite
|
||||
*/
|
||||
CUSTOMIZATIONS_HELP_2: string
|
||||
/**
|
||||
* disable write action
|
||||
*/
|
||||
CUSTOMIZATIONS_HELP_3: string
|
||||
/**
|
||||
* exclude from MQTT and API
|
||||
*/
|
||||
CUSTOMIZATIONS_HELP_4: string
|
||||
/**
|
||||
* hide from Dashboard
|
||||
*/
|
||||
CUSTOMIZATIONS_HELP_5: string
|
||||
/**
|
||||
* Select a device
|
||||
*/
|
||||
SELECT_DEVICE: string
|
||||
/**
|
||||
* set all
|
||||
*/
|
||||
SET_ALL: string
|
||||
/**
|
||||
* Options
|
||||
*/
|
||||
OPTIONS: string
|
||||
/**
|
||||
* Name
|
||||
*/
|
||||
NAME: string
|
||||
/**
|
||||
* Are you sure you want remove all customizations including the custom settings of the Temperature and Analog sensors?
|
||||
*/
|
||||
CUSTOMIZATIONS_RESET: string
|
||||
/**
|
||||
* Device Entities
|
||||
*/
|
||||
DEVICE_ENTITIES: string
|
||||
/**
|
||||
* configure
|
||||
*/
|
||||
CONFIGURE: string
|
||||
/**
|
||||
* User Customization
|
||||
*/
|
||||
USER_CUSTOMIZATION: string
|
||||
/**
|
||||
* Support Information
|
||||
*/
|
||||
SUPPORT_INFORMATION: string
|
||||
/**
|
||||
* Visit the online
|
||||
*/
|
||||
HELP_INFORMATION_1: string
|
||||
/**
|
||||
* to get instructions on how to
|
||||
*/
|
||||
HELP_INFORMATION_2: string
|
||||
/**
|
||||
* and access other information
|
||||
*/
|
||||
HELP_INFORMATION_3: string
|
||||
/**
|
||||
* For live community chat join our
|
||||
*/
|
||||
HELP_INFORMATION_4: string
|
||||
/**
|
||||
* Submit a
|
||||
*/
|
||||
HELP_INFORMATION_5: string
|
||||
/**
|
||||
* support issue
|
||||
*/
|
||||
HELP_INFORMATION_6: string
|
||||
/**
|
||||
* for requesting a new feature or reporting a bug
|
||||
*/
|
||||
HELP_INFORMATION_7: string
|
||||
/**
|
||||
* Make sure you also
|
||||
*/
|
||||
HELP_INFORMATION_8: string
|
||||
/**
|
||||
* and attach your system details for a faster response
|
||||
*/
|
||||
HELP_INFORMATION_9: string
|
||||
/**
|
||||
* EMS-ESP will always be a free and open-source project. Please consider supporting it with a
|
||||
*/
|
||||
HELP_INFORMATION_10: string
|
||||
}
|
||||
|
||||
export type TranslationFunctions = {
|
||||
@@ -466,6 +726,10 @@ export type TranslationFunctions = {
|
||||
* Problem updating
|
||||
*/
|
||||
PROBLEM_UPDATING: () => LocalizedString
|
||||
/**
|
||||
* Problem loading
|
||||
*/
|
||||
PROBLEM_LOADING: () => LocalizedString
|
||||
/**
|
||||
* Access Denied
|
||||
*/
|
||||
@@ -478,6 +742,10 @@ export type TranslationFunctions = {
|
||||
* Temperature Sensor{post}
|
||||
*/
|
||||
TEMP_SENSOR: (arg: { post: unknown }) => LocalizedString
|
||||
/**
|
||||
* Temperature Sensors
|
||||
*/
|
||||
TEMP_SENSORS: () => LocalizedString
|
||||
/**
|
||||
* Write command {cmd}
|
||||
*/
|
||||
@@ -608,6 +876,258 @@ export type TranslationFunctions = {
|
||||
* {num} Minute{{s}}
|
||||
*/
|
||||
NUM_MINUTES: (arg: { num: string | number | boolean }) => LocalizedString
|
||||
/**
|
||||
* Application Settings
|
||||
*/
|
||||
APPLICATION_SETTINGS: () => LocalizedString
|
||||
/**
|
||||
* Customization
|
||||
*/
|
||||
CUSTOMIZATION: () => LocalizedString
|
||||
/**
|
||||
* EMS-ESP is restarting
|
||||
*/
|
||||
APPLICATION_RESTARTING: () => LocalizedString
|
||||
/**
|
||||
* Select a pre-configured interface board profile from the list below or choose Custom to configure your own hardware settings
|
||||
*/
|
||||
BOARD_PROFILE_TEXT: () => LocalizedString
|
||||
/**
|
||||
* Board Profile
|
||||
*/
|
||||
BOARD_PROFILE: () => LocalizedString
|
||||
/**
|
||||
* Button
|
||||
*/
|
||||
BUTTON: () => LocalizedString
|
||||
/**
|
||||
* Temperature
|
||||
*/
|
||||
TEMPERATURE: () => LocalizedString
|
||||
/**
|
||||
* disabled
|
||||
*/
|
||||
DISABLED: () => LocalizedString
|
||||
/**
|
||||
* General Options
|
||||
*/
|
||||
GENERAL_OPTIONS: () => LocalizedString
|
||||
/**
|
||||
* Language (for device entities)
|
||||
*/
|
||||
LANGUAGE_ENTITIES: () => LocalizedString
|
||||
/**
|
||||
* Hide LED
|
||||
*/
|
||||
HIDE_LED: () => LocalizedString
|
||||
/**
|
||||
* Enable Telnet Console
|
||||
*/
|
||||
ENABLE_TELNET: () => LocalizedString
|
||||
/**
|
||||
* Enable Analog Sensors
|
||||
*/
|
||||
ENABLE_ANALOG: () => LocalizedString
|
||||
/**
|
||||
* Convert temperature values to Fahrenheit
|
||||
*/
|
||||
CONVERT_FAHRENHEIT: () => LocalizedString
|
||||
/**
|
||||
* Bypass Access Token authorization on API calls
|
||||
*/
|
||||
BYPASS_TOKEN: () => LocalizedString
|
||||
/**
|
||||
* Enable read-only mode (blocks all outgoing EMS Tx Write commands)
|
||||
*/
|
||||
READONLY: () => LocalizedString
|
||||
/**
|
||||
* Underclock CPU speed
|
||||
*/
|
||||
UNDERCLOCK_CPU: () => LocalizedString
|
||||
/**
|
||||
* Enable Shower Timer
|
||||
*/
|
||||
ENABLE_SHOWER_TIMER: () => LocalizedString
|
||||
/**
|
||||
* Enable Shower Alert
|
||||
*/
|
||||
ENABLE_SHOWER_ALERT: () => LocalizedString
|
||||
/**
|
||||
* Trigger Time
|
||||
*/
|
||||
TRIGGER_TIME: () => LocalizedString
|
||||
/**
|
||||
* Cold Shot Duration
|
||||
*/
|
||||
COLD_SHOT_DURATION: () => LocalizedString
|
||||
/**
|
||||
* Formatting Options
|
||||
*/
|
||||
FORMATTING_OPTIONS: () => LocalizedString
|
||||
/**
|
||||
* Boolean Format Dashboard
|
||||
*/
|
||||
BOOLEAN_FORMAT_DASHBOARD: () => LocalizedString
|
||||
/**
|
||||
* Boolean Format API/MQTT
|
||||
*/
|
||||
BOOLEAN_FORMAT_API: () => LocalizedString
|
||||
/**
|
||||
* Enum Format API/MQTT
|
||||
*/
|
||||
ENUM_FORMAT: () => LocalizedString
|
||||
/**
|
||||
* Index
|
||||
*/
|
||||
INDEX: () => LocalizedString
|
||||
/**
|
||||
* Enable parasite power
|
||||
*/
|
||||
ENABLE_PARASITE: () => LocalizedString
|
||||
/**
|
||||
* Logging
|
||||
*/
|
||||
LOGGING: () => LocalizedString
|
||||
/**
|
||||
* Log EMS telegrams in hexadecimal
|
||||
*/
|
||||
LOG_HEX: () => LocalizedString
|
||||
/**
|
||||
* Enable Syslog
|
||||
*/
|
||||
ENABLE_SYSLOG: () => LocalizedString
|
||||
/**
|
||||
* Mark Interval
|
||||
*/
|
||||
MARK_INTERVAL: () => LocalizedString
|
||||
/**
|
||||
* seconds
|
||||
*/
|
||||
SECONDS: () => LocalizedString
|
||||
/**
|
||||
* minutes
|
||||
*/
|
||||
MINUTES: () => LocalizedString
|
||||
/**
|
||||
* Restart
|
||||
*/
|
||||
RESTART: () => LocalizedString
|
||||
/**
|
||||
* EMS-ESP needs to be restarted to apply changed system settings
|
||||
*/
|
||||
RESTART_TEXT: () => LocalizedString
|
||||
/**
|
||||
* Command
|
||||
*/
|
||||
COMMAND: () => LocalizedString
|
||||
/**
|
||||
* All customizations have been removed. Restarting...
|
||||
*/
|
||||
CUSTOMIZATIONS_RESTART: () => LocalizedString
|
||||
/**
|
||||
* Selected entities exceeded limit of 60. Please Save in batches
|
||||
*/
|
||||
CUSTOMIZATIONS_FULL: () => LocalizedString
|
||||
/**
|
||||
* Customizations saved
|
||||
*/
|
||||
CUSTOMIZATIONS_SAVED: () => LocalizedString
|
||||
/**
|
||||
* Select a device and customize the entities using the options
|
||||
*/
|
||||
CUSTOMIZATIONS_HELP_1: () => LocalizedString
|
||||
/**
|
||||
* mark as favorite
|
||||
*/
|
||||
CUSTOMIZATIONS_HELP_2: () => LocalizedString
|
||||
/**
|
||||
* disable write action
|
||||
*/
|
||||
CUSTOMIZATIONS_HELP_3: () => LocalizedString
|
||||
/**
|
||||
* exclude from MQTT and API
|
||||
*/
|
||||
CUSTOMIZATIONS_HELP_4: () => LocalizedString
|
||||
/**
|
||||
* hide from Dashboard
|
||||
*/
|
||||
CUSTOMIZATIONS_HELP_5: () => LocalizedString
|
||||
/**
|
||||
* Select a device
|
||||
*/
|
||||
SELECT_DEVICE: () => LocalizedString
|
||||
/**
|
||||
* set all
|
||||
*/
|
||||
SET_ALL: () => LocalizedString
|
||||
/**
|
||||
* Options
|
||||
*/
|
||||
OPTIONS: () => LocalizedString
|
||||
/**
|
||||
* Name
|
||||
*/
|
||||
NAME: () => LocalizedString
|
||||
/**
|
||||
* Are you sure you want remove all customizations including the custom settings of the Temperature and Analog sensors?
|
||||
*/
|
||||
CUSTOMIZATIONS_RESET: () => LocalizedString
|
||||
/**
|
||||
* Device Entities
|
||||
*/
|
||||
DEVICE_ENTITIES: () => LocalizedString
|
||||
/**
|
||||
* configure
|
||||
*/
|
||||
CONFIGURE: () => LocalizedString
|
||||
/**
|
||||
* User Customization
|
||||
*/
|
||||
USER_CUSTOMIZATION: () => LocalizedString
|
||||
/**
|
||||
* Support Information
|
||||
*/
|
||||
SUPPORT_INFORMATION: () => LocalizedString
|
||||
/**
|
||||
* Visit the online
|
||||
*/
|
||||
HELP_INFORMATION_1: () => LocalizedString
|
||||
/**
|
||||
* to get instructions on how to
|
||||
*/
|
||||
HELP_INFORMATION_2: () => LocalizedString
|
||||
/**
|
||||
* and access other information
|
||||
*/
|
||||
HELP_INFORMATION_3: () => LocalizedString
|
||||
/**
|
||||
* For live community chat join our
|
||||
*/
|
||||
HELP_INFORMATION_4: () => LocalizedString
|
||||
/**
|
||||
* Submit a
|
||||
*/
|
||||
HELP_INFORMATION_5: () => LocalizedString
|
||||
/**
|
||||
* support issue
|
||||
*/
|
||||
HELP_INFORMATION_6: () => LocalizedString
|
||||
/**
|
||||
* for requesting a new feature or reporting a bug
|
||||
*/
|
||||
HELP_INFORMATION_7: () => LocalizedString
|
||||
/**
|
||||
* Make sure you also
|
||||
*/
|
||||
HELP_INFORMATION_8: () => LocalizedString
|
||||
/**
|
||||
* and attach your system details for a faster response
|
||||
*/
|
||||
HELP_INFORMATION_9: () => LocalizedString
|
||||
/**
|
||||
* EMS-ESP will always be a free and open-source project. Please consider supporting it with a
|
||||
*/
|
||||
HELP_INFORMATION_10: () => LocalizedString
|
||||
}
|
||||
|
||||
export type Formatters = {}
|
||||
|
||||
@@ -18,7 +18,7 @@ const Help: FC = () => {
|
||||
return (
|
||||
<>
|
||||
<RouterTabs value={routerTab}>
|
||||
<Tab value="information" label="EMS-ESP Help" />
|
||||
<Tab value="information" label={"EMS-ESP " + LL.HELP()} />
|
||||
</RouterTabs>
|
||||
<Routes>
|
||||
<Route path="information" element={<HelpInformation />} />
|
||||
|
||||
@@ -14,9 +14,13 @@ import DownloadIcon from '@mui/icons-material/GetApp';
|
||||
|
||||
import { extractErrorMessage } from '../utils';
|
||||
|
||||
import { useI18nContext } from '../i18n/i18n-react';
|
||||
|
||||
import * as EMSESP from './api';
|
||||
|
||||
const HelpInformation: FC = () => {
|
||||
const { LL } = useI18nContext();
|
||||
|
||||
const { enqueueSnackbar } = useSnackbar();
|
||||
|
||||
const saveFile = (json: any, endpoint: string) => {
|
||||
@@ -47,40 +51,40 @@ const HelpInformation: FC = () => {
|
||||
saveFile(response.data, endpoint);
|
||||
}
|
||||
} catch (error: unknown) {
|
||||
enqueueSnackbar(extractErrorMessage(error, 'Problem with downloading'), { variant: 'error' });
|
||||
enqueueSnackbar(extractErrorMessage(error, LL.PROBLEM_LOADING()), { variant: 'error' });
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<SectionContent title="Support Information" titleGutter>
|
||||
<SectionContent title={LL.SUPPORT_INFORMATION()} titleGutter>
|
||||
<List>
|
||||
<ListItem>
|
||||
<ListItemAvatar>
|
||||
<MenuBookIcon />
|
||||
<MenuBookIcon style={{ fontSize: 24, color: 'lightblue', verticalAlign: 'middle' }} />
|
||||
</ListItemAvatar>
|
||||
<ListItemText>
|
||||
Visit the online
|
||||
{LL.HELP_INFORMATION_1()}
|
||||
<Link target="_blank" href="https://emsesp.github.io/docs" color="primary">
|
||||
{'Wiki'}
|
||||
</Link>
|
||||
to get instructions on how to
|
||||
{LL.HELP_INFORMATION_2()}
|
||||
<Link
|
||||
target="_blank"
|
||||
href="https://emsesp.github.io/docs/#/Configure-firmware?id=ems-esp-settings"
|
||||
color="primary"
|
||||
>
|
||||
{'configure'}
|
||||
{LL.CONFIGURE()}
|
||||
</Link>
|
||||
EMS-ESP and access other information.
|
||||
{' EMS-ESP ' + LL.HELP_INFORMATION_3() + '.'}
|
||||
</ListItemText>
|
||||
</ListItem>
|
||||
|
||||
<ListItem>
|
||||
<ListItemAvatar>
|
||||
<CommentIcon />
|
||||
<CommentIcon style={{ fontSize: 24, color: 'lightblue', verticalAlign: 'middle' }} />
|
||||
</ListItemAvatar>
|
||||
<ListItemText>
|
||||
For live community chat join our
|
||||
{LL.HELP_INFORMATION_4()}
|
||||
<Link target="_blank" href="https://discord.gg/3J3GgnzpyT" color="primary">
|
||||
{'Discord'}
|
||||
</Link>
|
||||
@@ -90,33 +94,31 @@ const HelpInformation: FC = () => {
|
||||
|
||||
<ListItem>
|
||||
<ListItemAvatar>
|
||||
<GitHubIcon />
|
||||
<GitHubIcon style={{ fontSize: 24, color: 'lightblue', verticalAlign: 'middle' }} />
|
||||
</ListItemAvatar>
|
||||
|
||||
<ListItemText>
|
||||
Submit a
|
||||
{LL.HELP_INFORMATION_5()}
|
||||
<Link target="_blank" href="https://github.com/emsesp/EMS-ESP32/issues/new/choose" color="primary">
|
||||
support issue
|
||||
{LL.HELP_INFORMATION_6()}
|
||||
</Link>
|
||||
for requesting a new feature or reporting a bug.
|
||||
{LL.HELP_INFORMATION_7()}.
|
||||
<br />
|
||||
Make sure you also
|
||||
{LL.HELP_INFORMATION_8()}
|
||||
<Button startIcon={<DownloadIcon />} variant="outlined" color="primary" onClick={() => callAPI('info')}>
|
||||
download
|
||||
</Button>
|
||||
and attach your system details for a faster response.
|
||||
{LL.HELP_INFORMATION_9()}.
|
||||
</ListItemText>
|
||||
</ListItem>
|
||||
</List>
|
||||
|
||||
<Box border={1} p={1} mt={4}>
|
||||
<Typography align="center" variant="h6" color="orange">
|
||||
EMS-ESP will always be a free and open-source project
|
||||
<br></br>Please consider supporting it with a
|
||||
<StarIcon style={{ fontSize: 16, color: 'yellow', verticalAlign: 'middle' }} /> on
|
||||
{LL.HELP_INFORMATION_10()}
|
||||
<Link href="https://github.com/emsesp/EMS-ESP32" color="primary">
|
||||
{'GitHub'}
|
||||
</Link>
|
||||
<StarIcon style={{ fontSize: 20, color: 'yellow', verticalAlign: 'middle' }} />
|
||||
</Typography>
|
||||
<Typography align="center">@proddy @MichaelDvP</Typography>
|
||||
</Box>
|
||||
|
||||
@@ -19,8 +19,8 @@ const Settings: FC = () => {
|
||||
return (
|
||||
<>
|
||||
<RouterTabs value={routerTab}>
|
||||
<Tab value="application" label="Application Settings" />
|
||||
<Tab value="customization" label="Customization" />
|
||||
<Tab value="application" label={LL.APPLICATION_SETTINGS()} />
|
||||
<Tab value="customization" label={LL.CUSTOMIZATION()} />
|
||||
</RouterTabs>
|
||||
<Routes>
|
||||
<Route path="application" element={<SettingsApplication />} />
|
||||
|
||||
@@ -69,7 +69,7 @@ const SettingsApplication: FC = () => {
|
||||
});
|
||||
}
|
||||
} catch (error: unknown) {
|
||||
enqueueSnackbar(extractErrorMessage(error, 'Problem fetching board profile'), { variant: 'error' });
|
||||
enqueueSnackbar(extractErrorMessage(error, LL.PROBLEM_UPDATING()), { variant: 'error' });
|
||||
} finally {
|
||||
setProcessingBoard(false);
|
||||
}
|
||||
@@ -106,26 +106,23 @@ const SettingsApplication: FC = () => {
|
||||
validateAndSubmit();
|
||||
try {
|
||||
await EMSESP.restart();
|
||||
enqueueSnackbar('EMS-ESP is restarting...', { variant: 'info' });
|
||||
enqueueSnackbar(LL.APPLICATION_RESTARTING(), { variant: 'info' });
|
||||
} catch (error: unknown) {
|
||||
enqueueSnackbar(extractErrorMessage(error, 'Problem restarting device'), { variant: 'error' });
|
||||
enqueueSnackbar(extractErrorMessage(error, LL.PROBLEM_UPDATING()), { variant: 'error' });
|
||||
}
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<Typography sx={{ pt: 2 }} variant="h6" color="primary">
|
||||
Interface Board Profile
|
||||
Interface {LL.BOARD_PROFILE()}
|
||||
</Typography>
|
||||
<Box color="warning.main">
|
||||
<Typography variant="body2">
|
||||
Select a pre-configured interface board profile from the list below or choose "Custom" to configure your own
|
||||
hardware settings
|
||||
</Typography>
|
||||
<Typography variant="body2">{LL.BOARD_PROFILE_TEXT()}</Typography>
|
||||
</Box>
|
||||
<ValidatedTextField
|
||||
name="board_profile"
|
||||
label="Board Profile"
|
||||
label={LL.BOARD_PROFILE()}
|
||||
value={data.board_profile}
|
||||
disabled={processingBoard}
|
||||
variant="outlined"
|
||||
@@ -174,7 +171,7 @@ const SettingsApplication: FC = () => {
|
||||
<ValidatedTextField
|
||||
fieldErrors={fieldErrors}
|
||||
name="pbutton_gpio"
|
||||
label="Button GPIO"
|
||||
label={LL.BUTTON() + ' GPIO'}
|
||||
fullWidth
|
||||
variant="outlined"
|
||||
value={numberValue(data.pbutton_gpio)}
|
||||
@@ -188,7 +185,7 @@ const SettingsApplication: FC = () => {
|
||||
<ValidatedTextField
|
||||
fieldErrors={fieldErrors}
|
||||
name="dallas_gpio"
|
||||
label="Temperature GPIO (0=disabled)"
|
||||
label={LL.TEMPERATURE() + ' GPIO (0=' + LL.DISABLED() + ')'}
|
||||
fullWidth
|
||||
variant="outlined"
|
||||
value={numberValue(data.dallas_gpio)}
|
||||
@@ -202,7 +199,7 @@ const SettingsApplication: FC = () => {
|
||||
<ValidatedTextField
|
||||
fieldErrors={fieldErrors}
|
||||
name="led_gpio"
|
||||
label="LED GPIO (0=disabled)"
|
||||
label={'LED GPIO (0=' + LL.DISABLED() + ')'}
|
||||
fullWidth
|
||||
variant="outlined"
|
||||
value={numberValue(data.led_gpio)}
|
||||
@@ -225,7 +222,7 @@ const SettingsApplication: FC = () => {
|
||||
margin="normal"
|
||||
select
|
||||
>
|
||||
<MenuItem value={0}>No Ethernet Module</MenuItem>
|
||||
<MenuItem value={0}>{LL.DISABLED()}</MenuItem>
|
||||
<MenuItem value={1}>LAN8720</MenuItem>
|
||||
<MenuItem value={2}>TLK110</MenuItem>
|
||||
</ValidatedTextField>
|
||||
@@ -235,7 +232,7 @@ const SettingsApplication: FC = () => {
|
||||
<Grid item>
|
||||
<ValidatedTextField
|
||||
name="eth_power"
|
||||
label="Eth Power GPIO (-1=disabled)"
|
||||
label={'Eth Power GPIO (-1=' + LL.DISABLED() + ')'}
|
||||
fullWidth
|
||||
variant="outlined"
|
||||
value={numberValue(data.eth_power)}
|
||||
@@ -281,7 +278,7 @@ const SettingsApplication: FC = () => {
|
||||
</>
|
||||
)}
|
||||
<Typography variant="h6" color="primary">
|
||||
EMS Bus Settings
|
||||
EMS Bus {LL.SETTINGS()}
|
||||
</Typography>
|
||||
<Grid container spacing={1} direction="row" justifyContent="flex-start" alignItems="flex-start">
|
||||
<Grid item xs={6}>
|
||||
@@ -323,7 +320,7 @@ const SettingsApplication: FC = () => {
|
||||
</Grid>
|
||||
</Grid>
|
||||
<Typography sx={{ pt: 2 }} variant="h6" color="primary">
|
||||
General Options
|
||||
{LL.GENERAL_OPTIONS()}
|
||||
</Typography>
|
||||
<Box
|
||||
sx={{
|
||||
@@ -332,7 +329,7 @@ const SettingsApplication: FC = () => {
|
||||
>
|
||||
<ValidatedTextField
|
||||
name="locale"
|
||||
label="Language (for device entities)"
|
||||
label={LL.LANGUAGE_ENTITIES()}
|
||||
disabled={saving}
|
||||
value={data.locale}
|
||||
variant="outlined"
|
||||
@@ -341,56 +338,56 @@ const SettingsApplication: FC = () => {
|
||||
size="small"
|
||||
select
|
||||
>
|
||||
<MenuItem value="en">English</MenuItem>
|
||||
<MenuItem value="de">Deutsch</MenuItem>
|
||||
<MenuItem value="en">English (en)</MenuItem>
|
||||
<MenuItem value="de">Deutsch (de)</MenuItem>
|
||||
</ValidatedTextField>
|
||||
</Box>
|
||||
{data.led_gpio !== 0 && (
|
||||
<BlockFormControlLabel
|
||||
control={<Checkbox checked={data.hide_led} onChange={updateFormValue} name="hide_led" />}
|
||||
label="Hide LED"
|
||||
label={LL.HIDE_LED()}
|
||||
disabled={saving}
|
||||
/>
|
||||
)}
|
||||
<BlockFormControlLabel
|
||||
control={<Checkbox checked={data.telnet_enabled} onChange={updateFormValue} name="telnet_enabled" />}
|
||||
label="Enable Telnet Console"
|
||||
label={LL.ENABLE_TELNET()}
|
||||
disabled={saving}
|
||||
/>
|
||||
<BlockFormControlLabel
|
||||
control={<Checkbox checked={data.analog_enabled} onChange={updateFormValue} name="analog_enabled" />}
|
||||
label="Enable Analog Sensors"
|
||||
label={LL.ENABLE_ANALOG()}
|
||||
disabled={saving}
|
||||
/>
|
||||
<BlockFormControlLabel
|
||||
control={<Checkbox checked={data.fahrenheit} onChange={updateFormValue} name="fahrenheit" />}
|
||||
label="Convert temperature values to Fahrenheit"
|
||||
label={LL.CONVERT_FAHRENHEIT()}
|
||||
disabled={saving}
|
||||
/>
|
||||
<BlockFormControlLabel
|
||||
control={<Checkbox checked={data.notoken_api} onChange={updateFormValue} name="notoken_api" />}
|
||||
label="Bypass Access Token authorization on API calls"
|
||||
label={LL.BYPASS_TOKEN()}
|
||||
disabled={saving}
|
||||
/>
|
||||
<BlockFormControlLabel
|
||||
control={<Checkbox checked={data.readonly_mode} onChange={updateFormValue} name="readonly_mode" />}
|
||||
label="Enable read-only mode (blocks all outgoing EMS Tx Write commands)"
|
||||
label={LL.READONLY()}
|
||||
disabled={saving}
|
||||
/>
|
||||
<BlockFormControlLabel
|
||||
control={<Checkbox checked={data.low_clock} onChange={updateFormValue} name="low_clock" />}
|
||||
label="Underclock CPU speed"
|
||||
label={LL.UNDERCLOCK_CPU()}
|
||||
disabled={saving}
|
||||
/>
|
||||
<Grid container spacing={0} direction="row" justifyContent="flex-start" alignItems="flex-start">
|
||||
<BlockFormControlLabel
|
||||
control={<Checkbox checked={data.shower_timer} onChange={updateFormValue} name="shower_timer" />}
|
||||
label="Enable Shower Timer"
|
||||
label={LL.ENABLE_SHOWER_TIMER()}
|
||||
disabled={saving}
|
||||
/>
|
||||
<BlockFormControlLabel
|
||||
control={<Checkbox checked={data.shower_alert} onChange={updateFormValue} name="shower_alert" />}
|
||||
label="Enable Shower Alert"
|
||||
label={LL.ENABLE_SHOWER_ALERT()}
|
||||
disabled={!data.shower_timer}
|
||||
/>
|
||||
{data.shower_alert && (
|
||||
@@ -399,9 +396,9 @@ const SettingsApplication: FC = () => {
|
||||
<ValidatedTextField
|
||||
fieldErrors={fieldErrors}
|
||||
name="shower_alert_trigger"
|
||||
label="Trigger Time"
|
||||
label={LL.TRIGGER_TIME()}
|
||||
InputProps={{
|
||||
endAdornment: <InputAdornment position="end">minutes</InputAdornment>
|
||||
endAdornment: <InputAdornment position="end">{LL.MINUTES()}</InputAdornment>
|
||||
}}
|
||||
variant="outlined"
|
||||
value={data.shower_alert_trigger}
|
||||
@@ -414,9 +411,9 @@ const SettingsApplication: FC = () => {
|
||||
<ValidatedTextField
|
||||
fieldErrors={fieldErrors}
|
||||
name="shower_alert_coldshot"
|
||||
label="Cold Shot Duration"
|
||||
label={LL.COLD_SHOT_DURATION()}
|
||||
InputProps={{
|
||||
endAdornment: <InputAdornment position="end">seconds</InputAdornment>
|
||||
endAdornment: <InputAdornment position="end">{LL.SECONDS()}</InputAdornment>
|
||||
}}
|
||||
variant="outlined"
|
||||
value={data.shower_alert_coldshot}
|
||||
@@ -429,13 +426,13 @@ const SettingsApplication: FC = () => {
|
||||
)}
|
||||
</Grid>
|
||||
<Typography sx={{ pt: 2 }} variant="h6" color="primary">
|
||||
Formatting Options
|
||||
{LL.FORMATTING_OPTIONS()}
|
||||
</Typography>
|
||||
<Grid container spacing={1} direction="row" justifyContent="flex-start" alignItems="flex-start">
|
||||
<Grid item xs={4}>
|
||||
<ValidatedTextField
|
||||
name="bool_dashboard"
|
||||
label="Boolean Format Dashboard"
|
||||
label={LL.BOOLEAN_FORMAT_DASHBOARD()}
|
||||
value={data.bool_dashboard}
|
||||
fullWidth
|
||||
variant="outlined"
|
||||
@@ -452,7 +449,7 @@ const SettingsApplication: FC = () => {
|
||||
<Grid item xs={4}>
|
||||
<ValidatedTextField
|
||||
name="bool_format"
|
||||
label="Boolean Format API/MQTT"
|
||||
label={LL.BOOLEAN_FORMAT_API()}
|
||||
value={data.bool_format}
|
||||
fullWidth
|
||||
variant="outlined"
|
||||
@@ -471,7 +468,7 @@ const SettingsApplication: FC = () => {
|
||||
<Grid item xs={4}>
|
||||
<ValidatedTextField
|
||||
name="enum_format"
|
||||
label="Enum Format API/MQTT"
|
||||
label={LL.ENUM_FORMAT()}
|
||||
value={data.enum_format}
|
||||
fullWidth
|
||||
variant="outlined"
|
||||
@@ -479,29 +476,29 @@ const SettingsApplication: FC = () => {
|
||||
margin="normal"
|
||||
select
|
||||
>
|
||||
<MenuItem value={1}>Value</MenuItem>
|
||||
<MenuItem value={2}>Index</MenuItem>
|
||||
<MenuItem value={1}>{LL.VALUE()}</MenuItem>
|
||||
<MenuItem value={2}>{LL.INDEX()}</MenuItem>
|
||||
</ValidatedTextField>
|
||||
</Grid>
|
||||
</Grid>
|
||||
{data.dallas_gpio !== 0 && (
|
||||
<>
|
||||
<Typography sx={{ pt: 2 }} variant="h6" color="primary">
|
||||
Temperature Sensors
|
||||
{LL.TEMP_SENSORS()}
|
||||
</Typography>
|
||||
<BlockFormControlLabel
|
||||
control={<Checkbox checked={data.dallas_parasite} onChange={updateFormValue} name="dallas_parasite" />}
|
||||
label="Enable parasite power"
|
||||
label={LL.ENABLE_PARASITE()}
|
||||
disabled={saving}
|
||||
/>
|
||||
</>
|
||||
)}
|
||||
<Typography sx={{ pt: 2 }} variant="h6" color="primary">
|
||||
Logging
|
||||
{LL.LOGGING()}
|
||||
</Typography>
|
||||
<BlockFormControlLabel
|
||||
control={<Checkbox checked={data.trace_raw} onChange={updateFormValue} name="trace_raw" />}
|
||||
label="Log EMS telegrams in hexadecimal"
|
||||
label={LL.LOG_HEX()}
|
||||
disabled={saving}
|
||||
/>
|
||||
<BlockFormControlLabel
|
||||
@@ -513,7 +510,7 @@ const SettingsApplication: FC = () => {
|
||||
disabled={saving}
|
||||
/>
|
||||
}
|
||||
label="Enable Syslog"
|
||||
label={LL.ENABLE_SYSLOG()}
|
||||
/>
|
||||
{data.syslog_enabled && (
|
||||
<Grid container spacing={1} direction="row" justifyContent="flex-start" alignItems="flex-start">
|
||||
@@ -568,9 +565,9 @@ const SettingsApplication: FC = () => {
|
||||
<ValidatedTextField
|
||||
fieldErrors={fieldErrors}
|
||||
name="syslog_mark_interval"
|
||||
label="Mark Interval"
|
||||
label={LL.MARK_INTERVAL()}
|
||||
InputProps={{
|
||||
endAdornment: <InputAdornment position="end">seconds</InputAdornment>
|
||||
endAdornment: <InputAdornment position="end">{LL.SECONDS()}</InputAdornment>
|
||||
}}
|
||||
fullWidth
|
||||
variant="outlined"
|
||||
@@ -584,9 +581,9 @@ const SettingsApplication: FC = () => {
|
||||
</Grid>
|
||||
)}
|
||||
{restartNeeded && (
|
||||
<MessageBox my={2} level="warning" message="EMS-ESP needs to be restarted to apply changed system settings">
|
||||
<MessageBox my={2} level="warning" message={LL.RESTART_TEXT()}>
|
||||
<Button startIcon={<PowerSettingsNewIcon />} variant="contained" color="error" onClick={restart}>
|
||||
Restart
|
||||
{LL.RESTART()}
|
||||
</Button>
|
||||
</MessageBox>
|
||||
)}
|
||||
@@ -600,7 +597,7 @@ const SettingsApplication: FC = () => {
|
||||
type="submit"
|
||||
onClick={validateAndSubmit}
|
||||
>
|
||||
Save
|
||||
{LL.SAVE()}
|
||||
</Button>
|
||||
</ButtonRow>
|
||||
)}
|
||||
@@ -609,7 +606,7 @@ const SettingsApplication: FC = () => {
|
||||
};
|
||||
|
||||
return (
|
||||
<SectionContent title="Application Settings" titleGutter>
|
||||
<SectionContent title={LL.APPLICATION_SETTINGS()} titleGutter>
|
||||
{content()}
|
||||
</SectionContent>
|
||||
);
|
||||
|
||||
@@ -44,9 +44,13 @@ import { extractErrorMessage } from '../utils';
|
||||
|
||||
import { DeviceShort, Devices, DeviceEntity, DeviceEntityMask } from './types';
|
||||
|
||||
import { useI18nContext } from '../i18n/i18n-react';
|
||||
|
||||
export const APIURL = window.location.origin + '/api/';
|
||||
|
||||
const SettingsCustomization: FC = () => {
|
||||
const { LL } = useI18nContext();
|
||||
|
||||
const { enqueueSnackbar } = useSnackbar();
|
||||
|
||||
const [deviceEntities, setDeviceEntities] = useState<DeviceEntity[]>([{ id: '', v: 0, n: '', m: 0, w: false }]);
|
||||
@@ -148,9 +152,9 @@ const SettingsCustomization: FC = () => {
|
||||
try {
|
||||
setDevices((await EMSESP.readDevices()).data);
|
||||
} catch (error: unknown) {
|
||||
setErrorMessage(extractErrorMessage(error, 'Failed to fetch device list'));
|
||||
setErrorMessage(extractErrorMessage(error, LL.PROBLEM_LOADING()));
|
||||
}
|
||||
}, []);
|
||||
}, [LL]);
|
||||
|
||||
const setInitialMask = (data: DeviceEntity[]) => {
|
||||
setDeviceEntities(data.map((de) => ({ ...de, om: de.m })));
|
||||
@@ -161,7 +165,7 @@ const SettingsCustomization: FC = () => {
|
||||
const data = (await EMSESP.readDeviceEntities({ id: unique_id })).data;
|
||||
setInitialMask(data);
|
||||
} catch (error: unknown) {
|
||||
setErrorMessage(extractErrorMessage(error, 'Problem fetching device entities'));
|
||||
setErrorMessage(extractErrorMessage(error, LL.PROBLEM_LOADING()));
|
||||
}
|
||||
};
|
||||
|
||||
@@ -184,7 +188,7 @@ const SettingsCustomization: FC = () => {
|
||||
if (de.n === undefined || de.n === de.id) {
|
||||
return de.id;
|
||||
} else if (de.n === '') {
|
||||
return 'Command: ' + de.id;
|
||||
return LL.COMMAND() + ': ' + de.id;
|
||||
}
|
||||
return (
|
||||
<>
|
||||
@@ -250,9 +254,9 @@ const SettingsCustomization: FC = () => {
|
||||
const resetCustomization = async () => {
|
||||
try {
|
||||
await EMSESP.resetCustomizations();
|
||||
enqueueSnackbar('All customizations have been removed. Restarting...', { variant: 'info' });
|
||||
enqueueSnackbar(LL.CUSTOMIZATIONS_RESTART(), { variant: 'info' });
|
||||
} catch (error: unknown) {
|
||||
enqueueSnackbar(extractErrorMessage(error, 'Problem resetting customizations'), { variant: 'error' });
|
||||
enqueueSnackbar(extractErrorMessage(error, LL.PROBLEM_UPDATING()), { variant: 'error' });
|
||||
} finally {
|
||||
setConfirmReset(false);
|
||||
}
|
||||
@@ -265,7 +269,7 @@ const SettingsCustomization: FC = () => {
|
||||
.map((new_de) => new_de.m.toString(16).padStart(2, '0') + new_de.id);
|
||||
|
||||
if (masked_entities.length > 60) {
|
||||
enqueueSnackbar('Selected entities exceeded limit of 60. Please Save in batches', { variant: 'warning' });
|
||||
enqueueSnackbar(LL.CUSTOMIZATIONS_FULL(), { variant: 'warning' });
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -275,12 +279,12 @@ const SettingsCustomization: FC = () => {
|
||||
entity_ids: masked_entities
|
||||
});
|
||||
if (response.status === 200) {
|
||||
enqueueSnackbar('Customization saved', { variant: 'success' });
|
||||
enqueueSnackbar(LL.CUSTOMIZATIONS_SAVED(), { variant: 'success' });
|
||||
} else {
|
||||
enqueueSnackbar('Customization save failed', { variant: 'error' });
|
||||
enqueueSnackbar(LL.PROBLEM_UPDATING(), { variant: 'error' });
|
||||
}
|
||||
} catch (error: unknown) {
|
||||
enqueueSnackbar(extractErrorMessage(error, 'Problem sending entity list'), { variant: 'error' });
|
||||
enqueueSnackbar(extractErrorMessage(error, LL.PROBLEM_UPDATING()), { variant: 'error' });
|
||||
}
|
||||
setInitialMask(deviceEntities);
|
||||
}
|
||||
@@ -294,21 +298,17 @@ const SettingsCustomization: FC = () => {
|
||||
return (
|
||||
<>
|
||||
<Box mb={2} color="warning.main">
|
||||
<Typography variant="body2">Select a device and customize the entities using the options:</Typography>
|
||||
<Typography variant="body2">{LL.CUSTOMIZATIONS_HELP_1()}:</Typography>
|
||||
<Typography variant="body2">
|
||||
<OptionIcon type="favorite" isSet={true} />
|
||||
=mark as favorite
|
||||
<OptionIcon type="readonly" isSet={true} />
|
||||
=disable write action
|
||||
<OptionIcon type="api_mqtt_exclude" isSet={true} />
|
||||
=exclude from MQTT and API
|
||||
<OptionIcon type="web_exclude" isSet={true} />
|
||||
=hide from Dashboard
|
||||
<OptionIcon type="favorite" isSet={true} />={LL.CUSTOMIZATIONS_HELP_2()}
|
||||
<OptionIcon type="readonly" isSet={true} />={LL.CUSTOMIZATIONS_HELP_3()}
|
||||
<OptionIcon type="api_mqtt_exclude" isSet={true} />={LL.CUSTOMIZATIONS_HELP_4()}
|
||||
<OptionIcon type="web_exclude" isSet={true} />={LL.CUSTOMIZATIONS_HELP_5()}
|
||||
</Typography>
|
||||
</Box>
|
||||
<ValidatedTextField
|
||||
name="device"
|
||||
label="EMS Device"
|
||||
label={'EMS ' + LL.DEVICE()}
|
||||
variant="outlined"
|
||||
fullWidth
|
||||
value={selectedDevice}
|
||||
@@ -317,7 +317,7 @@ const SettingsCustomization: FC = () => {
|
||||
select
|
||||
>
|
||||
<MenuItem disabled key={0} value={-1}>
|
||||
Select a device...
|
||||
{LL.SELECT_DEVICE()}...
|
||||
</MenuItem>
|
||||
{devices.devices.map((device: DeviceShort, index) => (
|
||||
<MenuItem key={index} value={index}>
|
||||
@@ -401,7 +401,7 @@ const SettingsCustomization: FC = () => {
|
||||
color="inherit"
|
||||
onClick={() => maskDisabled(false)}
|
||||
>
|
||||
set all
|
||||
{LL.SET_ALL()}
|
||||
<OptionIcon type="api_mqtt_exclude" isSet={false} />
|
||||
<OptionIcon type="web_exclude" isSet={false} />
|
||||
</Button>
|
||||
@@ -416,7 +416,7 @@ const SettingsCustomization: FC = () => {
|
||||
color="inherit"
|
||||
onClick={() => maskDisabled(true)}
|
||||
>
|
||||
set all
|
||||
{LL.SET_ALL()}
|
||||
<OptionIcon type="api_mqtt_exclude" isSet={true} />
|
||||
<OptionIcon type="web_exclude" isSet={true} />
|
||||
</Button>
|
||||
@@ -428,7 +428,7 @@ const SettingsCustomization: FC = () => {
|
||||
<>
|
||||
<Header>
|
||||
<HeaderRow>
|
||||
<HeaderCell stiff>OPTIONS</HeaderCell>
|
||||
<HeaderCell stiff>{LL.OPTIONS()}</HeaderCell>
|
||||
<HeaderCell resize>
|
||||
<Button
|
||||
fullWidth
|
||||
@@ -436,10 +436,10 @@ const SettingsCustomization: FC = () => {
|
||||
endIcon={getSortIcon(entity_sort.state, 'NAME')}
|
||||
onClick={() => entity_sort.fns.onToggleSort({ sortKey: 'NAME' })}
|
||||
>
|
||||
NAME
|
||||
{LL.NAME()}
|
||||
</Button>
|
||||
</HeaderCell>
|
||||
<HeaderCell resize>VALUE</HeaderCell>
|
||||
<HeaderCell resize>{LL.VALUE()}</HeaderCell>
|
||||
</HeaderRow>
|
||||
</Header>
|
||||
<Body>
|
||||
@@ -503,14 +503,11 @@ const SettingsCustomization: FC = () => {
|
||||
|
||||
const renderResetDialog = () => (
|
||||
<Dialog open={confirmReset} onClose={() => setConfirmReset(false)}>
|
||||
<DialogTitle>Reset</DialogTitle>
|
||||
<DialogContent dividers>
|
||||
Are you sure you want remove all customizations including the custom settings of the Temperature and Analog
|
||||
sensors?
|
||||
</DialogContent>
|
||||
<DialogTitle>{LL.RESET()}</DialogTitle>
|
||||
<DialogContent dividers>{LL.CUSTOMIZATIONS_RESET()}</DialogContent>
|
||||
<DialogActions>
|
||||
<Button startIcon={<CancelIcon />} variant="outlined" onClick={() => setConfirmReset(false)} color="secondary">
|
||||
Cancel
|
||||
{LL.CANCEL()}
|
||||
</Button>
|
||||
<Button
|
||||
startIcon={<SettingsBackupRestoreIcon />}
|
||||
@@ -519,7 +516,7 @@ const SettingsCustomization: FC = () => {
|
||||
autoFocus
|
||||
color="error"
|
||||
>
|
||||
Reset
|
||||
{LL.RESET()}
|
||||
</Button>
|
||||
</DialogActions>
|
||||
</Dialog>
|
||||
@@ -529,7 +526,7 @@ const SettingsCustomization: FC = () => {
|
||||
return (
|
||||
<>
|
||||
<Typography sx={{ pt: 2, pb: 2 }} variant="h6" color="primary">
|
||||
Device Entities
|
||||
{LL.DEVICE_ENTITIES()}
|
||||
</Typography>
|
||||
{renderDeviceList()}
|
||||
{renderDeviceData()}
|
||||
@@ -537,7 +534,7 @@ const SettingsCustomization: FC = () => {
|
||||
<Box flexGrow={1}>
|
||||
<ButtonRow>
|
||||
<Button startIcon={<SaveIcon />} variant="outlined" color="primary" onClick={() => saveCustomization()}>
|
||||
Save
|
||||
{LL.SAVE()}
|
||||
</Button>
|
||||
</ButtonRow>
|
||||
</Box>
|
||||
@@ -548,7 +545,7 @@ const SettingsCustomization: FC = () => {
|
||||
color="error"
|
||||
onClick={() => setConfirmReset(true)}
|
||||
>
|
||||
Reset
|
||||
{LL.RESET()}
|
||||
</Button>
|
||||
</ButtonRow>
|
||||
</Box>
|
||||
@@ -558,7 +555,7 @@ const SettingsCustomization: FC = () => {
|
||||
};
|
||||
|
||||
return (
|
||||
<SectionContent title="User Customization" titleGutter>
|
||||
<SectionContent title={LL.USER_CUSTOMIZATION()} titleGutter>
|
||||
{content()}
|
||||
</SectionContent>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user