AIGODLIKE / AIGODLIKE-ComfyUI-Translation

A plugin for multilingual translation of ComfyUI,This plugin implements translation of resident menu bar/search bar/right-click context menu/node, etc
https://www.aigodlike.com/
1.32k stars 113 forks source link

Node title and slots are always reset. #214

Open rgthree opened 4 months ago

rgthree commented 4 months ago

Hello. Recently, rgthree-comfy made a change which allows other so other extensions' onNodeCreated to run for all of the rgthree-comfy nodes. Before this, some rgthree-comfy nodes did not call out to this method.

In doing so, there was with AIGODLIKE-ComfyUI-Translation which is now fixed from the rgthree-comfy side. However, in diagnosing, I noticed that node titles were overridden and slot names were always set, even when they were not previously.

Most notably "Reroute (rgthree)" nodes are now being fed into AIGODLIKE-ComfyUI-Translation's onNodeCreated which were not before and I now notice that reroutes have a floating label; presumably because this extension is setting the label when it was purposefully set to an empty string before. I'll leave it up to this extension on how you'd like to handle it; either skipping reroute nodes, or skipping nodes that are small sizes, or just not overwriting labels that are already not using the default.

(Also, I noticed custom node titles I had set were always overridden. Not sure if that was the intention here, but I wasn't expecting that).

Thanks

KarryCharon commented 4 months ago

@rgthree The name field of node is used for translating the node name in display(caz label field do nothing for node). And both in/out sockets and widgets label fields are used for translating respective. That's why the node name always be set if AIGODLIKE-ComfyUI-Translation is enabled.

K-O-N-B commented 1 month ago

is this problem can be fix pls?

KarryCharon commented 1 month ago

is this problem can be fix pls?

We've submitted a pr to fix node panel display: https://github.com/comfyanonymous/ComfyUI/pull/4112 For the node sockets both inputs and outputs we only change the label field for translation not the name.