Comfy-Org / Comfy-Org/ComfyUI_frontend

i18n: type-named outputs skip slot-level translations in addOutputs

Open
#15,347 2 comments 1 reaction 1 assignee Claimed by @benceruleanlu View on GitHub
area:i18n
Dominant language
TypeScript
Stars
2k
Forks
699
Avg merge
1d 7h
Merged PRs (30d)
490

Description

`addOutputs` in `src/services/litegraphService.ts` picks between two different
resolvers depending on whether the output's name equals its type:

```ts
localized_name:
type !== name
? resolveNodeDefSlotText('name', nodeDefName(node), output.index, name)
: st(typeKey, name)
```

When they match — a `FLOAT` output named `FLOAT` — the slot resolver is skipped
entirely and the value comes from `dataTypes.`. A node that has a
slot-level `outputs..name` entry in the bundled snapshot or a custom-node
`/api/i18n` translation gets that translation silently ignored, and the live
backend value is never consulted either.

This is pre-existing behaviour that https://github.com/Comfy-Org/ComfyUI_frontend/pull/14797
deliberately left alone: flipping the precedence would change the rendered label
for every output whose name matches its type across the whole generated
snapshot, which is far wider than that PR's scope.

Likely correct shape is to try the slot resolver first and fall back to the type
translation only when nothing supplies slot text, but that needs a survey of how
many outputs in `src/locales/*/nodeDefs.json` actually carry slot names for
type-named outputs before it is safe to change.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.