aboutsummaryrefslogtreecommitdiff
path: root/javascript/hints.js
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2023-05-09 22:42:37 +0300
committerAUTOMATIC <16777216c@gmail.com>2023-05-09 22:42:37 +0300
commitc8791c1d37502f162b8616b066303bfadc4a749b (patch)
tree6843c3505117f26549dfe1dc9cd40aacd5ccdfd3 /javascript/hints.js
parent6fbd85dd0c0dffc06560bff91f4c4b65e441ca5f (diff)
parent31397986e70d20e392d9c3ec70d3aef8ecc2c1ff (diff)
Merge branch 'dev' into release_candidate
Diffstat (limited to 'javascript/hints.js')
-rw-r--r--javascript/hints.js16
1 files changed, 9 insertions, 7 deletions
diff --git a/javascript/hints.js b/javascript/hints.js
index e7d17d36..3746df99 100644
--- a/javascript/hints.js
+++ b/javascript/hints.js
@@ -66,8 +66,8 @@ titles = {
"Interrogate": "Reconstruct prompt from existing image and put it into the prompt field.",
- "Images filename pattern": "Use following tags to define how filenames for images are chosen: [steps], [cfg], [clip_skip], [batch_number], [generation_number], [prompt_hash], [prompt], [prompt_no_styles], [prompt_spaces], [width], [height], [styles], [sampler], [seed], [model_hash], [model_name], [prompt_words], [date], [datetime], [datetime<Format>], [datetime<Format><Time Zone>], [job_timestamp], [hasprompt<prompt1|default><prompt2>..]; leave empty for default.",
- "Directory name pattern": "Use following tags to define how subdirectories for images and grids are chosen: [steps], [cfg], [clip_skip], [batch_number], [generation_number], [prompt_hash], [prompt], [prompt_no_styles], [prompt_spaces], [width], [height], [styles], [sampler], [seed], [model_hash], [model_name], [prompt_words], [date], [datetime], [datetime<Format>], [datetime<Format><Time Zone>], [job_timestamp], [hasprompt<prompt1|default><prompt2>..]; leave empty for default.",
+ "Images filename pattern": "Use following tags to define how filenames for images are chosen: [steps], [cfg], [denoising], [clip_skip], [batch_number], [generation_number], [prompt_hash], [prompt], [prompt_no_styles], [prompt_spaces], [width], [height], [styles], [sampler], [seed], [model_hash], [model_name], [prompt_words], [date], [datetime], [datetime<Format>], [datetime<Format><Time Zone>], [job_timestamp], [hasprompt<prompt1|default><prompt2>..]; leave empty for default.",
+ "Directory name pattern": "Use following tags to define how subdirectories for images and grids are chosen: [steps], [cfg], [denoising], [clip_skip], [batch_number], [generation_number], [prompt_hash], [prompt], [prompt_no_styles], [prompt_spaces], [width], [height], [styles], [sampler], [seed], [model_hash], [model_name], [prompt_words], [date], [datetime], [datetime<Format>], [datetime<Format><Time Zone>], [job_timestamp], [hasprompt<prompt1|default><prompt2>..]; leave empty for default.",
"Max prompt words": "Set the maximum number of words to be used in the [prompt_words] option; ATTENTION: If the words are too long, they may exceed the maximum length of the file path that the system can handle",
"Loopback": "Performs img2img processing multiple times. Output images are used as input for the next loop.",
@@ -118,16 +118,18 @@ titles = {
onUiUpdate(function(){
gradioApp().querySelectorAll('span, button, select, p').forEach(function(span){
- tooltip = titles[span.textContent];
+ if (span.title) return; // already has a title
- if(!tooltip){
- tooltip = titles[span.value];
+ let tooltip = localization[titles[span.textContent]] || titles[span.textContent];
+
+ if(!tooltip){
+ tooltip = localization[titles[span.value]] || titles[span.value];
}
if(!tooltip){
for (const c of span.classList) {
if (c in titles) {
- tooltip = titles[c];
+ tooltip = localization[titles[c]] || titles[c];
break;
}
}
@@ -142,7 +144,7 @@ onUiUpdate(function(){
if (select.onchange != null) return;
select.onchange = function(){
- select.title = titles[select.value] || "";
+ select.title = localization[titles[select.value]] || titles[select.value] || "";
}
})
})