mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-25 16:59:45 +00:00
[i18n] Translate widget label (#1883)
* [i18n] Translate widget label * Update locales [skip ci] --------- Co-authored-by: github-actions <github-actions@github.com>
This commit is contained in:
@@ -10,5 +10,5 @@ module.exports = defineConfig({
|
|||||||
entryLocale: 'en',
|
entryLocale: 'en',
|
||||||
output: 'src/locales',
|
output: 'src/locales',
|
||||||
outputLocales: ['zh', 'ru', 'ja', 'ko'],
|
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`
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -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": {
|
"MaskComposite": {
|
||||||
"display_name": "MaskComposite",
|
"display_name": "MaskComposite",
|
||||||
"inputs": {
|
"inputs": {
|
||||||
|
|||||||
@@ -1795,7 +1795,7 @@
|
|||||||
"display_name": "Kサンプラー",
|
"display_name": "Kサンプラー",
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"cfg": {
|
"cfg": {
|
||||||
"name": "設定",
|
"name": "cfg",
|
||||||
"tooltip": "Classifier-Free Guidanceスケールは、創造性とプロンプトへの遵守のバランスを取ります。値が高いほど、生成される画像はプロンプトにより近くなりますが、値が高すぎると品質に悪影響を及ぼす可能性があります。"
|
"tooltip": "Classifier-Free Guidanceスケールは、創造性とプロンプトへの遵守のバランスを取ります。値が高いほど、生成される画像はプロンプトにより近くなりますが、値が高すぎると品質に悪影響を及ぼす可能性があります。"
|
||||||
},
|
},
|
||||||
"denoise": {
|
"denoise": {
|
||||||
@@ -1848,7 +1848,7 @@
|
|||||||
"name": "ノイズ追加"
|
"name": "ノイズ追加"
|
||||||
},
|
},
|
||||||
"cfg": {
|
"cfg": {
|
||||||
"name": "設定"
|
"name": "cfg"
|
||||||
},
|
},
|
||||||
"end_at_step": {
|
"end_at_step": {
|
||||||
"name": "ステップ終了"
|
"name": "ステップ終了"
|
||||||
|
|||||||
@@ -1795,7 +1795,7 @@
|
|||||||
"display_name": "KSampler",
|
"display_name": "KSampler",
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"cfg": {
|
"cfg": {
|
||||||
"name": "конфиг",
|
"name": "cfg",
|
||||||
"tooltip": "Масштаб без классификатора балансирует креативность и соблюдение запроса. Более высокие значения приводят к изображениям, более точно соответствующим запросу, однако слишком высокие значения негативно скажутся на качестве."
|
"tooltip": "Масштаб без классификатора балансирует креативность и соблюдение запроса. Более высокие значения приводят к изображениям, более точно соответствующим запросу, однако слишком высокие значения негативно скажутся на качестве."
|
||||||
},
|
},
|
||||||
"denoise": {
|
"denoise": {
|
||||||
@@ -1848,7 +1848,7 @@
|
|||||||
"name": "добавить_шум"
|
"name": "добавить_шум"
|
||||||
},
|
},
|
||||||
"cfg": {
|
"cfg": {
|
||||||
"name": "конфиг"
|
"name": "cfg"
|
||||||
},
|
},
|
||||||
"end_at_step": {
|
"end_at_step": {
|
||||||
"name": "закончить_на_шаге"
|
"name": "закончить_на_шаге"
|
||||||
|
|||||||
@@ -79,7 +79,7 @@
|
|||||||
"display_name": "CFG引导器",
|
"display_name": "CFG引导器",
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"cfg": {
|
"cfg": {
|
||||||
"name": "配置"
|
"name": "cfg"
|
||||||
},
|
},
|
||||||
"model": {
|
"model": {
|
||||||
"name": "模型"
|
"name": "模型"
|
||||||
@@ -1795,7 +1795,7 @@
|
|||||||
"display_name": "K采样器",
|
"display_name": "K采样器",
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"cfg": {
|
"cfg": {
|
||||||
"name": "配置",
|
"name": "cfg",
|
||||||
"tooltip": "无分类器引导比例平衡创造力和对提示的遵循。更高的值会导致图像更接近提示,但过高的值会对质量产生负面影响。"
|
"tooltip": "无分类器引导比例平衡创造力和对提示的遵循。更高的值会导致图像更接近提示,但过高的值会对质量产生负面影响。"
|
||||||
},
|
},
|
||||||
"denoise": {
|
"denoise": {
|
||||||
@@ -1848,7 +1848,7 @@
|
|||||||
"name": "添加噪声"
|
"name": "添加噪声"
|
||||||
},
|
},
|
||||||
"cfg": {
|
"cfg": {
|
||||||
"name": "配置"
|
"name": "cfg"
|
||||||
},
|
},
|
||||||
"end_at_step": {
|
"end_at_step": {
|
||||||
"name": "结束步骤"
|
"name": "结束步骤"
|
||||||
@@ -3948,7 +3948,7 @@
|
|||||||
"display_name": "PerpNeg引导器",
|
"display_name": "PerpNeg引导器",
|
||||||
"inputs": {
|
"inputs": {
|
||||||
"cfg": {
|
"cfg": {
|
||||||
"name": "配置"
|
"name": "cfg"
|
||||||
},
|
},
|
||||||
"empty_conditioning": {
|
"empty_conditioning": {
|
||||||
"name": "空条件"
|
"name": "空条件"
|
||||||
@@ -4252,7 +4252,7 @@
|
|||||||
"name": "添加噪声"
|
"name": "添加噪声"
|
||||||
},
|
},
|
||||||
"cfg": {
|
"cfg": {
|
||||||
"name": "配置"
|
"name": "cfg"
|
||||||
},
|
},
|
||||||
"latent_image": {
|
"latent_image": {
|
||||||
"name": "潜在图像"
|
"name": "潜在图像"
|
||||||
|
|||||||
@@ -1914,6 +1914,7 @@ export class ComfyApp {
|
|||||||
const type = _inputData[0]
|
const type = _inputData[0]
|
||||||
const options = _inputData[1] ?? {}
|
const options = _inputData[1] ?? {}
|
||||||
const inputData = [type, options]
|
const inputData = [type, options]
|
||||||
|
const nameKey = `nodeDefs.${normalizeI18nKey(nodeData.name)}.inputs.${normalizeI18nKey(inputName)}.name`
|
||||||
|
|
||||||
const inputIsRequired = requiredInputs && inputName in requiredInputs
|
const inputIsRequired = requiredInputs && inputName in requiredInputs
|
||||||
|
|
||||||
@@ -1931,6 +1932,9 @@ export class ComfyApp {
|
|||||||
self.widgets[widgetType](this, inputName, inputData, app) || {}
|
self.widgets[widgetType](this, inputName, inputData, app) || {}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
if (config.widget) {
|
||||||
|
config.widget.label = st(nameKey, inputName)
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
// Node connection inputs
|
// Node connection inputs
|
||||||
const shapeOptions = inputIsRequired
|
const shapeOptions = inputIsRequired
|
||||||
@@ -1938,10 +1942,7 @@ export class ComfyApp {
|
|||||||
: { shape: LiteGraph.SlotShape.HollowCircle }
|
: { shape: LiteGraph.SlotShape.HollowCircle }
|
||||||
const inputOptions = {
|
const inputOptions = {
|
||||||
...shapeOptions,
|
...shapeOptions,
|
||||||
label: st(
|
label: st(nameKey, inputName)
|
||||||
`nodeDefs.${normalizeI18nKey(nodeData.name)}.inputs.${normalizeI18nKey(inputName)}.name`,
|
|
||||||
inputName
|
|
||||||
)
|
|
||||||
}
|
}
|
||||||
this.addInput(inputName, type, inputOptions)
|
this.addInput(inputName, type, inputOptions)
|
||||||
widgetCreated = false
|
widgetCreated = false
|
||||||
|
|||||||
Reference in New Issue
Block a user