mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-23 16:24:06 +00:00
[i18n] Fix node output label translation (#1871)
This commit is contained in:
@@ -1979,9 +1979,14 @@ export class ComfyApp {
|
||||
const typeKey = `dataTypes.${normalizeI18nKey(output)}`
|
||||
const outputOptions = {
|
||||
...shapeOptions,
|
||||
label: nodeData['output_name'][o]
|
||||
? st(nameKey, outputName)
|
||||
: st(typeKey, outputName)
|
||||
// If the output name is different from the output type, use the output name.
|
||||
// e.g.
|
||||
// - type ("INT"); name ("Positive") => translate name
|
||||
// - type ("FLOAT"); name ("FLOAT") => translate type
|
||||
label:
|
||||
output !== outputName
|
||||
? st(nameKey, outputName)
|
||||
: st(typeKey, outputName)
|
||||
}
|
||||
this.addOutput(outputName, output, outputOptions)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user