Skip to content

Commit ed949a6

Browse files
committed
fix changing language on the fly
also delete a few borked translations from chinese file
1 parent 758f165 commit ed949a6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

languages/zh.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@
127127
"How many images to generate at once.": "一次生成多少个图像。",
128128
"How many minutes to wait after the last generation before automatically freeing up VRAM (to prevent issues with other programs).\nThis has the downside of a small added bit of time to load back onto VRAM at next usage.\nUse a decimal number to free after seconds.\nDefaults to 10 minutes.": "在上一代后等待多久才会自动释放 VRAM(以防止与其他程序发生问题 ) 。\n这有一个缺点,即在下次使用时需要稍微多一点时间才能重新加载到 VRAM。\n使用小数点后的数字来表示秒数。\n默认值为 10 分钟。",
129129
"How many minutes to wait after the last generation before automatically freeing up system RAM (to prevent issues with other programs).\nThis has the downside of causing models to fully load from data drive at next usage.\nUse a decimal number to free after seconds.\nDefaults to 60 minutes (one hour).": "在上一代后等待多久才会自动释放系统内存(以防止其他程序出现问题 ) 。\n这种方法的缺点是,在下次使用时会导致模型从数据驱动器完全加载。\n使用小数点后的数字来表示秒数。\n默认值为 60 分钟(一个小时 ) 。",
130-
"How many steps to use for the video model.\nHigher step counts yield better quality, but much longer generation time.\n20 is a good baseline.": "the video model to be generated, you can use 10, 20 or 30 steps. The number of steps is dependent on the quality of the video model and the number of pixels in the image. A step count of 10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 120, 150, 180, 190, 200, 250, 200, 300, 350, 400, 500, 600, 700, 1000, 1000, 1500, 2000, 2500, 3000, 3500, 4000, 5000, 5000, 6000, 7000, 8000, 10000, 10000, 10000, 2000, 3000, 10000, 15000, 10000, 10000, 15000, 10000, 10000, 10000, 20000, 10000, 10000, 15000, 10000, 10000 or 20000, 10000, 10000, 10000, 10020, 1020, 12020, 15020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 2020, 15020, 2020, 2020, 2020, 2020,",
130+
"How many steps to use for the video model.\nHigher step counts yield better quality, but much longer generation time.\n20 is a good baseline.": "",
131131
"How many times to retry initializing a backend before giving up. Default is 3.": "放弃前重试初始化后端的次数。 默认值为3.",
132132
"How many times to run the model.\nMore steps = better quality, but more time.\n20 is a good baseline for speed, 40 is good for maximizing quality.\nYou can go much higher, but it quickly becomes pointless above 70 or so.": "运行模型的次数。\n更多的步骤=更好的质量,但需要更多的时间。\n20是速度的良好基线,40是最大化质量的良好基线。\n你可以去更高, 但它很快就变得毫无意义的超过 70 或如此.",
133133
"How much noise to add to the init image.\nHigher values yield more motion.": "",
@@ -205,7 +205,7 @@
205205
"MaxT2ISimultaneous": "最大T2I同步",
206206
"MaxTimeoutMinutes": "最大超时分钟数",
207207
"Maximum sigma value for the sampler.\nOnly applies to Karras/Exponential schedulers.": "",
208-
"Merges the init image towards the latent norm.\nThis essentially lets you boost 'init image creativity' past 1.0.\nSet to 0 to disable.": ".0.1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0",
208+
"Merges the init image towards the latent norm.\nThis essentially lets you boost 'init image creativity' past 1.0.\nSet to 0 to disable.": "",
209209
"Metadata Reset": "元数据重置",
210210
"Minimum sigma value for the sampler.\nOnly applies to Karras/Exponential schedulers.": "",
211211
"Missing Preview Preset": "缺少预览预设",

src/wwwroot/js/translator.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ function applyTranslations() {
4343
getRequiredElementById('language_dropdown_link').innerHTML = `<img class="translate-img" src="imgs/flags/${language_data.code}.jpg" /> ${escapeHtml(language_data.local_name)}`;
4444
for (let elem of document.querySelectorAll(".translate")) {
4545
if (elem.title) {
46-
let translated = translate(elem.title);
46+
let translated = translate(elem.dataset.pretranslated_title || elem.title);
4747
if (translated == elem.title) {
4848
continue;
4949
}
@@ -53,7 +53,7 @@ function applyTranslations() {
5353
elem.title = translated;
5454
}
5555
if (elem.placeholder) {
56-
let translated = translate(elem.placeholder);
56+
let translated = translate(elem.dataset.pretranslated_placeholder || elem.placeholder);
5757
if (translated == elem.placeholder) {
5858
continue;
5959
}
@@ -64,7 +64,7 @@ function applyTranslations() {
6464
continue; // placeholdered elements are text inputs, ie don't replace content
6565
}
6666
if (elem.textContent) {
67-
let translated = translate(elem.textContent);
67+
let translated = translate(elem.dataset.pretranslated || elem.textContent);
6868
if (translated == elem.textContent) {
6969
continue;
7070
}

0 commit comments

Comments
 (0)