diff --git a/.i18nrc.cjs b/.i18nrc.cjs index fb5cd0be2..308c08b45 100644 --- a/.i18nrc.cjs +++ b/.i18nrc.cjs @@ -10,5 +10,5 @@ module.exports = defineConfig({ entryLocale: 'en', output: 'src/locales', outputLocales: ['zh', 'ru', 'ja', 'ko'], - reference: `Special names to keep untranslated: flux, photomaker, clip, vae` + reference: `Special names to keep untranslated: flux, photomaker, clip, vae, cfg` }); diff --git a/src/locales/en/nodeDefs.json b/src/locales/en/nodeDefs.json index e47758c97..532e8ec86 100644 --- a/src/locales/en/nodeDefs.json +++ b/src/locales/en/nodeDefs.json @@ -2395,6 +2395,20 @@ } } }, + "Mahiro": { + "display_name": "Mahiro is so cute that she deserves a better guidance function!! (。・ω・。)", + "description": "Modify the guidance to scale more on the 'direction' of the positive prompt rather than the difference between the negative prompt.", + "inputs": { + "model": { + "name": "model" + } + }, + "outputs": { + "0": { + "name": "patched_model" + } + } + }, "MaskComposite": { "display_name": "MaskComposite", "inputs": { diff --git a/src/locales/ja/nodeDefs.json b/src/locales/ja/nodeDefs.json index 3b75cc5a8..e376c9fe0 100644 --- a/src/locales/ja/nodeDefs.json +++ b/src/locales/ja/nodeDefs.json @@ -1795,7 +1795,7 @@ "display_name": "Kサンプラー", "inputs": { "cfg": { - "name": "設定", + "name": "cfg", "tooltip": "Classifier-Free Guidanceスケールは、創造性とプロンプトへの遵守のバランスを取ります。値が高いほど、生成される画像はプロンプトにより近くなりますが、値が高すぎると品質に悪影響を及ぼす可能性があります。" }, "denoise": { @@ -1848,7 +1848,7 @@ "name": "ノイズ追加" }, "cfg": { - "name": "設定" + "name": "cfg" }, "end_at_step": { "name": "ステップ終了" diff --git a/src/locales/ru/nodeDefs.json b/src/locales/ru/nodeDefs.json index 23124b17c..3996c142a 100644 --- a/src/locales/ru/nodeDefs.json +++ b/src/locales/ru/nodeDefs.json @@ -1795,7 +1795,7 @@ "display_name": "KSampler", "inputs": { "cfg": { - "name": "конфиг", + "name": "cfg", "tooltip": "Масштаб без классификатора балансирует креативность и соблюдение запроса. Более высокие значения приводят к изображениям, более точно соответствующим запросу, однако слишком высокие значения негативно скажутся на качестве." }, "denoise": { @@ -1848,7 +1848,7 @@ "name": "добавить_шум" }, "cfg": { - "name": "конфиг" + "name": "cfg" }, "end_at_step": { "name": "закончить_на_шаге" diff --git a/src/locales/zh/nodeDefs.json b/src/locales/zh/nodeDefs.json index bfcbc8279..b62e699ee 100644 --- a/src/locales/zh/nodeDefs.json +++ b/src/locales/zh/nodeDefs.json @@ -79,7 +79,7 @@ "display_name": "CFG引导器", "inputs": { "cfg": { - "name": "配置" + "name": "cfg" }, "model": { "name": "模型" @@ -1795,7 +1795,7 @@ "display_name": "K采样器", "inputs": { "cfg": { - "name": "配置", + "name": "cfg", "tooltip": "无分类器引导比例平衡创造力和对提示的遵循。更高的值会导致图像更接近提示,但过高的值会对质量产生负面影响。" }, "denoise": { @@ -1848,7 +1848,7 @@ "name": "添加噪声" }, "cfg": { - "name": "配置" + "name": "cfg" }, "end_at_step": { "name": "结束步骤" @@ -3948,7 +3948,7 @@ "display_name": "PerpNeg引导器", "inputs": { "cfg": { - "name": "配置" + "name": "cfg" }, "empty_conditioning": { "name": "空条件" @@ -4252,7 +4252,7 @@ "name": "添加噪声" }, "cfg": { - "name": "配置" + "name": "cfg" }, "latent_image": { "name": "潜在图像" diff --git a/src/scripts/app.ts b/src/scripts/app.ts index 076582b32..098e57cb4 100644 --- a/src/scripts/app.ts +++ b/src/scripts/app.ts @@ -1914,6 +1914,7 @@ export class ComfyApp { const type = _inputData[0] const options = _inputData[1] ?? {} const inputData = [type, options] + const nameKey = `nodeDefs.${normalizeI18nKey(nodeData.name)}.inputs.${normalizeI18nKey(inputName)}.name` const inputIsRequired = requiredInputs && inputName in requiredInputs @@ -1931,6 +1932,9 @@ export class ComfyApp { self.widgets[widgetType](this, inputName, inputData, app) || {} ) } + if (config.widget) { + config.widget.label = st(nameKey, inputName) + } } else { // Node connection inputs const shapeOptions = inputIsRequired @@ -1938,10 +1942,7 @@ export class ComfyApp { : { shape: LiteGraph.SlotShape.HollowCircle } const inputOptions = { ...shapeOptions, - label: st( - `nodeDefs.${normalizeI18nKey(nodeData.name)}.inputs.${normalizeI18nKey(inputName)}.name`, - inputName - ) + label: st(nameKey, inputName) } this.addInput(inputName, type, inputOptions) widgetCreated = false