i18n.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571
  1. /*
  2. i18n.h - internationalization for Sonoff-Tasmota
  3. Copyright (C) 2018 Theo Arends
  4. This program is free software: you can redistribute it and/or modify
  5. it under the terms of the GNU General Public License as published by
  6. the Free Software Foundation, either version 3 of the License, or
  7. (at your option) any later version.
  8. This program is distributed in the hope that it will be useful,
  9. but WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with this program. If not, see <http://www.gnu.org/licenses/>.
  14. */
  15. #ifndef _I18N_H_
  16. #define _I18N_H_
  17. /*********************************************************************************************\
  18. * All text used in Commands, MQTT, JSON messages only in English (#1473)
  19. *
  20. * (At this location they can/may be overruled by language files using undefs)
  21. \*********************************************************************************************/
  22. #define D_JSON_ABORTED "Aborted"
  23. #define D_JSON_ACTIVE "Active"
  24. #define D_JSON_ADDRESS "Address"
  25. #define D_JSON_AIRQUALITY "AirQuality"
  26. #define D_JSON_ANALOG_INPUT "Analog"
  27. #define D_JSON_AP "AP" // Access Point
  28. #define D_JSON_APMAC_ADDRESS "APMac"
  29. #define D_JSON_APPENDED "Appended"
  30. #define D_JSON_BAUDRATE "Baudrate"
  31. #define D_JSON_BLINK "Blink"
  32. #define D_JSON_BLOCKED_LOOP "Blocked Loop"
  33. #define D_JSON_BOOTVERSION "Boot"
  34. #define D_JSON_BOOTCOUNT "BootCount"
  35. #define D_JSON_BSSID "BSSId"
  36. #define D_JSON_BUILDDATETIME "BuildDateTime"
  37. #define D_JSON_CHANNEL "Channel"
  38. #define D_JSON_CO2 "CarbonDioxide"
  39. #define D_JSON_COMMAND "Command"
  40. #define D_JSON_CONNECT_FAILED "Connect failed"
  41. #define D_JSON_COREVERSION "Core"
  42. #define D_JSON_COUNT "Count"
  43. #define D_JSON_COUNTER "Counter"
  44. #define D_JSON_CURRENT "Current" // As in Voltage and Current
  45. #define D_JSON_DATA "Data"
  46. #define D_JSON_DISTANCE "Distance"
  47. #define D_JSON_DNSSERVER "DNSServer"
  48. #define D_JSON_DONE "Done"
  49. #define D_JSON_ECO2 "eCO2"
  50. #define D_JSON_EMPTY "Empty"
  51. #define D_JSON_ENDDST "EndDST" // End Daylight Savings Time
  52. #define D_JSON_ERASE "Erase"
  53. #define D_JSON_ERROR "Error"
  54. #define D_JSON_EVERY "Every"
  55. #define D_JSON_EXPORT_ACTIVE "ExportActivePower"
  56. #define D_JSON_EXPORT_REACTIVE "ExportReactivePower"
  57. #define D_JSON_FAILED "Failed"
  58. #define D_JSON_FALLBACKTOPIC "FallbackTopic"
  59. #define D_JSON_FEATURES "Features"
  60. #define D_JSON_FLASHCHIPID "FlashChipId"
  61. #define D_JSON_FLASHMODE "FlashMode"
  62. #define D_JSON_FLASHSIZE "FlashSize"
  63. #define D_JSON_FREEMEMORY "Free"
  64. #define D_JSON_FREQUENCY "Frequency"
  65. #define D_JSON_FROM "from"
  66. #define D_JSON_GAS "Gas"
  67. #define D_JSON_GATEWAY "Gateway"
  68. #define D_JSON_HEAPSIZE "Heap"
  69. #define D_JSON_HIGH "High"
  70. #define D_JSON_HOST_NOT_FOUND "Host not found"
  71. #define D_JSON_HSBCOLOR "HSBColor"
  72. #define D_JSON_HUMIDITY "Humidity"
  73. #define D_JSON_I2CSCAN_DEVICES_FOUND_AT "Device(s) found at"
  74. #define D_JSON_I2CSCAN_UNKNOWN_ERROR_AT "Unknown error at"
  75. #define D_JSON_I2CSCAN_NO_DEVICES_FOUND "No devices found"
  76. #define D_JSON_ID "Id"
  77. #define D_JSON_ILLUMINANCE "Illuminance"
  78. #define D_JSON_IMPORT_ACTIVE "ImportActivePower"
  79. #define D_JSON_IMPORT_REACTIVE "ImportReactivePower"
  80. #define D_JSON_INFRARED "Infrared"
  81. #define D_JSON_UNKNOWN "Unknown"
  82. #define D_JSON_LIGHT "Light"
  83. #define D_JSON_LOCAL_TIME "Local"
  84. #define D_JSON_LOW "Low"
  85. #define D_JSON_MAC "Mac"
  86. #define D_JSON_MASK "Mask"
  87. #define D_JSON_MINIMAL "minimal"
  88. #define D_JSON_NO "No"
  89. #define D_JSON_NOISE "Noise"
  90. #define D_JSON_NONE "None"
  91. #define D_JSON_OR "or"
  92. #define D_JSON_PERIOD "Period"
  93. #define D_JSON_PHASE_ANGLE "PhaseAngle"
  94. #define D_JSON_POWERFACTOR "Factor"
  95. #define D_JSON_POWERUSAGE "Power"
  96. #define D_JSON_ACTIVE_POWERUSAGE "ActivePower"
  97. #define D_JSON_APPARENT_POWERUSAGE "ApparentPower"
  98. #define D_JSON_REACTIVE_POWERUSAGE "ReactivePower"
  99. #define D_JSON_PRESSURE "Pressure"
  100. #define D_JSON_PRESSUREATSEALEVEL "SeaPressure"
  101. #define D_JSON_PRESSURE_UNIT "PressureUnit"
  102. #define D_JSON_PROGRAMFLASHSIZE "ProgramFlashSize"
  103. #define D_JSON_PROGRAMSIZE "ProgramSize"
  104. #define D_JSON_RESET "Reset"
  105. #define D_JSON_RESTARTING "Restarting"
  106. #define D_JSON_RESTARTREASON "RestartReason"
  107. #define D_JSON_RSSI "RSSI"
  108. #define D_JSON_SAVEADDRESS "SaveAddress"
  109. #define D_JSON_SAVECOUNT "SaveCount"
  110. #define D_JSON_SAVED "Saved"
  111. #define D_JSON_SAVESTATE "SaveState"
  112. #define D_JSON_SDKVERSION "SDK"
  113. #define D_JSON_SELECTED "selected"
  114. #define D_JSON_SERIALRECEIVED "SerialReceived"
  115. #define D_JSON_SSID "SSId"
  116. #define D_JSON_STARTDST "StartDST" // Start Daylight Savings Time
  117. #define D_JSON_STARTED "Started"
  118. #define D_JSON_STARTUPUTC "StartupUTC"
  119. #define D_JSON_SUBNETMASK "Subnetmask"
  120. #define D_JSON_SUCCESSFUL "Successful"
  121. #define D_JSON_SUNRISE "Sunrise"
  122. #define D_JSON_SUNSET "Sunset"
  123. #define D_JSON_SWITCH "Switch"
  124. #define D_JSON_SYNC "Sync"
  125. #define D_JSON_TEMPERATURE "Temperature"
  126. #define D_JSON_TEMPERATURE_UNIT "TempUnit"
  127. #define D_JSON_TIME "Time"
  128. #define D_JSON_TODAY "Today"
  129. #define D_JSON_TOTAL "Total"
  130. #define D_JSON_TOTAL_REACTIVE "TotalReactivePower"
  131. #define D_JSON_TOTAL_START_TIME "TotalStartTime"
  132. #define D_JSON_TVOC "TVOC"
  133. #define D_JSON_TYPE "Type"
  134. #define D_JSON_UPTIME "Uptime"
  135. #define D_JSON_UTC_TIME "UTC"
  136. #define D_JSON_UV_INDEX "UvIndex"
  137. #define D_JSON_UV_INDEX_TEXT "UvIndexText"
  138. #define D_JSON_UV_LEVEL "UvLevel"
  139. #define D_JSON_UV_POWER "UvPower"
  140. #define D_JSON_VCC "Vcc"
  141. #define D_JSON_VERSION "Version"
  142. #define D_JSON_VOLTAGE "Voltage"
  143. #define D_JSON_WEIGHT "Weight"
  144. #define D_JSON_WIFI "Wifi"
  145. #define D_JSON_WRONG "Wrong"
  146. #define D_JSON_WRONG_PARAMETERS "Wrong parameters"
  147. #define D_JSON_YESTERDAY "Yesterday"
  148. #define D_JSON_ZERO_POINT_CALIBRATION "Zero Point Calibration"
  149. #define D_RSLT_ENERGY "ENERGY"
  150. #define D_RSLT_INFO "INFO"
  151. #define D_RSLT_MARGINS "MARGINS"
  152. #define D_RSLT_POWER "POWER"
  153. #define D_RSLT_RESULT "RESULT"
  154. #define D_RSLT_SENSOR "SENSOR"
  155. #define D_RSLT_STATE "STATE"
  156. #define D_RSLT_UPTIME "UPTIME"
  157. #define D_RSLT_WARNING "WARNING"
  158. // Commands sonoff.ino
  159. #define D_CMND_BACKLOG "Backlog"
  160. #define D_CMND_DELAY "Delay"
  161. #define D_CMND_STATUS "Status"
  162. #define D_STATUS1_PARAMETER "PRM"
  163. #define D_STATUS2_FIRMWARE "FWR"
  164. #define D_STATUS3_LOGGING "LOG"
  165. #define D_STATUS4_MEMORY "MEM"
  166. #define D_STATUS5_NETWORK "NET"
  167. #define D_STATUS6_MQTT "MQT"
  168. #define D_STATUS7_TIME "TIM"
  169. #define D_STATUS8_POWER "PWR"
  170. #define D_STATUS9_MARGIN "PTH"
  171. #define D_STATUS10_SENSOR "SNS"
  172. #define D_STATUS11_STATUS "STS"
  173. #define D_CMND_STATE "State"
  174. #define D_CMND_POWER "Power"
  175. #define D_CMND_FANSPEED "FanSpeed"
  176. #define D_CMND_POWERONSTATE "PowerOnState"
  177. #define D_CMND_PULSETIME "PulseTime"
  178. #define D_CMND_BLINKTIME "BlinkTime"
  179. #define D_CMND_BLINKCOUNT "BlinkCount"
  180. #define D_CMND_SENSOR "Sensor"
  181. #define D_CMND_DRIVER "Driver"
  182. #define D_CMND_SAVEDATA "SaveData"
  183. #define D_CMND_SETOPTION "SetOption"
  184. #define D_CMND_TEMPERATURE_RESOLUTION "TempRes"
  185. #define D_CMND_HUMIDITY_RESOLUTION "HumRes"
  186. #define D_CMND_PRESSURE_RESOLUTION "PressRes"
  187. #define D_CMND_POWER_RESOLUTION "WattRes"
  188. #define D_CMND_VOLTAGE_RESOLUTION "VoltRes"
  189. #define D_CMND_FREQUENCY_RESOLUTION "FreqRes"
  190. #define D_CMND_CURRENT_RESOLUTION "AmpRes"
  191. #define D_CMND_ENERGY_RESOLUTION "EnergyRes"
  192. #define D_CMND_WEIGHT_RESOLUTION "WeightRes"
  193. #define D_CMND_MODULE "Module"
  194. #define D_CMND_MODULES "Modules"
  195. #define D_CMND_GPIO "GPIO"
  196. #define D_JSON_NOT_SUPPORTED "Not supported"
  197. #define D_CMND_GPIOS "GPIOs"
  198. #define D_CMND_PWM "PWM"
  199. #define D_CMND_PWMFREQUENCY "PWMFrequency"
  200. #define D_CMND_PWMRANGE "PWMRange"
  201. #define D_CMND_COUNTER "Counter"
  202. #define D_CMND_COUNTERTYPE "CounterType"
  203. #define D_CMND_COUNTERDEBOUNCE "CounterDebounce"
  204. #define D_CMND_BUTTONDEBOUNCE "ButtonDebounce"
  205. #define D_CMND_SWITCHDEBOUNCE "SwitchDebounce"
  206. #define D_CMND_SLEEP "Sleep"
  207. #define D_CMND_UPLOAD "Upload"
  208. #define D_CMND_UPGRADE "Upgrade"
  209. #define D_JSON_ONE_OR_GT "1 or >%s to upgrade"
  210. #define D_CMND_OTAURL "OtaUrl"
  211. #define D_CMND_SERIALLOG "SerialLog"
  212. #define D_CMND_SYSLOG "SysLog"
  213. #define D_CMND_LOGHOST "LogHost"
  214. #define D_CMND_LOGPORT "LogPort"
  215. #define D_CMND_IPADDRESS "IPAddress"
  216. #define D_CMND_NTPSERVER "NtpServer"
  217. #define D_CMND_AP "Ap"
  218. #define D_CMND_SSID "SSId"
  219. #define D_CMND_PASSWORD "Password"
  220. #define D_CMND_HOSTNAME "Hostname"
  221. #define D_CMND_WIFICONFIG "WifiConfig"
  222. #define WCFG_MAX_STRING_LENGTH 12
  223. #define D_WCFG_0_RESTART "Restart"
  224. #define D_WCFG_1_SMARTCONFIG "SmartConfig"
  225. #define D_WCFG_2_WIFIMANAGER "WifiManager"
  226. #define D_WCFG_3_WPSCONFIG "WPSConfig"
  227. #define D_WCFG_4_RETRY "Retry"
  228. #define D_WCFG_5_WAIT "Wait"
  229. #define D_WCFG_6_SERIAL "Serial"
  230. #define D_CMND_FRIENDLYNAME "FriendlyName"
  231. #define D_CMND_SWITCHMODE "SwitchMode"
  232. #define D_CMND_TELEPERIOD "TelePeriod"
  233. #define D_CMND_RESTART "Restart"
  234. #define D_JSON_ONE_TO_RESTART "1 to restart"
  235. #define D_CMND_RESET "Reset"
  236. #define D_JSON_RESET_AND_RESTARTING "Reset and Restarting"
  237. #define D_JSON_ONE_TO_RESET "1 to reset"
  238. #define D_CMND_TIMEZONE "Timezone"
  239. #define D_CMND_TIMESTD "TimeStd"
  240. #define D_CMND_TIMEDST "TimeDst"
  241. #define D_CMND_ALTITUDE "Altitude"
  242. #define D_CMND_LEDPOWER "LedPower"
  243. #define D_CMND_LEDSTATE "LedState"
  244. #define D_CMND_I2CSCAN "I2CScan"
  245. #define D_CMND_SERIALSEND "SerialSend"
  246. #define D_CMND_SERIALDELIMITER "SerialDelimiter"
  247. #define D_CMND_BAUDRATE "Baudrate"
  248. #define D_LOG_SOME_SETTINGS_RESET "Some settings have been reset"
  249. // Commands xdrv_01_mqtt.ino
  250. #define D_CMND_MQTTHOST "MqttHost"
  251. #define D_CMND_MQTTPORT "MqttPort"
  252. #define D_CMND_MQTTRETRY "MqttRetry"
  253. #define D_CMND_STATETEXT "StateText"
  254. #define D_CMND_MQTTFINGERPRINT "MqttFingerprint"
  255. #define D_CMND_MQTTCLIENT "MqttClient"
  256. #define D_CMND_MQTTUSER "MqttUser"
  257. #define D_CMND_MQTTPASSWORD "MqttPassword"
  258. #define D_CMND_FULLTOPIC "FullTopic"
  259. #define D_CMND_PREFIX "Prefix"
  260. #define PRFX_MAX_STRING_LENGTH 5
  261. #define D_CMND "cmnd"
  262. #define D_STAT "stat"
  263. #define D_TELE "tele"
  264. #define D_CMND_GROUPTOPIC "GroupTopic"
  265. #define D_CMND_TOPIC "Topic"
  266. #define D_CMND_BUTTONTOPIC "ButtonTopic"
  267. #define D_CMND_SWITCHTOPIC "SwitchTopic"
  268. #define D_CMND_BUTTONRETAIN "ButtonRetain"
  269. #define D_CMND_SWITCHRETAIN "SwitchRetain"
  270. #define D_CMND_POWERRETAIN "PowerRetain"
  271. #define D_CMND_SENSORRETAIN "SensorRetain"
  272. #define D_CMND_PUBLISH "Publish"
  273. // Commands xdrv_02_webserver.ino
  274. #define D_CMND_WEBSERVER "Webserver"
  275. #define D_JSON_WEBSERVER_MODE "WebServerMode"
  276. #define D_JSON_ACTIVE_FOR "Active for"
  277. #define D_JSON_ON_DEVICE "on"
  278. #define D_JSON_WITH_IP_ADDRESS "with IP address"
  279. #define D_CMND_WEBPASSWORD "WebPassword"
  280. #define D_CMND_WEBLOG "WebLog"
  281. #define D_CMND_WEBREFRESH "WebRefresh"
  282. #define D_CMND_WEBSEND "WebSend"
  283. #define D_CMND_EMULATION "Emulation"
  284. // Commands xdrv_03_energy.ino
  285. #define D_CMND_POWERLOW "PowerLow"
  286. #define D_CMND_POWERHIGH "PowerHigh"
  287. #define D_CMND_POWERDELTA "PowerDelta"
  288. #define D_CMND_VOLTAGELOW "VoltageLow"
  289. #define D_CMND_VOLTAGEHIGH "VoltageHigh"
  290. #define D_CMND_CURRENTLOW "CurrentLow"
  291. #define D_CMND_CURRENTHIGH "CurrentHigh"
  292. #define D_CMND_ENERGYRESET "EnergyReset"
  293. #define D_CMND_POWERSET "PowerSet"
  294. #define D_CMND_VOLTAGESET "VoltageSet"
  295. #define D_CMND_CURRENTSET "CurrentSet"
  296. #define D_CMND_FREQUENCYSET "FrequencySet"
  297. #define D_CMND_MAXPOWER "MaxPower"
  298. #define D_CMND_MAXPOWERHOLD "MaxPowerHold"
  299. #define D_CMND_MAXPOWERWINDOW "MaxPowerWindow"
  300. #define D_JSON_MAXPOWERREACHED "MaxPowerReached"
  301. #define D_JSON_MAXPOWERREACHEDRETRY "MaxPowerReachedRetry"
  302. #define D_CMND_SAFEPOWER "SafePower"
  303. #define D_CMND_SAFEPOWERHOLD "SafePowerHold"
  304. #define D_CMND_SAFEPOWERWINDOW "SafePowerWindow"
  305. #define D_JSON_POWERMONITOR "PowerMonitor"
  306. #define D_CMND_MAXENERGY "MaxEnergy"
  307. #define D_CMND_MAXENERGYSTART "MaxEnergyStart"
  308. #define D_JSON_ENERGYMONITOR "EnergyMonitor"
  309. #define D_JSON_MAXENERGYREACHED "MaxEnergyReached"
  310. // Commands xdrv_04_light.ino
  311. #define D_CMND_CHANNEL "Channel"
  312. #define D_CMND_COLOR "Color"
  313. #define D_CMND_COLORTEMPERATURE "CT"
  314. #define D_CMND_DIMMER "Dimmer"
  315. #define D_CMND_HSBCOLOR "HSBColor"
  316. #define D_CMND_LED "Led"
  317. #define D_CMND_LEDTABLE "LedTable"
  318. #define D_CMND_FADE "Fade"
  319. #define D_CMND_PIXELS "Pixels"
  320. #define D_CMND_RGBWWTABLE "RGBWWTable"
  321. #define D_CMND_ROTATION "Rotation"
  322. #define D_CMND_SCHEME "Scheme"
  323. #define D_CMND_SPEED "Speed"
  324. #define D_CMND_WAKEUP "Wakeup"
  325. #define D_CMND_WAKEUPDURATION "WakeUpDuration"
  326. #define D_CMND_WHITE "White"
  327. #define D_CMND_WIDTH "Width"
  328. // Commands xdrv_05_irremote.ino
  329. #define D_CMND_IRSEND "IRSend"
  330. #define D_JSON_INVALID_JSON "Invalid JSON"
  331. #define D_JSON_INVALID_RAWDATA "Invalid RawData"
  332. #define D_JSON_NO_BUFFER_SPACE "No buffer space"
  333. #define D_JSON_PROTOCOL_NOT_SUPPORTED "Protocol not supported"
  334. #define D_JSON_IR_PROTOCOL "Protocol"
  335. #define D_JSON_IR_BITS "Bits"
  336. #define D_JSON_IR_DATA "Data"
  337. #define D_JSON_IR_RAWDATA "RawData"
  338. #define D_CMND_IRHVAC "IRHVAC"
  339. #define D_JSON_IRHVAC_VENDOR "VENDOR"
  340. #define D_JSON_IRHVAC_POWER "POWER"
  341. #define D_JSON_IRHVAC_MODE "MODE"
  342. #define D_JSON_IRHVAC_FANSPEED "FANSPEED"
  343. #define D_JSON_IRHVAC_TEMP "TEMP"
  344. #define D_JSON_IRRECEIVED "IrReceived"
  345. // Commands xdrv_06_snfbridge.ino
  346. #define D_CMND_RFCODE "RfCode"
  347. #define D_CMND_RFHIGH "RfHigh"
  348. #define D_CMND_RFHOST "RfHost"
  349. #define D_CMND_RFKEY "RfKey"
  350. #define D_JSON_START_LEARNING "Start learning"
  351. #define D_JSON_SET_TO_DEFAULT "Set to default"
  352. #define D_JSON_DEFAULT_SENT "Default sent"
  353. #define D_JSON_LEARNED_SENT "Learned sent"
  354. #define D_JSON_LEARNING_ACTIVE "Learning active"
  355. #define D_JSON_LEARN_FAILED "Learn failed"
  356. #define D_JSON_LEARNED "Learned"
  357. #define D_CMND_RFLOW "RfLow"
  358. #define D_CMND_RFSYNC "RfSync"
  359. #define D_JSON_RFRECEIVED "RfReceived"
  360. #define D_CMND_RFRAW "RfRaw"
  361. // Commands xdrv_07_domoticz.ino
  362. #define D_CMND_DOMOTICZ "Domoticz"
  363. #define D_CMND_IDX "Idx"
  364. #define D_CMND_KEYIDX "KeyIdx"
  365. #define D_CMND_SWITCHIDX "SwitchIdx"
  366. #define D_CMND_SENSORIDX "SensorIdx"
  367. #define D_CMND_UPDATETIMER "UpdateTimer"
  368. // Commands xdrv_08_serial_bridge.ino
  369. #define D_CMND_SSERIALSEND "SSerialSend"
  370. #define D_CMND_SBAUDRATE "SBaudrate"
  371. #define D_JSON_SSERIALRECEIVED "SSerialReceived"
  372. // Commands xdrv_09_timers.ino
  373. #define D_CMND_TIMER "Timer"
  374. #define D_JSON_TIMER_ARM "Arm"
  375. #define D_JSON_TIMER_MODE "Mode"
  376. #define D_JSON_TIMER_TIME "Time"
  377. #define D_JSON_TIMER_WINDOW "Window"
  378. #define D_JSON_TIMER_DAYS "Days"
  379. #define D_JSON_TIMER_REPEAT "Repeat"
  380. #define D_JSON_TIMER_OUTPUT "Output"
  381. #define D_JSON_TIMER_ACTION "Action"
  382. #define D_JSON_TIMER_NO_DEVICE "No GPIO as output configured"
  383. #define D_CMND_TIMERS "Timers"
  384. #define D_CMND_LATITUDE "Latitude"
  385. #define D_CMND_LONGITUDE "Longitude"
  386. /********************************************************************************************/
  387. #define D_ASTERIX "********"
  388. #ifndef MY_LANGUAGE
  389. #include "language/en-GB.h"
  390. #else
  391. #define QUOTEME(x) QUOTEME_1(x)
  392. #define QUOTEME_1(x) #x
  393. #define INCLUDE_FILE(x) QUOTEME(language/x.h)
  394. #include INCLUDE_FILE(MY_LANGUAGE)
  395. #endif
  396. #ifndef LANGUAGE_LCID
  397. #define LANGUAGE_LCID 2057 // en-GB
  398. #endif
  399. // Common
  400. enum UnitNames {
  401. UNIT_AMPERE,
  402. UNIT_HOUR,
  403. UNIT_KILOOHM,
  404. UNIT_KILOWATTHOUR,
  405. UNIT_LUX,
  406. UNIT_MICROSECOND,
  407. UNIT_MILLIAMPERE,
  408. UNIT_MILLIMETER_MERCURY,
  409. UNIT_MILLISECOND,
  410. UNIT_MINUTE,
  411. UNIT_PPB,
  412. UNIT_PPD,
  413. UNIT_PPM,
  414. UNIT_PERCENTAGE,
  415. UNIT_PRESSURE,
  416. UNIT_SECOND,
  417. UNIT_SECTORS,
  418. UNIT_VOLT,
  419. UNIT_WATT,
  420. UNIT_WATTHOUR,
  421. UNIT_HERTZ };
  422. const char kUnitNames[] PROGMEM =
  423. D_UNIT_AMPERE "|"
  424. D_UNIT_HOUR "|"
  425. D_UNIT_KILOOHM "|"
  426. D_UNIT_KILOWATTHOUR "|"
  427. D_UNIT_LUX "|"
  428. D_UNIT_MICROSECOND "|"
  429. D_UNIT_MILLIAMPERE "|"
  430. D_UNIT_MILLIMETER_MERCURY "|"
  431. D_UNIT_MILLISECOND "|"
  432. D_UNIT_MINUTE "|"
  433. D_UNIT_PARTS_PER_BILLION "|"
  434. D_UNIT_PARTS_PER_DECILITER "|"
  435. D_UNIT_PARTS_PER_MILLION "|"
  436. "%|"
  437. D_UNIT_PRESSURE "|"
  438. D_UNIT_SECOND "|"
  439. D_UNIT_SECTORS "|"
  440. D_UNIT_VOLT "|"
  441. D_UNIT_WATT "|"
  442. D_UNIT_WATTHOUR "|"
  443. D_UNIT_HERTZ ;
  444. const char S_JSON_COMMAND_NVALUE_SPACE_UNIT[] PROGMEM = "{\"%s\":\"%d %s\"}";
  445. const char S_JSON_COMMAND_LVALUE_SPACE_UNIT[] PROGMEM = "{\"%s\":\"%lu %s\"}";
  446. const char S_JSON_COMMAND_SVALUE_SPACE_UNIT[] PROGMEM = "{\"%s\":\"%s %s\"}";
  447. const char S_JSON_COMMAND_NVALUE_UNIT[] PROGMEM = "{\"%s\":\"%d%s\"}";
  448. const char S_JSON_COMMAND_NVALUE_UNIT_NVALUE_UNIT[] PROGMEM = "{\"%s\":\"%d%s (%d%s)\"}";
  449. const char S_JSON_COMMAND_NVALUE_SVALUE[] PROGMEM = "{\"%s\":\"%d (%s)\"}";
  450. const char S_JSON_COMMAND_NVALUE_ACTIVE_NVALUE[] PROGMEM = "{\"%s\":\"%d (" D_JSON_ACTIVE " %d)\"}";
  451. const char S_JSON_COMMAND_NVALUE[] PROGMEM = "{\"%s\":%d}";
  452. const char S_JSON_COMMAND_LVALUE[] PROGMEM = "{\"%s\":%lu}";
  453. const char S_JSON_COMMAND_SVALUE[] PROGMEM = "{\"%s\":\"%s\"}";
  454. const char S_JSON_COMMAND_HVALUE[] PROGMEM = "{\"%s\":\"#%X\"}";
  455. const char S_JSON_COMMAND_ASTERIX[] PROGMEM = "{\"%s\":\"" D_ASTERIX "\"}";
  456. const char S_JSON_COMMAND_XVALUE[] PROGMEM = "{\"%s\":%s}"; // %s must provide quotes on non-number
  457. const char S_JSON_COMMAND_INDEX_NVALUE[] PROGMEM = "{\"%s%d\":%d}";
  458. const char S_JSON_COMMAND_INDEX_LVALUE[] PROGMEM = "{\"%s%d\":%lu}";
  459. const char S_JSON_COMMAND_INDEX_SVALUE[] PROGMEM = "{\"%s%d\":\"%s\"}";
  460. const char S_JSON_COMMAND_INDEX_ASTERIX[] PROGMEM = "{\"%s%d\":\"" D_ASTERIX "\"}";
  461. const char S_JSON_COMMAND_INDEX_SVALUE_SVALUE[] PROGMEM = "{\"%s%d\":\"%s%s\"}";
  462. const char S_JSON_COMMAND_INDEX_NVALUE_ACTIVE_NVALUE[] PROGMEM = "{\"%s%d\":\"%d (" D_JSON_ACTIVE " %d)\"}";
  463. const char S_JSON_SENSOR_INDEX_NVALUE[] PROGMEM = "{\"" D_CMND_SENSOR "%d\":%d}";
  464. const char S_JSON_SENSOR_INDEX_SVALUE[] PROGMEM = "{\"" D_CMND_SENSOR "%d\":\"%s\"}";
  465. const char S_JSON_DRIVER_INDEX_NVALUE[] PROGMEM = "{\"" D_CMND_DRIVER "%d\":%d}";
  466. const char S_JSON_DRIVER_INDEX_SVALUE[] PROGMEM = "{\"" D_CMND_DRIVER "%d\":\"%s\"}";
  467. const char JSON_SNS_TEMP[] PROGMEM = "%s,\"%s\":{\"" D_JSON_TEMPERATURE "\":%s}";
  468. const char JSON_SNS_TEMPHUM[] PROGMEM = "%s,\"%s\":{\"" D_JSON_TEMPERATURE "\":%s,\"" D_JSON_HUMIDITY "\":%s}";
  469. const char S_LOG_I2C_FOUND_AT[] PROGMEM = D_LOG_I2C "%s " D_FOUND_AT " 0x%x";
  470. const char S_LOG_HTTP[] PROGMEM = D_LOG_HTTP;
  471. const char S_LOG_WIFI[] PROGMEM = D_LOG_WIFI;
  472. const char S_LOG_MQTT[] PROGMEM = D_LOG_MQTT;
  473. const char S_RSLT_POWER[] PROGMEM = D_RSLT_POWER;
  474. const char S_RSLT_RESULT[] PROGMEM = D_RSLT_RESULT;
  475. const char S_RSLT_WARNING[] PROGMEM = D_RSLT_WARNING;
  476. const char S_LWT[] PROGMEM = D_LWT;
  477. const char S_OFFLINE[] PROGMEM = D_OFFLINE;
  478. // sonoff.ino
  479. #define MAX_BUTTON_COMMANDS 5 // Max number of button commands supported
  480. const char kCommands[MAX_BUTTON_COMMANDS][14] PROGMEM = {
  481. D_CMND_WIFICONFIG " 1", // Press button three times
  482. D_CMND_WIFICONFIG " 2", // Press button four times
  483. D_CMND_WIFICONFIG " 3", // Press button five times
  484. D_CMND_RESTART " 1", // Press button six times
  485. D_CMND_UPGRADE " 1" }; // Press button seven times
  486. const char kWifiConfig[MAX_WIFI_OPTION][WCFG_MAX_STRING_LENGTH] PROGMEM = {
  487. D_WCFG_0_RESTART,
  488. D_WCFG_1_SMARTCONFIG,
  489. D_WCFG_2_WIFIMANAGER,
  490. D_WCFG_3_WPSCONFIG,
  491. D_WCFG_4_RETRY,
  492. D_WCFG_5_WAIT,
  493. D_WCFG_6_SERIAL };
  494. const char kPrefixes[3][PRFX_MAX_STRING_LENGTH] PROGMEM = {
  495. D_CMND,
  496. D_STAT,
  497. D_TELE };
  498. const char kCodeImage[] PROGMEM = "sonoff|minimal|classic|sensors|knx|basic|display";
  499. // support.ino
  500. static const char kMonthNames[] = D_MONTH3LIST;
  501. const char kOptionOff[] PROGMEM = "OFF|" D_OFF "|" D_FALSE "|" D_STOP "|" D_CELSIUS ;
  502. const char kOptionOn[] PROGMEM = "ON|" D_ON "|" D_TRUE "|" D_START "|" D_FAHRENHEIT "|" D_USER ;
  503. const char kOptionToggle[] PROGMEM = "TOGGLE|" D_TOGGLE "|" D_ADMIN ;
  504. const char kOptionBlink[] PROGMEM = "BLINK|" D_BLINK ;
  505. const char kOptionBlinkOff[] PROGMEM = "BLINKOFF|" D_BLINKOFF ;
  506. // xdrv_02_webserver.ino
  507. #ifdef USE_WEBSERVER
  508. const char HTTP_SNS_TEMP[] PROGMEM = "%s{s}%s " D_TEMPERATURE "{m}%s&deg;%c{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
  509. const char HTTP_SNS_HUM[] PROGMEM = "%s{s}%s " D_HUMIDITY "{m}%s%%{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
  510. const char HTTP_SNS_PRESSURE[] PROGMEM = "%s{s}%s " D_PRESSURE "{m}%s %s{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
  511. const char HTTP_SNS_SEAPRESSURE[] PROGMEM = "%s{s}%s " D_PRESSUREATSEALEVEL "{m}%s %s{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
  512. const char HTTP_SNS_ANALOG[] PROGMEM = "%s{s}%s " D_ANALOG_INPUT "%d{m}%d{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
  513. const char HTTP_SNS_ILLUMINANCE[] PROGMEM = "%s{s}%s " D_ILLUMINANCE "{m}%d " D_UNIT_LUX "{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
  514. #if defined(USE_MHZ19) || defined(USE_SENSEAIR) || defined(USE_AZ7798)
  515. const char HTTP_SNS_CO2[] PROGMEM = "%s{s}%s " D_CO2 "{m}%d " D_UNIT_PARTS_PER_MILLION "{e}"; // {s} = <tr><th>, {m} = </th><td>, {e} = </td></tr>
  516. #endif // USE_WEBSERVER
  517. const char S_MAIN_MENU[] PROGMEM = D_MAIN_MENU;
  518. const char S_CONFIGURATION[] PROGMEM = D_CONFIGURATION;
  519. const char S_CONFIGURE_MODULE[] PROGMEM = D_CONFIGURE_MODULE;
  520. const char S_CONFIGURE_WIFI[] PROGMEM = D_CONFIGURE_WIFI;
  521. const char S_NO_NETWORKS_FOUND[] PROGMEM = D_NO_NETWORKS_FOUND;
  522. const char S_CONFIGURE_LOGGING[] PROGMEM = D_CONFIGURE_LOGGING;
  523. const char S_CONFIGURE_OTHER[] PROGMEM = D_CONFIGURE_OTHER;
  524. const char S_SAVE_CONFIGURATION[] PROGMEM = D_SAVE_CONFIGURATION;
  525. const char S_RESET_CONFIGURATION[] PROGMEM = D_RESET_CONFIGURATION;
  526. const char S_RESTORE_CONFIGURATION[] PROGMEM = D_RESTORE_CONFIGURATION;
  527. const char S_FIRMWARE_UPGRADE[] PROGMEM = D_FIRMWARE_UPGRADE;
  528. const char S_CONSOLE[] PROGMEM = D_CONSOLE;
  529. const char S_INFORMATION[] PROGMEM = D_INFORMATION;
  530. const char S_RESTART[] PROGMEM = D_RESTART;
  531. #endif // USE_WEBSERVER
  532. #endif // _I18N_H_