MCPcopy Create free account
hub / github.com/lllyasviel/Fooocus / processTextNode

Function processTextNode

javascript/localization.js:40–52  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

38}
39
40function processTextNode(node) {
41 var text = node.textContent.trim();
42
43 if (!canBeTranslated(node, text)) return;
44
45 var tl = getTranslation(text);
46 if (tl !== undefined) {
47 node.textContent = tl;
48 if (text && node.parentElement) {
49 node.parentElement.setAttribute("data-original-text", text);
50 }
51 }
52}
53
54function processNode(node) {
55 if (node.nodeType == 3) {

Callers 1

processNodeFunction · 0.85

Calls 2

canBeTranslatedFunction · 0.85
getTranslationFunction · 0.85

Tested by

no test coverage detected