trans: fix various translation issues in active components

This commit is contained in:
2024-07-31 19:38:59 +02:00
parent 128ef795d8
commit eab39d0d79
4 changed files with 9 additions and 7 deletions

View File

@@ -52,7 +52,8 @@ function bindLocaleSwitcher(initialValue) {
switcher.onchange = (e) => {
i18next
.changeLanguage(e.target.value)
.then(translatePageElements);
.then(translatePageElements)
.then(update);
};
}
@@ -229,10 +230,7 @@ var labelNumRats = document.getElementById("labelNumRats");
var ratSlider = document.getElementById("numRats");
labelNumRats.innerHTML = `Anzahl an Ratten: ` + ratSlider.value;
ratSlider.oninput = function () {
labelNumRats.innerHTML = `Anzahl an Ratten: ` + this.value;
update();
}
@@ -274,6 +272,8 @@ function updateViaManualMeasurements() {
}
function update() {
labelNumRats.innerHTML = i18next.t("cage-for-x-rats", {"num_rats": ratSlider.value});
const width = inputWidth.value
const depth = inputDepth.value
const height = inputHeight.value