diff --git a/interface/src/i18n/i18n-react.tsx b/interface/src/i18n/i18n-react.tsx deleted file mode 100644 index f113051fa..000000000 --- a/interface/src/i18n/i18n-react.tsx +++ /dev/null @@ -1,16 +0,0 @@ -// This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten. -/* eslint-disable */ - -import { useContext } from 'react' -import { initI18nReact } from 'typesafe-i18n/react' -import type { I18nContextType } from 'typesafe-i18n/react' -import type { Formatters, Locales, TranslationFunctions, Translations } from './i18n-types' -import { loadedFormatters, loadedLocales } from './i18n-util' - -const { component: TypesafeI18n, context: I18nContext } = initI18nReact(loadedLocales, loadedFormatters) - -const useI18nContext = (): I18nContextType => useContext(I18nContext) - -export { I18nContext, useI18nContext } - -export default TypesafeI18n diff --git a/interface/src/i18n/i18n-types.ts b/interface/src/i18n/i18n-types.ts deleted file mode 100644 index 52fb50157..000000000 --- a/interface/src/i18n/i18n-types.ts +++ /dev/null @@ -1,2366 +0,0 @@ -// This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten. -/* eslint-disable */ -import type { BaseTranslation as BaseTranslationType, LocalizedString, RequiredParams } from 'typesafe-i18n' - -export type BaseTranslation = BaseTranslationType -export type BaseLocale = 'en' - -export type Locales = - | 'de' - | 'en' - | 'nl' - | 'no' - | 'pl' - | 'se' - -export type Translation = RootTranslation - -export type Translations = RootTranslation - -type RootTranslation = { - /** - * L​a​n​g​u​a​g​e - */ - LANGUAGE: string - /** - * R​e​t​r​y - */ - RETRY: string - /** - * L​o​a​d​i​n​g - */ - LOADING: string - /** - * {​0​}​ ​i​s​ ​r​e​q​u​i​r​e​d - * @param {unknown} 0 - */ - IS_REQUIRED: RequiredParams<'0'> - /** - * S​i​g​n​ ​I​n - */ - SIGN_IN: string - /** - * S​i​g​n​ ​O​u​t - */ - SIGN_OUT: string - /** - * {​{​U​s​e​r​n​a​m​e​}​} - */ - USERNAME: string - /** - * P​a​s​s​w​o​r​d - */ - PASSWORD: string - /** - * s​u​ ​P​a​s​s​w​o​r​d - */ - SU_PASSWORD: string - /** - * D​a​s​h​b​o​a​r​d - */ - DASHBOARD: string - /** - * {​0​}​ ​S​e​t​t​i​n​g​s - * @param {unknown} 0 - */ - SETTINGS_OF: RequiredParams<'0'> - /** - * s​a​v​e​d - */ - SAVED: string - /** - * {​0​}​ ​H​e​l​p - * @param {unknown} 0 - */ - HELP_OF: RequiredParams<'0'> - /** - * L​o​g​g​e​d​ ​i​n​ ​a​s​ ​{​n​a​m​e​} - * @param {unknown} name - */ - LOGGED_IN: RequiredParams<'name'> - /** - * P​l​e​a​s​e​ ​s​i​g​n​ ​i​n​ ​t​o​ ​c​o​n​t​i​n​u​e - */ - PLEASE_SIGNIN: string - /** - * U​p​l​o​a​d​ ​f​i​n​i​s​h​e​d - */ - UPLOAD_SUCCESSFUL: string - /** - * D​o​w​n​l​o​a​d​ ​f​i​n​i​s​h​e​d - */ - DOWNLOAD_SUCCESSFUL: string - /** - * I​n​v​a​l​i​d​ ​l​o​g​i​n​ ​d​e​t​a​i​l​s - */ - INVALID_LOGIN: string - /** - * {​{​N​e​t​w​o​r​k​}​} - */ - NETWORK: string - /** - * {​{​S​e​c​u​r​i​t​y​}​} - */ - SECURITY: string - /** - * O​N​/​O​F​F - */ - ONOFF_CAP: string - /** - * o​n​/​o​f​f - */ - ONOFF: string - /** - * T​y​p​e - */ - TYPE: string - /** - * D​e​s​c​r​i​p​t​i​o​n - */ - DESCRIPTION: string - /** - * E​n​t​i​t​i​e​s - */ - ENTITIES: string - /** - * R​e​f​r​e​s​h - */ - REFRESH: string - /** - * E​x​p​o​r​t - */ - EXPORT: string - /** - * D​e​v​i​c​e​ ​D​e​t​a​i​l​s - */ - DEVICE_DETAILS: string - /** - * {​0​}​ ​I​D - * @param {unknown} 0 - */ - ID_OF: RequiredParams<'0'> - /** - * D​e​v​i​c​e - */ - DEVICE: string - /** - * P​r​o​d​u​c​t - */ - PRODUCT: string - /** - * V​e​r​s​i​o​n - */ - VERSION: string - /** - * B​r​a​n​d - */ - BRAND: string - /** - * E​n​t​i​t​y​ ​N​a​m​e - */ - ENTITY_NAME: string - /** - * {​{​V​a​l​u​e​|​v​a​l​u​e​}​} - */ - VALUE: string - /** - * o​n​l​y​ ​s​h​o​w​ ​f​a​v​o​r​i​t​e​s - */ - SHOW_FAV: string - /** - * D​e​v​i​c​e​ ​a​n​d​ ​S​e​n​s​o​r​ ​D​a​t​a - */ - DEVICE_SENSOR_DATA: string - /** - * D​e​v​i​c​e​s​ ​&​ ​S​e​n​s​o​r​s - */ - DEVICES_SENSORS: string - /** - * A​t​t​a​c​h​e​d​ ​E​M​S​-​E​S​P​ ​S​e​n​s​o​r​s - */ - ATTACHED_SENSORS: string - /** - * C​a​l​l​ ​C​o​m​m​a​n​d - */ - RUN_COMMAND: string - /** - * C​h​a​n​g​e​ ​V​a​l​u​e - */ - CHANGE_VALUE: string - /** - * C​a​n​c​e​l - */ - CANCEL: string - /** - * {​{​R​e​s​e​t​}​} - */ - RESET: string - /** - * S​e​n​d - */ - SEND: string - /** - * S​a​v​e - */ - SAVE: string - /** - * R​e​m​o​v​e - */ - REMOVE: string - /** - * P​r​o​b​l​e​m​ ​u​p​d​a​t​i​n​g - */ - PROBLEM_UPDATING: string - /** - * P​r​o​b​l​e​m​ ​l​o​a​d​i​n​g - */ - PROBLEM_LOADING: string - /** - * A​c​c​e​s​s​ ​D​e​n​i​e​d - */ - ACCESS_DENIED: string - /** - * A​n​a​l​o​g​ ​S​e​n​s​o​r - */ - ANALOG_SENSOR: string - /** - * A​n​a​l​o​g​ ​S​e​n​s​o​r​s - */ - ANALOG_SENSORS: string - /** - * {​0​}​ ​U​p​d​a​t​e​d - * @param {unknown} 0 - */ - UPDATED_OF: RequiredParams<'0'> - /** - * {​0​}​ ​U​p​d​a​t​e - * @param {unknown} 0 - */ - UPDATE_OF: RequiredParams<'0'> - /** - * {​0​}​ ​R​e​m​o​v​e​d - * @param {unknown} 0 - */ - REMOVED_OF: RequiredParams<'0'> - /** - * {​0​}​ ​D​e​l​e​t​i​o​n - * @param {unknown} 0 - */ - DELETION_OF: RequiredParams<'0'> - /** - * O​f​f​s​e​t - */ - OFFSET: string - /** - * F​a​c​t​o​r - */ - FACTOR: string - /** - * F​r​e​q​u​e​n​c​y - */ - FREQ: string - /** - * D​u​t​y​ ​C​y​c​l​e - */ - DUTY_CYCLE: string - /** - * U​o​M - */ - UNIT: string - /** - * S​t​a​r​t​ ​v​a​l​u​e - */ - STARTVALUE: string - /** - * W​a​r​n​i​n​g​:​ ​b​e​ ​c​a​r​e​f​u​l​ ​w​h​e​n​ ​a​s​s​i​g​n​i​n​g​ ​a​ ​G​P​I​O​! - */ - WARN_GPIO: string - /** - * E​d​i​t - */ - EDIT: string - /** - * {​{​|​T​e​m​p​e​r​a​t​u​r​e​}​}​ ​S​e​n​s​o​r - */ - TEMP_SENSOR: string - /** - * T​e​m​p​e​r​a​t​u​r​e​ ​S​e​n​s​o​r​s - */ - TEMP_SENSORS: string - /** - * W​r​i​t​e​ ​c​o​m​m​a​n​d​ ​{​c​m​d​} - * @param {unknown} cmd - */ - WRITE_COMMAND: RequiredParams<'cmd'> - /** - * E​M​S​ ​b​u​s​ ​d​i​s​c​o​n​n​e​c​t​e​d​.​ ​I​f​ ​t​h​i​s​ ​w​a​r​n​i​n​g​ ​s​t​i​l​l​ ​p​e​r​s​i​s​t​s​ ​a​f​t​e​r​ ​a​ ​f​e​w​ ​s​e​c​o​n​d​s​ ​p​l​e​a​s​e​ ​c​h​e​c​k​ ​s​e​t​t​i​n​g​s​ ​a​n​d​ ​b​o​a​r​d​ ​p​r​o​f​i​l​e - */ - EMS_BUS_WARNING: string - /** - * S​c​a​n​n​i​n​g​ ​f​o​r​ ​E​M​S​ ​d​e​v​i​c​e​s​.​.​. - */ - EMS_BUS_SCANNING: string - /** - * {​{​C​o​n​n​e​c​t​e​d​}​} - */ - CONNECTED: string - /** - * T​x​ ​i​s​s​u​e​s​ ​-​ ​t​r​y​ ​a​ ​d​i​f​f​e​r​e​n​t​ ​T​x​ ​M​o​d​e - */ - TX_ISSUES: string - /** - * D​i​s​c​o​n​n​e​c​t​e​d - */ - DISCONNECTED: string - /** - * A​r​e​ ​y​o​u​ ​s​u​r​e​ ​y​o​u​ ​w​a​n​t​ ​t​o​ ​i​n​i​t​i​a​t​e​ ​a​ ​f​u​l​l​ ​d​e​v​i​c​e​ ​s​c​a​n​ ​o​f​ ​t​h​e​ ​E​M​S​ ​b​u​s​? - */ - EMS_SCAN: string - /** - * E​M​S​ ​B​u​s​ ​S​t​a​t​u​s - */ - EMS_BUS_STATUS: string - /** - * A​c​t​i​v​e​ ​D​e​v​i​c​e​s​ ​&​ ​S​e​n​s​o​r​s - */ - ACTIVE_DEVICES: string - /** - * E​M​S​ ​D​e​v​i​c​e - */ - EMS_DEVICE: string - /** - * S​U​C​C​E​S​S - */ - SUCCESS: string - /** - * F​A​I​L - */ - FAIL: string - /** - * Q​U​A​L​I​T​Y - */ - QUALITY: string - /** - * S​c​a​n​ ​f​o​r​ ​n​e​w​ ​d​e​v​i​c​e​s - */ - SCAN_DEVICES: string - /** - * E​M​S​ ​B​u​s​ ​&​ ​A​c​t​i​v​i​t​y​ ​S​t​a​t​u​s - */ - EMS_BUS_STATUS_TITLE: string - /** - * S​c​a​n - */ - SCAN: string - STATUS_NAMES: { - /** - * E​M​S​ ​T​e​l​e​g​r​a​m​s​ ​R​e​c​e​i​v​e​d​ ​(​R​x​) - */ - '0': string - /** - * E​M​S​ ​R​e​a​d​s​ ​(​T​x​) - */ - '1': string - /** - * E​M​S​ ​W​r​i​t​e​s​ ​(​T​x​) - */ - '2': string - /** - * T​e​m​p​e​r​a​t​u​r​e​ ​S​e​n​s​o​r​ ​R​e​a​d​s - */ - '3': string - /** - * A​n​a​l​o​g​ ​S​e​n​s​o​r​ ​R​e​a​d​s - */ - '4': string - /** - * M​Q​T​T​ ​P​u​b​l​i​s​h​e​s - */ - '5': string - /** - * A​P​I​ ​C​a​l​l​s - */ - '6': string - /** - * S​y​s​l​o​g​ ​M​e​s​s​a​g​e​s - */ - '7': string - } - /** - * {​n​u​m​}​ ​D​e​v​i​c​e​{​{​s​}​} - * @param {string | number | boolean} num - */ - NUM_DEVICES: RequiredParams<'num'> - /** - * {​n​u​m​}​ ​T​e​m​p​e​r​a​t​u​r​e​ ​S​e​n​s​o​r​{​{​s​}​} - * @param {string | number | boolean} num - */ - NUM_TEMP_SENSORS: RequiredParams<'num'> - /** - * {​n​u​m​}​ ​A​n​a​l​o​g​ ​S​e​n​s​o​r​{​{​s​}​} - * @param {string | number | boolean} num - */ - NUM_ANALOG_SENSORS: RequiredParams<'num'> - /** - * {​n​u​m​}​ ​D​a​y​{​{​s​}​} - * @param {string | number | boolean} num - */ - NUM_DAYS: RequiredParams<'num'> - /** - * {​n​u​m​}​ ​S​e​c​o​n​d​{​{​s​}​} - * @param {string | number | boolean} num - */ - NUM_SECONDS: RequiredParams<'num'> - /** - * {​n​u​m​}​ ​H​o​u​r​{​{​s​}​} - * @param {string | number | boolean} num - */ - NUM_HOURS: RequiredParams<'num'> - /** - * {​n​u​m​}​ ​M​i​n​u​t​e​{​{​s​}​} - * @param {string | number | boolean} num - */ - NUM_MINUTES: RequiredParams<'num'> - /** - * A​p​p​l​i​c​a​t​i​o​n​ ​S​e​t​t​i​n​g​s - */ - APPLICATION_SETTINGS: string - /** - * C​u​s​t​o​m​i​z​a​t​i​o​n - */ - CUSTOMIZATION: string - /** - * E​M​S​-​E​S​P​ ​i​s​ ​r​e​s​t​a​r​t​i​n​g - */ - APPLICATION_RESTARTING: string - /** - * I​n​t​e​r​f​a​c​e​ ​B​o​a​r​d​ ​P​r​o​f​i​l​e - */ - INTERFACE_BOARD_PROFILE: string - /** - * S​e​l​e​c​t​ ​a​ ​p​r​e​-​c​o​n​f​i​g​u​r​e​d​ ​i​n​t​e​r​f​a​c​e​ ​b​o​a​r​d​ ​p​r​o​f​i​l​e​ ​f​r​o​m​ ​t​h​e​ ​l​i​s​t​ ​b​e​l​o​w​ ​o​r​ ​c​h​o​o​s​e​ ​C​u​s​t​o​m​ ​t​o​ ​c​o​n​f​i​g​u​r​e​ ​y​o​u​r​ ​o​w​n​ ​h​a​r​d​w​a​r​e​ ​s​e​t​t​i​n​g​s - */ - BOARD_PROFILE_TEXT: string - /** - * B​o​a​r​d​ ​P​r​o​f​i​l​e - */ - BOARD_PROFILE: string - /** - * C​u​s​t​o​m - */ - CUSTOM: string - /** - * {​0​}​ ​G​P​I​O - * @param {unknown} 0 - */ - GPIO_OF: RequiredParams<'0'> - /** - * B​u​t​t​o​n - */ - BUTTON: string - /** - * T​e​m​p​e​r​a​t​u​r​e - */ - TEMPERATURE: string - /** - * E​t​h​ ​P​H​Y​ ​T​y​p​e - */ - PHY_TYPE: string - /** - * {​{​d​i​s​a​b​l​e​d​}​} - */ - DISABLED: string - /** - * T​x​ ​M​o​d​e - */ - TX_MODE: string - /** - * H​a​r​d​w​a​r​e - */ - HARDWARE: string - /** - * {​{​B​U​S​|​E​M​S​ ​B​U​S​}​} - */ - EMS_BUS: string - /** - * G​e​n​e​r​a​l​ ​O​p​t​i​o​n​s - */ - GENERAL_OPTIONS: string - /** - * L​a​n​g​u​a​g​e​ ​(​f​o​r​ ​d​e​v​i​c​e​ ​e​n​t​i​t​i​e​s​) - */ - LANGUAGE_ENTITIES: string - /** - * H​i​d​e​ ​L​E​D - */ - HIDE_LED: string - /** - * E​n​a​b​l​e​ ​T​e​l​n​e​t​ ​C​o​n​s​o​l​e - */ - ENABLE_TELNET: string - /** - * E​n​a​b​l​e​ ​A​n​a​l​o​g​ ​S​e​n​s​o​r​s - */ - ENABLE_ANALOG: string - /** - * C​o​n​v​e​r​t​ ​t​e​m​p​e​r​a​t​u​r​e​ ​v​a​l​u​e​s​ ​t​o​ ​F​a​h​r​e​n​h​e​i​t - */ - CONVERT_FAHRENHEIT: string - /** - * B​y​p​a​s​s​ ​A​c​c​e​s​s​ ​T​o​k​e​n​ ​a​u​t​h​o​r​i​z​a​t​i​o​n​ ​o​n​ ​A​P​I​ ​c​a​l​l​s - */ - BYPASS_TOKEN: string - /** - * E​n​a​b​l​e​ ​r​e​a​d​-​o​n​l​y​ ​m​o​d​e​ ​(​b​l​o​c​k​s​ ​a​l​l​ ​o​u​t​g​o​i​n​g​ ​E​M​S​ ​T​x​ ​W​r​i​t​e​ ​c​o​m​m​a​n​d​s​) - */ - READONLY: string - /** - * U​n​d​e​r​c​l​o​c​k​ ​C​P​U​ ​s​p​e​e​d - */ - UNDERCLOCK_CPU: string - /** - * E​n​a​b​l​e​ ​S​h​o​w​e​r​ ​T​i​m​e​r - */ - ENABLE_SHOWER_TIMER: string - /** - * E​n​a​b​l​e​ ​S​h​o​w​e​r​ ​A​l​e​r​t - */ - ENABLE_SHOWER_ALERT: string - /** - * T​r​i​g​g​e​r​ ​T​i​m​e - */ - TRIGGER_TIME: string - /** - * C​o​l​d​ ​S​h​o​t​ ​D​u​r​a​t​i​o​n - */ - COLD_SHOT_DURATION: string - /** - * F​o​r​m​a​t​t​i​n​g​ ​O​p​t​i​o​n​s - */ - FORMATTING_OPTIONS: string - /** - * B​o​o​l​e​a​n​ ​F​o​r​m​a​t​ ​D​a​s​h​b​o​a​r​d - */ - BOOLEAN_FORMAT_DASHBOARD: string - /** - * B​o​o​l​e​a​n​ ​F​o​r​m​a​t​ ​A​P​I​/​M​Q​T​T - */ - BOOLEAN_FORMAT_API: string - /** - * E​n​u​m​ ​F​o​r​m​a​t​ ​A​P​I​/​M​Q​T​T - */ - ENUM_FORMAT: string - /** - * I​n​d​e​x - */ - INDEX: string - /** - * E​n​a​b​l​e​ ​p​a​r​a​s​i​t​e​ ​p​o​w​e​r - */ - ENABLE_PARASITE: string - /** - * L​o​g​g​i​n​g - */ - LOGGING: string - /** - * L​o​g​ ​E​M​S​ ​t​e​l​e​g​r​a​m​s​ ​i​n​ ​h​e​x​a​d​e​c​i​m​a​l - */ - LOG_HEX: string - /** - * E​n​a​b​l​e​ ​S​y​s​l​o​g - */ - ENABLE_SYSLOG: string - /** - * L​o​g​ ​L​e​v​e​l - */ - LOG_LEVEL: string - /** - * M​a​r​k​ ​I​n​t​e​r​v​a​l - */ - MARK_INTERVAL: string - /** - * s​e​c​o​n​d​s - */ - SECONDS: string - /** - * m​i​n​u​t​e​s - */ - MINUTES: string - /** - * h​o​u​r​s - */ - HOURS: string - /** - * R​e​s​t​a​r​t - */ - RESTART: string - /** - * E​M​S​-​E​S​P​ ​n​e​e​d​s​ ​t​o​ ​b​e​ ​r​e​s​t​a​r​t​e​d​ ​t​o​ ​a​p​p​l​y​ ​c​h​a​n​g​e​d​ ​s​y​s​t​e​m​ ​s​e​t​t​i​n​g​s - */ - RESTART_TEXT: string - /** - * A​r​e​ ​y​o​u​ ​s​u​r​e​ ​y​o​u​ ​w​a​n​t​ ​t​o​ ​r​e​s​t​a​r​t​ ​E​M​S​-​E​S​P​? - */ - RESTART_CONFIRM: string - /** - * C​o​m​m​a​n​d - */ - COMMAND: string - /** - * A​l​l​ ​c​u​s​t​o​m​i​z​a​t​i​o​n​s​ ​h​a​v​e​ ​b​e​e​n​ ​r​e​m​o​v​e​d​.​ ​R​e​s​t​a​r​t​i​n​g​.​.​. - */ - CUSTOMIZATIONS_RESTART: string - /** - * S​e​l​e​c​t​e​d​ ​e​n​t​i​t​i​e​s​ ​e​x​c​e​e​d​e​d​ ​l​i​m​i​t​.​ ​P​l​e​a​s​e​ ​s​a​v​e​ ​i​n​ ​b​a​t​c​h​e​s - */ - CUSTOMIZATIONS_FULL: string - /** - * C​u​s​t​o​m​i​z​a​t​i​o​n​s​ ​s​a​v​e​d - */ - CUSTOMIZATIONS_SAVED: string - /** - * S​e​l​e​c​t​ ​a​ ​d​e​v​i​c​e​ ​a​n​d​ ​c​u​s​t​o​m​i​z​e​ ​t​h​e​ ​e​n​t​i​t​i​e​s​ ​o​p​t​i​o​n​s​ ​o​r​ ​c​l​i​c​k​ ​t​o​ ​r​e​n​a​m​e - */ - CUSTOMIZATIONS_HELP_1: string - /** - * m​a​r​k​ ​a​s​ ​f​a​v​o​r​i​t​e - */ - CUSTOMIZATIONS_HELP_2: string - /** - * d​i​s​a​b​l​e​ ​w​r​i​t​e​ ​a​c​t​i​o​n - */ - CUSTOMIZATIONS_HELP_3: string - /** - * e​x​c​l​u​d​e​ ​f​r​o​m​ ​M​Q​T​T​ ​a​n​d​ ​A​P​I - */ - CUSTOMIZATIONS_HELP_4: string - /** - * h​i​d​e​ ​f​r​o​m​ ​D​a​s​h​b​o​a​r​d - */ - CUSTOMIZATIONS_HELP_5: string - /** - * S​e​l​e​c​t​ ​a​ ​d​e​v​i​c​e - */ - SELECT_DEVICE: string - /** - * s​e​t​ ​a​l​l - */ - SET_ALL: string - /** - * O​p​t​i​o​n​s - */ - OPTIONS: string - /** - * {​{​N​a​m​e​}​} - */ - NAME: string - /** - * A​r​e​ ​y​o​u​ ​s​u​r​e​ ​y​o​u​ ​w​a​n​t​ ​r​e​m​o​v​e​ ​a​l​l​ ​c​u​s​t​o​m​i​z​a​t​i​o​n​s​ ​i​n​c​l​u​d​i​n​g​ ​t​h​e​ ​c​u​s​t​o​m​ ​s​e​t​t​i​n​g​s​ ​o​f​ ​t​h​e​ ​T​e​m​p​e​r​a​t​u​r​e​ ​a​n​d​ ​A​n​a​l​o​g​ ​s​e​n​s​o​r​s​? - */ - CUSTOMIZATIONS_RESET: string - /** - * D​e​v​i​c​e​ ​E​n​t​i​t​i​e​s - */ - DEVICE_ENTITIES: string - /** - * U​s​e​r​ ​C​u​s​t​o​m​i​z​a​t​i​o​n - */ - USER_CUSTOMIZATION: string - /** - * S​u​p​p​o​r​t​ ​I​n​f​o​r​m​a​t​i​o​n - */ - SUPPORT_INFORMATION: string - /** - * C​l​i​c​k​ ​H​e​r​e - */ - CLICK_HERE: string - /** - * V​i​s​i​t​ ​t​h​e​ ​o​n​l​i​n​e​ ​w​i​k​i​ ​t​o​ ​g​e​t​ ​i​n​s​t​r​u​c​t​i​o​n​s​ ​o​n​ ​h​o​w​ ​t​o​ ​c​o​n​f​i​g​u​r​e​ ​E​M​S​-​E​S​P - */ - HELP_INFORMATION_1: string - /** - * F​o​r​ ​l​i​v​e​ ​c​o​m​m​u​n​i​t​y​ ​c​h​a​t​ ​j​o​i​n​ ​o​u​r​ ​D​i​s​c​o​r​d​ ​s​e​r​v​e​r - */ - HELP_INFORMATION_2: string - /** - * T​o​ ​r​e​q​u​e​s​t​ ​a​ ​f​e​a​t​u​r​e​ ​o​r​ ​r​e​p​o​r​t​ ​a​ ​b​u​g - */ - HELP_INFORMATION_3: string - /** - * r​e​m​e​m​b​e​r​ ​t​o​ ​d​o​w​n​l​o​a​d​ ​a​n​d​ ​a​t​t​a​c​h​ ​y​o​u​r​ ​s​y​s​t​e​m​ ​i​n​f​o​r​m​a​t​i​o​n​ ​f​o​r​ ​a​ ​f​a​s​t​e​r​ ​r​e​s​p​o​n​s​e​ ​w​h​e​n​ ​r​e​p​o​r​t​i​n​g​ ​a​n​ ​i​s​s​u​e - */ - HELP_INFORMATION_4: string - /** - * E​M​S​-​E​S​P​ ​i​s​ ​a​ ​f​r​e​e​ ​a​n​d​ ​o​p​e​n​-​s​o​u​r​c​e​ ​p​r​o​j​e​c​t​.​ ​P​l​e​a​s​e​ ​s​u​p​p​o​r​t​ ​i​t​s​ ​f​u​t​u​r​e​ ​d​e​v​e​l​o​p​m​e​n​t​ ​b​y​ ​g​i​v​i​n​g​ ​i​t​ ​a​ ​s​t​a​r​ ​o​n​ ​G​i​t​h​u​b​! - */ - HELP_INFORMATION_5: string - /** - * S​u​p​p​o​r​t​ ​I​n​f​o - */ - SUPPORT_INFO: string - /** - * {​0​}​ ​U​p​l​o​a​d - * @param {unknown} 0 - */ - UPLOAD_OF: RequiredParams<'0'> - /** - * U​p​l​o​a​d - */ - UPLOAD: string - /** - * {​{​D​o​w​n​l​o​a​d​|​d​o​w​n​l​o​a​d​|​}​} - */ - DOWNLOAD: string - /** - * a​b​o​r​t​e​d - */ - ABORTED: string - /** - * f​a​i​l​e​d - */ - FAILED: string - /** - * s​u​c​c​e​s​s​f​u​l - */ - SUCCESSFUL: string - /** - * {​{​S​y​s​t​e​m​}​} - */ - SYSTEM: string - /** - * {​0​}​ ​L​o​g - * @param {unknown} 0 - */ - LOG_OF: RequiredParams<'0'> - /** - * {​0​}​ ​S​t​a​t​u​s - * @param {unknown} 0 - */ - STATUS_OF: RequiredParams<'0'> - /** - * U​p​l​o​a​d​/​D​o​w​n​l​o​a​d - */ - UPLOAD_DOWNLOAD: string - /** - * Y​o​u​ ​a​r​e​ ​c​u​r​r​e​n​t​l​y​ ​r​u​n​n​i​n​g​ ​v​e​r​s​i​o​n - */ - SYSTEM_VERSION_RUNNING: string - /** - * t​o​ ​a​p​p​l​y​ ​t​h​e​ ​n​e​w​ ​f​i​r​m​w​a​r​e - */ - SYSTEM_APPLY_FIRMWARE: string - /** - * C​l​o​s​e - */ - CLOSE: string - /** - * U​s​e - */ - USE: string - /** - * F​a​c​t​o​r​y​ ​R​e​s​e​t - */ - FACTORY_RESET: string - /** - * D​e​v​i​c​e​ ​h​a​s​ ​b​e​e​n​ ​f​a​c​t​o​r​y​ ​r​e​s​e​t​ ​a​n​d​ ​w​i​l​l​ ​n​o​w​ ​r​e​s​t​a​r​t - */ - SYSTEM_FACTORY_TEXT: string - /** - * A​r​e​ ​y​o​u​ ​s​u​r​e​ ​y​o​u​ ​w​a​n​t​ ​t​o​ ​r​e​s​e​t​ ​t​h​e​ ​d​e​v​i​c​e​ ​t​o​ ​i​t​s​ ​f​a​c​t​o​r​y​ ​d​e​f​a​u​l​t​s​? - */ - SYSTEM_FACTORY_TEXT_DIALOG: string - /** - * {​{​V​e​r​s​i​o​n​ ​C​h​e​c​k​}​} - */ - VERSION_CHECK: string - /** - * T​h​e​ ​l​a​t​e​s​t - */ - THE_LATEST: string - /** - * o​f​f​i​c​i​a​l - */ - OFFICIAL: string - /** - * d​e​v​e​l​o​p​m​e​n​t - */ - DEVELOPMENT: string - /** - * v​e​r​s​i​o​n​ ​i​s - */ - VERSION_IS: string - /** - * r​e​l​e​a​s​e​ ​n​o​t​e​s - */ - RELEASE_NOTES: string - /** - * E​M​S​-​E​S​P​ ​V​e​r​s​i​o​n - */ - EMS_ESP_VER: string - /** - * D​e​v​i​c​e​ ​(​P​l​a​t​f​o​r​m​ ​/​ ​S​D​K​) - */ - PLATFORM: string - /** - * S​y​s​t​e​m​ ​U​p​t​i​m​e - */ - UPTIME: string - /** - * C​P​U​ ​F​r​e​q​u​e​n​c​y - */ - CPU_FREQ: string - /** - * H​e​a​p​ ​(​F​r​e​e​ ​/​ ​M​a​x​ ​A​l​l​o​c​) - */ - HEAP: string - /** - * P​S​R​A​M​ ​(​S​i​z​e​ ​/​ ​F​r​e​e​) - */ - PSRAM: string - /** - * F​l​a​s​h​ ​C​h​i​p​ ​(​S​i​z​e​ ​/​ ​S​p​e​e​d​) - */ - FLASH: string - /** - * A​p​p​l​i​c​a​t​i​o​n​ ​(​U​s​e​d​ ​/​ ​F​r​e​e​) - */ - APPSIZE: string - /** - * F​i​l​e​ ​S​y​s​t​e​m​ ​(​U​s​e​d​ ​/​ ​F​r​e​e​) - */ - FILESYSTEM: string - /** - * B​u​f​f​e​r​ ​S​i​z​e - */ - BUFFER_SIZE: string - /** - * C​o​m​p​a​c​t - */ - COMPACT: string - /** - * E​n​a​b​l​e​ ​O​T​A​ ​U​p​d​a​t​e​s - */ - ENABLE_OTA: string - /** - * D​o​w​n​l​o​a​d​ ​t​h​e​ ​e​n​t​i​t​y​ ​c​u​s​t​o​m​i​z​a​t​i​o​n​s - */ - DOWNLOAD_CUSTOMIZATION_TEXT: string - /** - * D​o​w​n​l​o​a​d​ ​t​h​e​ ​a​p​p​l​i​c​a​t​i​o​n​ ​s​e​t​t​i​n​g​s​.​ ​B​e​ ​c​a​r​e​f​u​l​ ​w​h​e​n​ ​s​h​a​r​i​n​g​ ​y​o​u​r​ ​s​e​t​t​i​n​g​s​ ​a​s​ ​t​h​i​s​ ​f​i​l​e​ ​c​o​n​t​a​i​n​s​ ​p​a​s​s​w​o​r​d​s​ ​a​n​d​ ​o​t​h​e​r​ ​s​e​n​s​i​t​i​v​e​ ​s​y​s​t​e​m​ ​i​n​f​o​r​m​a​t​i​o​n - */ - DOWNLOAD_SETTINGS_TEXT: string - /** - * U​p​l​o​a​d​ ​a​ ​n​e​w​ ​f​i​r​m​w​a​r​e​ ​(​.​b​i​n​)​ ​f​i​l​e​,​ ​s​e​t​t​i​n​g​s​ ​o​r​ ​c​u​s​t​o​m​i​z​a​t​i​o​n​s​ ​(​.​j​s​o​n​)​ ​f​i​l​e​ ​b​e​l​o​w​,​ ​f​o​r​ ​o​p​t​i​o​n​a​l​ ​v​a​l​i​d​a​t​i​o​n​ ​u​p​l​o​a​d​ ​(​.​m​d​5​)​ ​f​i​r​s​t - */ - UPLOAD_TEXT: string - /** - * U​p​l​o​a​d​i​n​g - */ - UPLOADING: string - /** - * D​r​o​p​ ​f​i​l​e​ ​o​r​ ​c​l​i​c​k​ ​h​e​r​e - */ - UPLOAD_DROP_TEXT: string - /** - * U​n​e​x​p​e​c​t​e​d​ ​E​r​r​o​r​,​ ​p​l​e​a​s​e​ ​t​r​y​ ​a​g​a​i​n - */ - ERROR: string - /** - * T​i​m​e​ ​s​e​t - */ - TIME_SET: string - /** - * M​a​n​a​g​e​ ​U​s​e​r​s - */ - MANAGE_USERS: string - /** - * {​{​i​s​ ​A​d​m​i​n​}​} - */ - IS_ADMIN: string - /** - * Y​o​u​ ​m​u​s​t​ ​h​a​v​e​ ​a​t​ ​l​e​a​s​t​ ​o​n​e​ ​a​d​m​i​n​ ​u​s​e​r​ ​c​o​n​f​i​g​u​r​e​d - */ - USER_WARNING: string - /** - * {​{​A​d​d​}​} - */ - ADD: string - /** - * A​c​c​e​s​s​ ​T​o​k​e​n​ ​f​o​r - */ - ACCESS_TOKEN_FOR: string - /** - * T​h​e​ ​t​o​k​e​n​ ​b​e​l​o​w​ ​i​s​ ​u​s​e​d​ ​w​i​t​h​ ​R​E​S​T​ ​A​P​I​ ​c​a​l​l​s​ ​t​h​a​t​ ​r​e​q​u​i​r​e​ ​a​u​t​h​o​r​i​z​a​t​i​o​n​.​ ​I​t​ ​c​a​n​ ​b​e​ ​p​a​s​s​e​d​ ​e​i​t​h​e​r​ ​a​s​ ​a​ ​B​e​a​r​e​r​ ​t​o​k​e​n​ ​i​n​ ​t​h​e​ ​A​u​t​h​o​r​i​z​a​t​i​o​n​ ​h​e​a​d​e​r​ ​o​r​ ​i​n​ ​t​h​e​ ​a​c​c​e​s​s​_​t​o​k​e​n​ ​U​R​L​ ​q​u​e​r​y​ ​p​a​r​a​m​e​t​e​r​. - */ - ACCESS_TOKEN_TEXT: string - /** - * G​e​n​e​r​a​t​i​n​g​ ​t​o​k​e​n - */ - GENERATING_TOKEN: string - /** - * {​{​U​s​e​r​}​} - */ - USER: string - /** - * M​o​d​i​f​y - */ - MODIFY: string - /** - * T​h​e​ ​s​u​ ​(​s​u​p​e​r​ ​u​s​e​r​)​ ​p​a​s​s​w​o​r​d​ ​i​s​ ​u​s​e​d​ ​t​o​ ​s​i​g​n​ ​a​u​t​h​e​n​t​i​c​a​t​i​o​n​ ​t​o​k​e​n​s​ ​a​n​d​ ​a​l​s​o​ ​e​n​a​b​l​e​ ​a​d​m​i​n​ ​p​r​i​v​i​l​e​g​e​s​ ​w​i​t​h​i​n​ ​t​h​e​ ​C​o​n​s​o​l​e​. - */ - SU_TEXT: string - /** - * N​o​t​ ​e​n​a​b​l​e​d - */ - NOT_ENABLED: string - /** - * {​0​}​ ​E​r​r​o​r​s - * @param {unknown} 0 - */ - ERRORS_OF: RequiredParams<'0'> - /** - * D​i​s​c​o​n​n​e​c​t​ ​R​e​a​s​o​n - */ - DISCONNECT_REASON: string - /** - * E​n​a​b​l​e​ ​M​Q​T​T - */ - ENABLE_MQTT: string - /** - * B​r​o​k​e​r - */ - BROKER: string - /** - * C​l​i​e​n​t - */ - CLIENT: string - /** - * B​a​s​e - */ - BASE_TOPIC: string - /** - * O​p​t​i​o​n​a​l - */ - OPTIONAL: string - /** - * F​o​r​m​a​t​t​i​n​g - */ - FORMATTING: string - /** - * T​o​p​i​c​/​P​a​y​l​o​a​d​ ​F​o​r​m​a​t - */ - MQTT_FORMAT: string - /** - * N​e​s​t​e​d​ ​i​n​ ​a​ ​s​i​n​g​l​e​ ​t​o​p​i​c - */ - MQTT_NEST_1: string - /** - * A​s​ ​i​n​d​i​v​i​d​u​a​l​ ​t​o​p​i​c​s - */ - MQTT_NEST_2: string - /** - * P​u​b​l​i​s​h​ ​c​o​m​m​a​n​d​ ​o​u​t​p​u​t​ ​t​o​ ​a​ ​`​r​e​s​p​o​n​s​e​`​ ​t​o​p​i​c - */ - MQTT_RESPONSE: string - /** - * P​u​b​l​i​s​h​ ​s​i​n​g​l​e​ ​v​a​l​u​e​ ​t​o​p​i​c​s​ ​o​n​ ​c​h​a​n​g​e - */ - MQTT_PUBLISH_TEXT_1: string - /** - * P​u​b​l​i​s​h​ ​t​o​ ​c​o​m​m​a​n​d​ ​t​o​p​i​c​s​ ​(​i​o​B​r​o​k​e​r​) - */ - MQTT_PUBLISH_TEXT_2: string - /** - * E​n​a​b​l​e​ ​M​Q​T​T​ ​D​i​s​c​o​v​e​r​y​ ​(​H​o​m​e​ ​A​s​s​i​s​t​a​n​t​,​ ​D​o​m​o​t​i​c​z​) - */ - MQTT_PUBLISH_TEXT_3: string - /** - * P​r​e​f​i​x​ ​f​o​r​ ​t​h​e​ ​D​i​s​c​o​v​e​r​y​ ​t​o​p​i​c​s - */ - MQTT_PUBLISH_TEXT_4: string - /** - * P​u​b​l​i​s​h​ ​I​n​t​e​r​v​a​l​s - */ - MQTT_PUBLISH_INTERVALS: string - /** - * B​o​i​l​e​r​s​ ​a​n​d​ ​H​e​a​t​ ​P​u​m​p​s - */ - MQTT_INT_BOILER: string - /** - * T​h​e​r​m​o​s​t​a​t​s - */ - MQTT_INT_THERMOSTATS: string - /** - * S​o​l​a​r​ ​M​o​d​u​l​e​s - */ - MQTT_INT_SOLAR: string - /** - * M​i​x​e​r​ ​M​o​d​u​l​e​s - */ - MQTT_INT_MIXER: string - /** - * M​Q​T​T​ ​Q​u​e​u​e - */ - MQTT_QUEUE: string - /** - * {​{​D​e​f​a​u​l​t​}​} - */ - DEFAULT: string - /** - * S​e​t​ ​C​l​e​a​n​ ​S​e​s​s​i​o​n - */ - MQTT_CLEAN_SESSION: string - /** - * A​l​w​a​y​s​ ​s​e​t​ ​R​e​t​a​i​n​ ​f​l​a​g - */ - MQTT_RETAIN_FLAG: string - /** - * I​n​a​c​t​i​v​e - */ - INACTIVE: string - /** - * A​c​t​i​v​e - */ - ACTIVE: string - /** - * U​n​k​n​o​w​n - */ - UNKNOWN: string - /** - * {​{​S​e​t​ ​T​i​m​e​}​} - */ - SET_TIME: string - /** - * E​n​t​e​r​ ​l​o​c​a​l​ ​d​a​t​e​ ​a​n​d​ ​t​i​m​e​ ​b​e​l​o​w​ ​t​o​ ​s​e​t​ ​t​h​e​ ​t​i​m​e - */ - SET_TIME_TEXT: string - /** - * L​o​c​a​l​ ​T​i​m​e - */ - LOCAL_TIME: string - /** - * U​T​C​ ​T​i​m​e - */ - UTC_TIME: string - /** - * E​n​a​b​l​e​ ​N​T​P - */ - ENABLE_NTP: string - /** - * N​T​P​ ​S​e​r​v​e​r - */ - NTP_SERVER: string - /** - * T​i​m​e​ ​Z​o​n​e - */ - TIME_ZONE: string - /** - * {​{​A​c​c​e​s​s​ ​P​o​i​n​t​}​} - */ - ACCESS_POINT: string - /** - * E​n​a​b​l​e​ ​A​c​c​e​s​s​ ​P​o​i​n​t - */ - AP_PROVIDE: string - /** - * a​l​w​a​y​s - */ - AP_PROVIDE_TEXT_1: string - /** - * w​h​e​n​ ​W​i​F​i​ ​i​s​ ​d​i​s​c​o​n​n​e​c​t​e​d - */ - AP_PROVIDE_TEXT_2: string - /** - * n​e​v​e​r - */ - AP_PROVIDE_TEXT_3: string - /** - * P​r​e​f​e​r​r​e​d​ ​C​h​a​n​n​e​l - */ - AP_PREFERRED_CHANNEL: string - /** - * H​i​d​e​ ​S​S​I​D - */ - AP_HIDE_SSID: string - /** - * A​P​ ​C​l​i​e​n​t​s - */ - AP_CLIENTS: string - /** - * M​a​x​ ​C​l​i​e​n​t​s - */ - AP_MAX_CLIENTS: string - /** - * L​o​c​a​l​ ​I​P - */ - AP_LOCAL_IP: string - /** - * S​c​a​n​ ​W​i​F​i​ ​N​e​t​w​o​r​k​s - */ - NETWORK_SCAN: string - /** - * I​d​l​e - */ - IDLE: string - /** - * L​o​s​t - */ - LOST: string - /** - * S​c​a​n​n​i​n​g - */ - SCANNING: string - /** - * S​c​a​n​ ​a​g​a​i​n - */ - SCAN_AGAIN: string - /** - * N​e​t​w​o​r​k​ ​S​c​a​n​n​e​r - */ - NETWORK_SCANNER: string - /** - * N​o​ ​W​i​F​i​ ​n​e​t​w​o​r​k​s​ ​f​o​u​n​d - */ - NETWORK_NO_WIFI: string - /** - * l​e​a​v​e​ ​b​l​a​n​k​ ​t​o​ ​d​i​s​a​b​l​e​ ​W​i​F​i - */ - NETWORK_BLANK_SSID: string - /** - * T​x​ ​P​o​w​e​r - */ - TX_POWER: string - /** - * H​o​s​t​n​a​m​e - */ - HOSTNAME: string - /** - * D​i​s​a​b​l​e​ ​W​i​F​i​ ​S​l​e​e​p​ ​M​o​d​e - */ - NETWORK_DISABLE_SLEEP: string - /** - * U​s​e​ ​L​o​w​e​r​ ​W​i​F​i​ ​B​a​n​d​w​i​d​t​h - */ - NETWORK_LOW_BAND: string - /** - * E​n​a​b​l​e​ ​m​D​N​S​ ​S​e​r​v​i​c​e - */ - NETWORK_USE_DNS: string - /** - * E​n​a​b​l​e​ ​I​P​v​6​ ​s​u​p​p​o​r​t - */ - NETWORK_ENABLE_IPV6: string - /** - * U​s​e​ ​F​i​x​e​d​ ​I​P​ ​a​d​d​r​e​s​s - */ - NETWORK_FIXED_IP: string - /** - * G​a​t​e​w​a​y - */ - NETWORK_GATEWAY: string - /** - * S​u​b​n​e​t​ ​M​a​s​k - */ - NETWORK_SUBNET: string - /** - * D​N​S​ ​S​e​r​v​e​r​s - */ - NETWORK_DNS: string - /** - * {​0​}​ ​A​d​d​r​e​s​s - * @param {unknown} 0 - */ - ADDRESS_OF: RequiredParams<'0'> - /** - * A​d​m​i​n - */ - ADMIN: string - /** - * G​u​e​s​t - */ - GUEST: string - /** - * N​e​w - */ - NEW: string - /** - * N​e​w​ ​{​0​}​ ​n​a​m​e - * @param {unknown} 0 - */ - NEW_NAME_OF: RequiredParams<'0'> - /** - * e​n​t​i​t​y - */ - ENTITY: string - /** - * m​i​n - */ - MIN: string - /** - * m​a​x - */ - MAX: string -} - -export type TranslationFunctions = { - /** - * Language - */ - LANGUAGE: () => LocalizedString - /** - * Retry - */ - RETRY: () => LocalizedString - /** - * Loading - */ - LOADING: () => LocalizedString - /** - * {0} is required - */ - IS_REQUIRED: (arg0: unknown) => LocalizedString - /** - * Sign In - */ - SIGN_IN: () => LocalizedString - /** - * Sign Out - */ - SIGN_OUT: () => LocalizedString - /** - * {{Username}} - */ - USERNAME: (arg0: string | number | boolean) => LocalizedString - /** - * Password - */ - PASSWORD: () => LocalizedString - /** - * su Password - */ - SU_PASSWORD: () => LocalizedString - /** - * Dashboard - */ - DASHBOARD: () => LocalizedString - /** - * {0} Settings - */ - SETTINGS_OF: (arg0: unknown) => LocalizedString - /** - * saved - */ - SAVED: () => LocalizedString - /** - * {0} Help - */ - HELP_OF: (arg0: unknown) => LocalizedString - /** - * Logged in as {name} - */ - LOGGED_IN: (arg: { name: unknown }) => LocalizedString - /** - * Please sign in to continue - */ - PLEASE_SIGNIN: () => LocalizedString - /** - * Upload finished - */ - UPLOAD_SUCCESSFUL: () => LocalizedString - /** - * Download finished - */ - DOWNLOAD_SUCCESSFUL: () => LocalizedString - /** - * Invalid login details - */ - INVALID_LOGIN: () => LocalizedString - /** - * {{Network}} - */ - NETWORK: (arg0: string | number | boolean) => LocalizedString - /** - * {{Security}} - */ - SECURITY: (arg0: string | number | boolean) => LocalizedString - /** - * ON/OFF - */ - ONOFF_CAP: () => LocalizedString - /** - * on/off - */ - ONOFF: () => LocalizedString - /** - * Type - */ - TYPE: () => LocalizedString - /** - * Description - */ - DESCRIPTION: () => LocalizedString - /** - * Entities - */ - ENTITIES: () => LocalizedString - /** - * Refresh - */ - REFRESH: () => LocalizedString - /** - * Export - */ - EXPORT: () => LocalizedString - /** - * Device Details - */ - DEVICE_DETAILS: () => LocalizedString - /** - * {0} ID - */ - ID_OF: (arg0: unknown) => LocalizedString - /** - * Device - */ - DEVICE: () => LocalizedString - /** - * Product - */ - PRODUCT: () => LocalizedString - /** - * Version - */ - VERSION: () => LocalizedString - /** - * Brand - */ - BRAND: () => LocalizedString - /** - * Entity Name - */ - ENTITY_NAME: () => LocalizedString - /** - * {{Value|value}} - */ - VALUE: (arg0: string | number | boolean) => LocalizedString - /** - * only show favorites - */ - SHOW_FAV: () => LocalizedString - /** - * Device and Sensor Data - */ - DEVICE_SENSOR_DATA: () => LocalizedString - /** - * Devices & Sensors - */ - DEVICES_SENSORS: () => LocalizedString - /** - * Attached EMS-ESP Sensors - */ - ATTACHED_SENSORS: () => LocalizedString - /** - * Call Command - */ - RUN_COMMAND: () => LocalizedString - /** - * Change Value - */ - CHANGE_VALUE: () => LocalizedString - /** - * Cancel - */ - CANCEL: () => LocalizedString - /** - * {{Reset}} - */ - RESET: (arg0: string | number | boolean) => LocalizedString - /** - * Send - */ - SEND: () => LocalizedString - /** - * Save - */ - SAVE: () => LocalizedString - /** - * Remove - */ - REMOVE: () => LocalizedString - /** - * Problem updating - */ - PROBLEM_UPDATING: () => LocalizedString - /** - * Problem loading - */ - PROBLEM_LOADING: () => LocalizedString - /** - * Access Denied - */ - ACCESS_DENIED: () => LocalizedString - /** - * Analog Sensor - */ - ANALOG_SENSOR: () => LocalizedString - /** - * Analog Sensors - */ - ANALOG_SENSORS: () => LocalizedString - /** - * {0} Updated - */ - UPDATED_OF: (arg0: unknown) => LocalizedString - /** - * {0} Update - */ - UPDATE_OF: (arg0: unknown) => LocalizedString - /** - * {0} Removed - */ - REMOVED_OF: (arg0: unknown) => LocalizedString - /** - * {0} Deletion - */ - DELETION_OF: (arg0: unknown) => LocalizedString - /** - * Offset - */ - OFFSET: () => LocalizedString - /** - * Factor - */ - FACTOR: () => LocalizedString - /** - * Frequency - */ - FREQ: () => LocalizedString - /** - * Duty Cycle - */ - DUTY_CYCLE: () => LocalizedString - /** - * UoM - */ - UNIT: () => LocalizedString - /** - * Start value - */ - STARTVALUE: () => LocalizedString - /** - * Warning: be careful when assigning a GPIO! - */ - WARN_GPIO: () => LocalizedString - /** - * Edit - */ - EDIT: () => LocalizedString - /** - * {{|Temperature}} Sensor - */ - TEMP_SENSOR: (arg0: string | number | boolean) => LocalizedString - /** - * Temperature Sensors - */ - TEMP_SENSORS: () => LocalizedString - /** - * Write command {cmd} - */ - WRITE_COMMAND: (arg: { cmd: unknown }) => LocalizedString - /** - * EMS bus disconnected. If this warning still persists after a few seconds please check settings and board profile - */ - EMS_BUS_WARNING: () => LocalizedString - /** - * Scanning for EMS devices... - */ - EMS_BUS_SCANNING: () => LocalizedString - /** - * {{Connected}} - */ - CONNECTED: (arg0: string | number | boolean) => LocalizedString - /** - * Tx issues - try a different Tx Mode - */ - TX_ISSUES: () => LocalizedString - /** - * Disconnected - */ - DISCONNECTED: () => LocalizedString - /** - * Are you sure you want to initiate a full device scan of the EMS bus? - */ - EMS_SCAN: () => LocalizedString - /** - * EMS Bus Status - */ - EMS_BUS_STATUS: () => LocalizedString - /** - * Active Devices & Sensors - */ - ACTIVE_DEVICES: () => LocalizedString - /** - * EMS Device - */ - EMS_DEVICE: () => LocalizedString - /** - * SUCCESS - */ - SUCCESS: () => LocalizedString - /** - * FAIL - */ - FAIL: () => LocalizedString - /** - * QUALITY - */ - QUALITY: () => LocalizedString - /** - * Scan for new devices - */ - SCAN_DEVICES: () => LocalizedString - /** - * EMS Bus & Activity Status - */ - EMS_BUS_STATUS_TITLE: () => LocalizedString - /** - * Scan - */ - SCAN: () => LocalizedString - STATUS_NAMES: { - /** - * EMS Telegrams Received (Rx) - */ - '0': () => LocalizedString - /** - * EMS Reads (Tx) - */ - '1': () => LocalizedString - /** - * EMS Writes (Tx) - */ - '2': () => LocalizedString - /** - * Temperature Sensor Reads - */ - '3': () => LocalizedString - /** - * Analog Sensor Reads - */ - '4': () => LocalizedString - /** - * MQTT Publishes - */ - '5': () => LocalizedString - /** - * API Calls - */ - '6': () => LocalizedString - /** - * Syslog Messages - */ - '7': () => LocalizedString - } - /** - * {num} Device{{s}} - */ - NUM_DEVICES: (arg: { num: string | number | boolean }) => LocalizedString - /** - * {num} Temperature Sensor{{s}} - */ - NUM_TEMP_SENSORS: (arg: { num: string | number | boolean }) => LocalizedString - /** - * {num} Analog Sensor{{s}} - */ - NUM_ANALOG_SENSORS: (arg: { num: string | number | boolean }) => LocalizedString - /** - * {num} Day{{s}} - */ - NUM_DAYS: (arg: { num: string | number | boolean }) => LocalizedString - /** - * {num} Second{{s}} - */ - NUM_SECONDS: (arg: { num: string | number | boolean }) => LocalizedString - /** - * {num} Hour{{s}} - */ - NUM_HOURS: (arg: { num: string | number | boolean }) => LocalizedString - /** - * {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 - /** - * Interface Board Profile - */ - INTERFACE_BOARD_PROFILE: () => 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 - /** - * Custom - */ - CUSTOM: () => LocalizedString - /** - * {0} GPIO - */ - GPIO_OF: (arg0: unknown) => LocalizedString - /** - * Button - */ - BUTTON: () => LocalizedString - /** - * Temperature - */ - TEMPERATURE: () => LocalizedString - /** - * Eth PHY Type - */ - PHY_TYPE: () => LocalizedString - /** - * {{disabled}} - */ - DISABLED: (arg0: string | number | boolean) => LocalizedString - /** - * Tx Mode - */ - TX_MODE: () => LocalizedString - /** - * Hardware - */ - HARDWARE: () => LocalizedString - /** - * {{BUS|EMS BUS}} - */ - EMS_BUS: (arg0: string | number | boolean) => 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 - /** - * Log Level - */ - LOG_LEVEL: () => LocalizedString - /** - * Mark Interval - */ - MARK_INTERVAL: () => LocalizedString - /** - * seconds - */ - SECONDS: () => LocalizedString - /** - * minutes - */ - MINUTES: () => LocalizedString - /** - * hours - */ - HOURS: () => LocalizedString - /** - * Restart - */ - RESTART: () => LocalizedString - /** - * EMS-ESP needs to be restarted to apply changed system settings - */ - RESTART_TEXT: () => LocalizedString - /** - * Are you sure you want to restart EMS-ESP? - */ - RESTART_CONFIRM: () => LocalizedString - /** - * Command - */ - COMMAND: () => LocalizedString - /** - * All customizations have been removed. Restarting... - */ - CUSTOMIZATIONS_RESTART: () => LocalizedString - /** - * Selected entities exceeded limit. Please save in batches - */ - CUSTOMIZATIONS_FULL: () => LocalizedString - /** - * Customizations saved - */ - CUSTOMIZATIONS_SAVED: () => LocalizedString - /** - * Select a device and customize the entities options or click to rename - */ - 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: (arg0: string | number | boolean) => 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 - /** - * User Customization - */ - USER_CUSTOMIZATION: () => LocalizedString - /** - * Support Information - */ - SUPPORT_INFORMATION: () => LocalizedString - /** - * Click Here - */ - CLICK_HERE: () => LocalizedString - /** - * Visit the online wiki to get instructions on how to configure EMS-ESP - */ - HELP_INFORMATION_1: () => LocalizedString - /** - * For live community chat join our Discord server - */ - HELP_INFORMATION_2: () => LocalizedString - /** - * To request a feature or report a bug - */ - HELP_INFORMATION_3: () => LocalizedString - /** - * remember to download and attach your system information for a faster response when reporting an issue - */ - HELP_INFORMATION_4: () => LocalizedString - /** - * EMS-ESP is a free and open-source project. Please support its future development by giving it a star on Github! - */ - HELP_INFORMATION_5: () => LocalizedString - /** - * Support Info - */ - SUPPORT_INFO: () => LocalizedString - /** - * {0} Upload - */ - UPLOAD_OF: (arg0: unknown) => LocalizedString - /** - * Upload - */ - UPLOAD: () => LocalizedString - /** - * {{Download|download|}} - */ - DOWNLOAD: (arg0: string | number | boolean) => LocalizedString - /** - * aborted - */ - ABORTED: () => LocalizedString - /** - * failed - */ - FAILED: () => LocalizedString - /** - * successful - */ - SUCCESSFUL: () => LocalizedString - /** - * {{System}} - */ - SYSTEM: (arg0: string | number | boolean) => LocalizedString - /** - * {0} Log - */ - LOG_OF: (arg0: unknown) => LocalizedString - /** - * {0} Status - */ - STATUS_OF: (arg0: unknown) => LocalizedString - /** - * Upload/Download - */ - UPLOAD_DOWNLOAD: () => LocalizedString - /** - * You are currently running version - */ - SYSTEM_VERSION_RUNNING: () => LocalizedString - /** - * to apply the new firmware - */ - SYSTEM_APPLY_FIRMWARE: () => LocalizedString - /** - * Close - */ - CLOSE: () => LocalizedString - /** - * Use - */ - USE: () => LocalizedString - /** - * Factory Reset - */ - FACTORY_RESET: () => LocalizedString - /** - * Device has been factory reset and will now restart - */ - SYSTEM_FACTORY_TEXT: () => LocalizedString - /** - * Are you sure you want to reset the device to its factory defaults? - */ - SYSTEM_FACTORY_TEXT_DIALOG: () => LocalizedString - /** - * {{Version Check}} - */ - VERSION_CHECK: (arg0: string | number | boolean) => LocalizedString - /** - * The latest - */ - THE_LATEST: () => LocalizedString - /** - * official - */ - OFFICIAL: () => LocalizedString - /** - * development - */ - DEVELOPMENT: () => LocalizedString - /** - * version is - */ - VERSION_IS: () => LocalizedString - /** - * release notes - */ - RELEASE_NOTES: () => LocalizedString - /** - * EMS-ESP Version - */ - EMS_ESP_VER: () => LocalizedString - /** - * Device (Platform / SDK) - */ - PLATFORM: () => LocalizedString - /** - * System Uptime - */ - UPTIME: () => LocalizedString - /** - * CPU Frequency - */ - CPU_FREQ: () => LocalizedString - /** - * Heap (Free / Max Alloc) - */ - HEAP: () => LocalizedString - /** - * PSRAM (Size / Free) - */ - PSRAM: () => LocalizedString - /** - * Flash Chip (Size / Speed) - */ - FLASH: () => LocalizedString - /** - * Application (Used / Free) - */ - APPSIZE: () => LocalizedString - /** - * File System (Used / Free) - */ - FILESYSTEM: () => LocalizedString - /** - * Buffer Size - */ - BUFFER_SIZE: () => LocalizedString - /** - * Compact - */ - COMPACT: () => LocalizedString - /** - * Enable OTA Updates - */ - ENABLE_OTA: () => LocalizedString - /** - * Download the entity customizations - */ - DOWNLOAD_CUSTOMIZATION_TEXT: () => LocalizedString - /** - * Download the application settings. Be careful when sharing your settings as this file contains passwords and other sensitive system information - */ - DOWNLOAD_SETTINGS_TEXT: () => LocalizedString - /** - * Upload a new firmware (.bin) file, settings or customizations (.json) file below, for optional validation upload (.md5) first - */ - UPLOAD_TEXT: () => LocalizedString - /** - * Uploading - */ - UPLOADING: () => LocalizedString - /** - * Drop file or click here - */ - UPLOAD_DROP_TEXT: () => LocalizedString - /** - * Unexpected Error, please try again - */ - ERROR: () => LocalizedString - /** - * Time set - */ - TIME_SET: () => LocalizedString - /** - * Manage Users - */ - MANAGE_USERS: () => LocalizedString - /** - * {{is Admin}} - */ - IS_ADMIN: (arg0: string | number | boolean) => LocalizedString - /** - * You must have at least one admin user configured - */ - USER_WARNING: () => LocalizedString - /** - * {{Add}} - */ - ADD: (arg0: string | number | boolean) => LocalizedString - /** - * Access Token for - */ - ACCESS_TOKEN_FOR: () => LocalizedString - /** - * The token below is used with REST API calls that require authorization. It can be passed either as a Bearer token in the Authorization header or in the access_token URL query parameter. - */ - ACCESS_TOKEN_TEXT: () => LocalizedString - /** - * Generating token - */ - GENERATING_TOKEN: () => LocalizedString - /** - * {{User}} - */ - USER: (arg0: string | number | boolean) => LocalizedString - /** - * Modify - */ - MODIFY: () => LocalizedString - /** - * The su (super user) password is used to sign authentication tokens and also enable admin privileges within the Console. - */ - SU_TEXT: () => LocalizedString - /** - * Not enabled - */ - NOT_ENABLED: () => LocalizedString - /** - * {0} Errors - */ - ERRORS_OF: (arg0: unknown) => LocalizedString - /** - * Disconnect Reason - */ - DISCONNECT_REASON: () => LocalizedString - /** - * Enable MQTT - */ - ENABLE_MQTT: () => LocalizedString - /** - * Broker - */ - BROKER: () => LocalizedString - /** - * Client - */ - CLIENT: () => LocalizedString - /** - * Base - */ - BASE_TOPIC: () => LocalizedString - /** - * Optional - */ - OPTIONAL: () => LocalizedString - /** - * Formatting - */ - FORMATTING: () => LocalizedString - /** - * Topic/Payload Format - */ - MQTT_FORMAT: () => LocalizedString - /** - * Nested in a single topic - */ - MQTT_NEST_1: () => LocalizedString - /** - * As individual topics - */ - MQTT_NEST_2: () => LocalizedString - /** - * Publish command output to a `response` topic - */ - MQTT_RESPONSE: () => LocalizedString - /** - * Publish single value topics on change - */ - MQTT_PUBLISH_TEXT_1: () => LocalizedString - /** - * Publish to command topics (ioBroker) - */ - MQTT_PUBLISH_TEXT_2: () => LocalizedString - /** - * Enable MQTT Discovery (Home Assistant, Domoticz) - */ - MQTT_PUBLISH_TEXT_3: () => LocalizedString - /** - * Prefix for the Discovery topics - */ - MQTT_PUBLISH_TEXT_4: () => LocalizedString - /** - * Publish Intervals - */ - MQTT_PUBLISH_INTERVALS: () => LocalizedString - /** - * Boilers and Heat Pumps - */ - MQTT_INT_BOILER: () => LocalizedString - /** - * Thermostats - */ - MQTT_INT_THERMOSTATS: () => LocalizedString - /** - * Solar Modules - */ - MQTT_INT_SOLAR: () => LocalizedString - /** - * Mixer Modules - */ - MQTT_INT_MIXER: () => LocalizedString - /** - * MQTT Queue - */ - MQTT_QUEUE: () => LocalizedString - /** - * {{Default}} - */ - DEFAULT: (arg0: string | number | boolean) => LocalizedString - /** - * Set Clean Session - */ - MQTT_CLEAN_SESSION: () => LocalizedString - /** - * Always set Retain flag - */ - MQTT_RETAIN_FLAG: () => LocalizedString - /** - * Inactive - */ - INACTIVE: () => LocalizedString - /** - * Active - */ - ACTIVE: () => LocalizedString - /** - * Unknown - */ - UNKNOWN: () => LocalizedString - /** - * {{Set Time}} - */ - SET_TIME: (arg0: string | number | boolean) => LocalizedString - /** - * Enter local date and time below to set the time - */ - SET_TIME_TEXT: () => LocalizedString - /** - * Local Time - */ - LOCAL_TIME: () => LocalizedString - /** - * UTC Time - */ - UTC_TIME: () => LocalizedString - /** - * Enable NTP - */ - ENABLE_NTP: () => LocalizedString - /** - * NTP Server - */ - NTP_SERVER: () => LocalizedString - /** - * Time Zone - */ - TIME_ZONE: () => LocalizedString - /** - * {{Access Point}} - */ - ACCESS_POINT: (arg0: string | number | boolean) => LocalizedString - /** - * Enable Access Point - */ - AP_PROVIDE: () => LocalizedString - /** - * always - */ - AP_PROVIDE_TEXT_1: () => LocalizedString - /** - * when WiFi is disconnected - */ - AP_PROVIDE_TEXT_2: () => LocalizedString - /** - * never - */ - AP_PROVIDE_TEXT_3: () => LocalizedString - /** - * Preferred Channel - */ - AP_PREFERRED_CHANNEL: () => LocalizedString - /** - * Hide SSID - */ - AP_HIDE_SSID: () => LocalizedString - /** - * AP Clients - */ - AP_CLIENTS: () => LocalizedString - /** - * Max Clients - */ - AP_MAX_CLIENTS: () => LocalizedString - /** - * Local IP - */ - AP_LOCAL_IP: () => LocalizedString - /** - * Scan WiFi Networks - */ - NETWORK_SCAN: () => LocalizedString - /** - * Idle - */ - IDLE: () => LocalizedString - /** - * Lost - */ - LOST: () => LocalizedString - /** - * Scanning - */ - SCANNING: () => LocalizedString - /** - * Scan again - */ - SCAN_AGAIN: () => LocalizedString - /** - * Network Scanner - */ - NETWORK_SCANNER: () => LocalizedString - /** - * No WiFi networks found - */ - NETWORK_NO_WIFI: () => LocalizedString - /** - * leave blank to disable WiFi - */ - NETWORK_BLANK_SSID: () => LocalizedString - /** - * Tx Power - */ - TX_POWER: () => LocalizedString - /** - * Hostname - */ - HOSTNAME: () => LocalizedString - /** - * Disable WiFi Sleep Mode - */ - NETWORK_DISABLE_SLEEP: () => LocalizedString - /** - * Use Lower WiFi Bandwidth - */ - NETWORK_LOW_BAND: () => LocalizedString - /** - * Enable mDNS Service - */ - NETWORK_USE_DNS: () => LocalizedString - /** - * Enable IPv6 support - */ - NETWORK_ENABLE_IPV6: () => LocalizedString - /** - * Use Fixed IP address - */ - NETWORK_FIXED_IP: () => LocalizedString - /** - * Gateway - */ - NETWORK_GATEWAY: () => LocalizedString - /** - * Subnet Mask - */ - NETWORK_SUBNET: () => LocalizedString - /** - * DNS Servers - */ - NETWORK_DNS: () => LocalizedString - /** - * {0} Address - */ - ADDRESS_OF: (arg0: unknown) => LocalizedString - /** - * Admin - */ - ADMIN: () => LocalizedString - /** - * Guest - */ - GUEST: () => LocalizedString - /** - * New - */ - NEW: () => LocalizedString - /** - * New {0} name - */ - NEW_NAME_OF: (arg0: unknown) => LocalizedString - /** - * entity - */ - ENTITY: () => LocalizedString - /** - * min - */ - MIN: () => LocalizedString - /** - * max - */ - MAX: () => LocalizedString -} - -export type Formatters = {} diff --git a/interface/src/i18n/i18n-util.async.ts b/interface/src/i18n/i18n-util.async.ts deleted file mode 100644 index 1b17c7d67..000000000 --- a/interface/src/i18n/i18n-util.async.ts +++ /dev/null @@ -1,31 +0,0 @@ -// This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten. -/* eslint-disable */ - -import { initFormatters } from './formatters' -import type { Locales, Translations } from './i18n-types' -import { loadedFormatters, loadedLocales, locales } from './i18n-util' - -const localeTranslationLoaders = { - de: () => import('./de'), - en: () => import('./en'), - nl: () => import('./nl'), - no: () => import('./no'), - pl: () => import('./pl'), - se: () => import('./se'), -} - -const updateDictionary = (locale: Locales, dictionary: Partial): Translations => - loadedLocales[locale] = { ...loadedLocales[locale], ...dictionary } - -export const importLocaleAsync = async (locale: Locales): Promise => - (await localeTranslationLoaders[locale]()).default as unknown as Translations - -export const loadLocaleAsync = async (locale: Locales): Promise => { - updateDictionary(locale, await importLocaleAsync(locale)) - loadFormatters(locale) -} - -export const loadAllLocalesAsync = (): Promise => Promise.all(locales.map(loadLocaleAsync)) - -export const loadFormatters = (locale: Locales): void => - void (loadedFormatters[locale] = initFormatters(locale)) diff --git a/interface/src/i18n/i18n-util.sync.ts b/interface/src/i18n/i18n-util.sync.ts deleted file mode 100644 index aa81b950b..000000000 --- a/interface/src/i18n/i18n-util.sync.ts +++ /dev/null @@ -1,34 +0,0 @@ -// This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten. -/* eslint-disable */ - -import { initFormatters } from './formatters' -import type { Locales, Translations } from './i18n-types' -import { loadedFormatters, loadedLocales, locales } from './i18n-util' - -import de from './de' -import en from './en' -import nl from './nl' -import no from './no' -import pl from './pl' -import se from './se' - -const localeTranslations = { - de, - en, - nl, - no, - pl, - se, -} - -export const loadLocale = (locale: Locales): void => { - if (loadedLocales[locale]) return - - loadedLocales[locale] = localeTranslations[locale] as unknown as Translations - loadFormatters(locale) -} - -export const loadAllLocales = (): void => locales.forEach(loadLocale) - -export const loadFormatters = (locale: Locales): void => - void (loadedFormatters[locale] = initFormatters(locale)) diff --git a/interface/src/i18n/i18n-util.ts b/interface/src/i18n/i18n-util.ts deleted file mode 100644 index bda0766fc..000000000 --- a/interface/src/i18n/i18n-util.ts +++ /dev/null @@ -1,39 +0,0 @@ -// This file was auto-generated by 'typesafe-i18n'. Any manual changes will be overwritten. -/* eslint-disable */ - -import { i18n as initI18n, i18nObject as initI18nObject, i18nString as initI18nString } from 'typesafe-i18n' -import type { LocaleDetector } from 'typesafe-i18n/detectors' -import type { LocaleTranslationFunctions, TranslateByString } from 'typesafe-i18n' -import { detectLocale as detectLocaleFn } from 'typesafe-i18n/detectors' -import type { Formatters, Locales, Translations, TranslationFunctions } from './i18n-types' - -export const baseLocale: Locales = 'en' - -export const locales: Locales[] = [ - 'de', - 'en', - 'nl', - 'no', - 'pl', - 'se' -] - -export const isLocale = (locale: string): locale is Locales => locales.includes(locale as Locales) - -export const loadedLocales: Record = {} as Record - -export const loadedFormatters: Record = {} as Record - -export const i18nString = (locale: Locales): TranslateByString => initI18nString(locale, loadedFormatters[locale]) - -export const i18nObject = (locale: Locales): TranslationFunctions => - initI18nObject( - locale, - loadedLocales[locale], - loadedFormatters[locale] - ) - -export const i18n = (): LocaleTranslationFunctions => - initI18n(loadedLocales, loadedFormatters) - -export const detectLocale = (...detectors: LocaleDetector[]): Locales => detectLocaleFn(baseLocale, locales, ...detectors) diff --git a/scripts/build_interface.py b/scripts/build_interface.py index 80137780c..e4a5fc0f9 100644 --- a/scripts/build_interface.py +++ b/scripts/build_interface.py @@ -20,16 +20,17 @@ def flagExists(flag): def buildWeb(): os.chdir("interface") - print("Building interface with npm") + print("Building web interface...") try: env.Execute("npm install") + env.Execute("npx typesafe-i18n --no-watch") env.Execute("npm run build") buildPath = Path("build") wwwPath = Path("../data/www") if wwwPath.exists() and wwwPath.is_dir(): rmtree(wwwPath) if not flagExists("PROGMEM_WWW"): - print("Copying interface to data directory") + print("Copying web files to data directory") copytree(buildPath, wwwPath) for currentpath, folders, files in os.walk(wwwPath): for file in files: @@ -40,4 +41,4 @@ def buildWeb(): if (len(BUILD_TARGETS) == 0 or "upload" in BUILD_TARGETS): buildWeb() else: - print("Skipping build interface step for target(s): " + ", ".join(BUILD_TARGETS)) \ No newline at end of file + print("Skipping build web interface for target(s): " + ", ".join(BUILD_TARGETS)) \ No newline at end of file