Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
S
Stable Diffusion Webui
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
novelai-storage
Stable Diffusion Webui
Commits
0d90064e
Commit
0d90064e
authored
Aug 22, 2023
by
AUTOMATIC1111
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eslint
parent
9158d0fd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
18 deletions
+13
-18
javascript/localization.js
javascript/localization.js
+10
-15
javascript/progressbar.js
javascript/progressbar.js
+3
-3
No files found.
javascript/localization.js
View file @
0d90064e
...
...
@@ -107,33 +107,28 @@ function processNode(node) {
});
}
function
localizeWholePage
(){
function
localizeWholePage
()
{
processNode
(
gradioApp
());
function
elem
(
comp
)
{
if
(
comp
.
props
.
elem_id
)
{
elem_id
=
comp
.
props
.
elem_id
;
}
else
{
elem_id
=
"
component-
"
+
comp
.
id
;
}
var
elem_id
=
comp
.
props
.
elem_id
?
comp
.
props
.
elem_id
:
"
component-
"
+
comp
.
id
;
return
gradioApp
().
getElementById
(
elem_id
);
}
for
(
comp
of
window
.
gradio_config
.
components
)
{
if
(
comp
.
props
.
webui_tooltip
)
{
var
e
=
elem
(
comp
);
for
(
var
comp
of
window
.
gradio_config
.
components
)
{
if
(
comp
.
props
.
webui_tooltip
)
{
let
e
=
elem
(
comp
);
var
tl
=
e
?
getTranslation
(
e
.
title
)
:
undefined
;
let
tl
=
e
?
getTranslation
(
e
.
title
)
:
undefined
;
if
(
tl
!==
undefined
)
{
e
.
title
=
tl
;
}
}
if
(
comp
.
props
.
placeholder
)
{
var
e
=
elem
(
comp
);
var
textbox
=
e
?
e
.
querySelector
(
'
[placeholder]
'
)
:
null
;
if
(
comp
.
props
.
placeholder
)
{
let
e
=
elem
(
comp
);
let
textbox
=
e
?
e
.
querySelector
(
'
[placeholder]
'
)
:
null
;
var
tl
=
textbox
?
getTranslation
(
textbox
.
placeholder
)
:
undefined
;
let
tl
=
textbox
?
getTranslation
(
textbox
.
placeholder
)
:
undefined
;
if
(
tl
!==
undefined
)
{
textbox
.
placeholder
=
tl
;
}
...
...
javascript/progressbar.js
View file @
0d90064e
...
...
@@ -82,7 +82,7 @@ function requestProgress(id_task, progressbarContainer, gallery, atEnd, onProgre
var
livePreview
=
null
;
var
removeProgressBar
=
function
()
{
if
(
!
divProgress
)
return
;
if
(
!
divProgress
)
return
;
setTitle
(
""
);
parentProgressbar
.
removeChild
(
divProgress
);
...
...
@@ -153,7 +153,7 @@ function requestProgress(id_task, progressbarContainer, gallery, atEnd, onProgre
var
img
=
new
Image
();
img
.
onload
=
function
()
{
if
(
!
livePreview
)
{
if
(
!
livePreview
)
{
livePreview
=
document
.
createElement
(
'
div
'
);
livePreview
.
className
=
'
livePreview
'
;
gallery
.
insertBefore
(
livePreview
,
gallery
.
firstElementChild
);
...
...
@@ -177,7 +177,7 @@ function requestProgress(id_task, progressbarContainer, gallery, atEnd, onProgre
funProgress
(
id_task
,
0
);
if
(
gallery
)
{
if
(
gallery
)
{
funLivePreview
(
id_task
,
0
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment