fix: use translation for aspect ratios label (#3001)

use javascript code instead of python handling for updates for https://github.com/lllyasviel/Fooocus/pull/2590
This commit is contained in:
Manuel Schmid
2024-05-26 19:23:21 +02:00
committed by GitHub
parent 12dc2396f6
commit de34023c79
3 changed files with 14 additions and 9 deletions
+6
View File
@@ -80,6 +80,12 @@ function refresh_style_localization() {
processNode(document.querySelector('.style_selections'));
}
function refresh_aspect_ratios_label(value) {
label = document.querySelector('#aspect_ratios_accordion div span[data-original-text="Aspect Ratios"]')
translation = getTranslation("Aspect Ratios")
label.textContent = translation + " " + htmlDecode(value)
}
function localizeWholePage() {
processNode(gradioApp());