MCPcopy Create free account
hub / github.com/DenOfEquity/ersatzForge / processTextNode

Function processTextNode

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

Source from the content-addressed store, hash-verified

72}
73
74function processTextNode(node) {
75 var text = node.textContent.trim();
76
77 if (!canBeTranslated(node, text)) return;
78
79 var tl = getTranslation(text);
80 if (tl !== undefined) {
81 node.textContent = tl;
82 }
83}
84
85function processNode(node) {
86 if (node.nodeType == 3) {

Callers 1

processNodeFunction · 0.85

Calls 2

canBeTranslatedFunction · 0.85
getTranslationFunction · 0.85

Tested by

no test coverage detected