aboutsummaryrefslogtreecommitdiffstats
path: root/javascript/localization.js
diff options
context:
space:
mode:
authorpapuSpartan <30642826+papuSpartan@users.noreply.github.com>2023-05-03 07:21:50 +0000
committerpapuSpartan <30642826+papuSpartan@users.noreply.github.com>2023-05-03 07:21:50 +0000
commitf08ae961157d33051b5cd09ba5c77b779096ef69 (patch)
tree038e0f511d51816c0a971d6093da0420b5677ae0 /javascript/localization.js
parentdff60e2e74964a8b02b75ecd8cf8007ef67a9712 (diff)
parent335428c2c8139dfe07ba096a6defa75036660244 (diff)
downloadstable-diffusion-webui-gfx803-f08ae961157d33051b5cd09ba5c77b779096ef69.tar.gz
stable-diffusion-webui-gfx803-f08ae961157d33051b5cd09ba5c77b779096ef69.tar.bz2
stable-diffusion-webui-gfx803-f08ae961157d33051b5cd09ba5c77b779096ef69.zip
resolve merge conflicts and swap to dev branch for now
Diffstat (limited to 'javascript/localization.js')
-rw-r--r--javascript/localization.js10
1 files changed, 5 insertions, 5 deletions
diff --git a/javascript/localization.js b/javascript/localization.js
index 1a5a1dbb..e1ffa271 100644
--- a/javascript/localization.js
+++ b/javascript/localization.js
@@ -35,11 +35,11 @@ function canBeTranslated(node, text){
if(! text) return false;
if(! node.parentElement) return false;
- parentType = node.parentElement.nodeName
+ var parentType = node.parentElement.nodeName
if(parentType=='SCRIPT' || parentType=='STYLE' || parentType=='TEXTAREA') return false;
if (parentType=='OPTION' || parentType=='SPAN'){
- pnode = node
+ var pnode = node
for(var level=0; level<4; level++){
pnode = pnode.parentElement
if(! pnode) break;
@@ -69,7 +69,7 @@ function getTranslation(text){
}
function processTextNode(node){
- text = node.textContent.trim()
+ var text = node.textContent.trim()
if(! canBeTranslated(node, text)) return
@@ -105,7 +105,7 @@ function processNode(node){
}
function dumpTranslations(){
- dumped = {}
+ var dumped = {}
if (localization.rtl) {
dumped.rtl = true
}
@@ -151,7 +151,7 @@ document.addEventListener("DOMContentLoaded", function() {
})
function download_localization() {
- text = JSON.stringify(dumpTranslations(), null, 4)
+ var text = JSON.stringify(dumpTranslations(), null, 4)
var element = document.createElement('a');
element.setAttribute('href', 'data:text/plain;charset=utf-8,' + encodeURIComponent(text));