Initialize knockout after localization
That way the localization can still affect DOM nodes which will be hidden by knockout.
This commit is contained in:
parent
064dd195c1
commit
a380f4ee70
|
@ -896,7 +896,7 @@ var ui = new GlobalBindings(window.mumbleWebConfig)
|
||||||
// Used only for debugging
|
// Used only for debugging
|
||||||
window.mumbleUi = ui
|
window.mumbleUi = ui
|
||||||
|
|
||||||
window.onload = function () {
|
function initializeUI () {
|
||||||
var queryParams = url.parse(document.location.href, true).query
|
var queryParams = url.parse(document.location.href, true).query
|
||||||
queryParams = Object.assign({}, window.mumbleWebConfig.defaults, queryParams)
|
queryParams = Object.assign({}, window.mumbleWebConfig.defaults, queryParams)
|
||||||
var useJoinDialog = queryParams.joinDialog
|
var useJoinDialog = queryParams.joinDialog
|
||||||
|
@ -960,10 +960,10 @@ window.onload = function () {
|
||||||
}
|
}
|
||||||
ui.connectDialog.joinOnly(useJoinDialog)
|
ui.connectDialog.joinOnly(useJoinDialog)
|
||||||
ko.applyBindings(ui)
|
ko.applyBindings(ui)
|
||||||
}
|
|
||||||
|
|
||||||
window.onresize = () => ui.updateSize()
|
window.onresize = () => ui.updateSize()
|
||||||
ui.updateSize()
|
ui.updateSize()
|
||||||
|
}
|
||||||
|
|
||||||
function log () {
|
function log () {
|
||||||
console.log.apply(console, arguments)
|
console.log.apply(console, arguments)
|
||||||
|
@ -1054,6 +1054,7 @@ function translateEverything() {
|
||||||
async function main() {
|
async function main() {
|
||||||
await localizationInitialize(navigator.language);
|
await localizationInitialize(navigator.language);
|
||||||
translateEverything();
|
translateEverything();
|
||||||
|
initializeUI();
|
||||||
initVoice(data => {
|
initVoice(data => {
|
||||||
if (testVoiceHandler) {
|
if (testVoiceHandler) {
|
||||||
testVoiceHandler.write(data)
|
testVoiceHandler.write(data)
|
||||||
|
@ -1071,5 +1072,5 @@ async function main() {
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
main();
|
window.onload = main
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue