(node)
| 83 | } |
| 84 | |
| 85 | function processNode(node) { |
| 86 | if (node.nodeType == 3) { |
| 87 | processTextNode(node); |
| 88 | return; |
| 89 | } |
| 90 | |
| 91 | if (node.title) { |
| 92 | let tl = getTranslation(node.title); |
| 93 | if (tl !== undefined) { |
| 94 | node.title = tl; |
| 95 | } |
| 96 | } |
| 97 | |
| 98 | if (node.placeholder) { |
| 99 | let tl = getTranslation(node.placeholder); |
| 100 | if (tl !== undefined) { |
| 101 | node.placeholder = tl; |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | textNodesUnder(node).forEach(function(node) { |
| 106 | processTextNode(node); |
| 107 | }); |
| 108 | } |
| 109 | |
| 110 | function localizeWholePage() { |
| 111 | processNode(gradioApp()); |
no test coverage detected