Multi-language/I18n support #22

This commit is contained in:
Proddy
2022-08-24 21:50:19 +02:00
parent 763337db3f
commit 1a4ce643fc
84 changed files with 5506 additions and 4196 deletions

View File

@@ -253,7 +253,7 @@ const UPLOAD_FILE_ENDPOINT = REST_ENDPOINT_ROOT + 'uploadFile'
const SIGN_IN_ENDPOINT = REST_ENDPOINT_ROOT + 'signIn'
const GENERATE_TOKEN_ENDPOINT = REST_ENDPOINT_ROOT + 'generateToken'
const system_status = {
emsesp_version: '3.4demo',
emsesp_version: '3.5demo',
esp_platform: 'ESP32',
max_alloc_heap: 113792,
psram_size: 0,
@@ -306,7 +306,8 @@ const EMSESP_MASKED_ENTITIES_ENDPOINT = REST_ENDPOINT_ROOT + 'maskedEntities'
const EMSESP_RESET_CUSTOMIZATIONS_ENDPOINT = REST_ENDPOINT_ROOT + 'resetCustomizations'
settings = {
tx_mode: 1,
locale: 'en',
tx_mode: 4,
ems_bus_id: 11,
syslog_enabled: false,
syslog_level: 3,
@@ -344,29 +345,24 @@ const emsesp_devices = {
devices: [
{
i: 1,
d: 23,
p: 77,
s: 'Thermostat (RC20/Moduline 300)',
t: 'thermostat1',
t: 'thermostat',
},
{
i: 2,
d: 8,
p: 123,
s: 'Boiler (Nefit GBx72/Trendline/Cerapur/Greenstar Si/27i)',
t: 'boiler',
},
{
i: 4,
d: 16,
p: 165,
s: 'Thermostat (RC100/Moduline 1000/1010)',
t: 'thermostat2',
t: 'thermostat',
},
],
}
const emsesp_coredata = {
connected: true,
// devices: [],
devices: [
{
@@ -852,6 +848,7 @@ rest_server.post(UPLOAD_FILE_ENDPOINT, (req, res) => {
res.sendStatus(200)
})
rest_server.post(SIGN_IN_ENDPOINT, (req, res) => {
console.log('Signed in as ' + req.body.username)
res.json(signin)
})
rest_server.get(GENERATE_TOKEN_ENDPOINT, (req, res) => {
@@ -1135,7 +1132,7 @@ rest_server.post(EMSESP_BOARDPROFILE_ENDPOINT, (req, res) => {
// EMS-ESP API specific
const emsesp_info = {
System: {
version: '3.4.2',
version: '3.5.0',
uptime: '001+06:40:34.018',
'uptime (seconds)': 110434,
freemem: 131,