Language switching works

app.js
   - call to index.js changed

public/javascripts/global.js
   - no more show version
   - no more 'showReset

routes/index.js
   - added 'translate'-function

views/index.pug
   - texts changed for translation

views/layout.pug
   - show version and date

public/javascripts/map.js
   - added text from server

charts/preparecharts.js
   - translate texts

locales/[en|de]/translation.json
   - new translations

charts/urils.js
   - added translations

package.json
  "version": "3.0.2",
   "date": "2023-04-19 11:00 UTC",
This commit is contained in:
rxf
2023-04-19 13:07:08 +02:00
parent 0573c95179
commit 6f2e676359
11 changed files with 128 additions and 62 deletions
+2 -7
View File
@@ -6,7 +6,6 @@ import * as dt from './datetime.js'
import {logerror, logit} from './logit.js'
import {tabtable, loadAll, showChart} from './showcharts.js'
import { DateTime } from './luxon.min.js'
import {showReset} from "./chart_utilities.js";
(async () => {
@@ -104,7 +103,7 @@ import {showReset} from "./chart_utilities.js";
tabTrigger.show()
currentTab = event.currentTarget.id
if (currentTab === 'maptab') {
map.showMap(params)
map.showMap(params, sysparams)
document.querySelector('#sellan').style.display = 'inline'
}
})
@@ -114,10 +113,6 @@ import {showReset} from "./chart_utilities.js";
// and show date/time every minute
setInterval(() => dt.showDate(false), 1000)
// show version and version-date
document.querySelector('#versn').innerHTML =
`Version: ${sysparams.version} vom ${sysparams.date.slice(0,10)}`
const csid = parseInt(sysparams.csid)
if(csid !== -1) {
let triggerEl = document.querySelector('#livetab')
@@ -130,7 +125,7 @@ import {showReset} from "./chart_utilities.js";
} else {
// show the map
document.querySelector('#sellan').style.display = 'inline'
map.showMap(params)
map.showMap(params,sysparams)
}
}