minor: manual filtering

This commit is contained in:
Jean-Baptiste Pasquier
2021-02-08 10:51:08 +01:00
parent 52583523f5
commit 1ada126c43
7 changed files with 38 additions and 22 deletions

View File

@ -39,12 +39,7 @@ class JsI18n {
if (attr == "html") {
this.translateNodeContent(node, k);
} else {
if (node.tagName == "SOLID-DELETE") {
let button = node.querySelector('button');
if (button != null) {
this.translateNodeContent(button, k);
}
}
// https://git.startinblox.com/framework/sib-core/issues/733
if (attr.startsWith('label-')) {
let label = node.querySelector('[name="'+attr.replace("label-", "")+'"] > label');
if(label != null) {
@ -202,4 +197,11 @@ document.addEventListener("DOMContentLoaded", () => {
subtree: true,
childList: true
}));
// 0.15 needed https://git.startinblox.com/framework/sib-core/issues/732
// document.addEventListener('widgetRendered', event => {
// jsI18n.processNode(event.target);
// // Then wait one arbitrary second to re-render the whole document in case a widget re-rendered
// clearTimeout(timer);
// timer = setTimeout(() => jsI18n.processNode(document.querySelector('body')), 500);
// });
});