Comfy-Org / Comfy-Org/ComfyUI_frontend

i18n: src/lib/litegraph/ has 50+ hardcoded English strings (context menus, dialogs, error messages)

Open
#12,265 0 comments 0 reactions 0 assignees View on GitHub
area:i18n
Dominant language
TypeScript
Stars
2k
Forks
704
Avg merge
1d 8h
Merged PRs (30d)
512

Description

`src/lib/litegraph/` contains 50+ hardcoded English strings across context menus, property panels, dialogs, error messages, and enums. None use i18n.

### LGraphCanvas.ts — Canvas Context Menus

**Canvas menu:** "Add Node", "Add Group", "Paste", "Convert to Subgraph", "Align"

**Node context menu:** "Properties", "Properties Panel", "Title", "Mode", "Resize", "Expand"/"Collapse", "Show Advanced"/"Hide Advanced", "Pin"/"Unpin", "Colors", "Shapes", "Clone", "Align Selected To", "Distribute Nodes", "Remove"

**Slot context menu:** "Disconnect Links", "Rename Slot", "Cannot remove" (disabled), "Remove Slot" (danger), "Action" (LiteGraph.ACTION display), "Event" (LiteGraph.EVENT display)

**Reroute/Group:** "Delete Reroute", "Edit Group"

### LGraphCanvas.ts — Dialogs/Panels

- Property editor: "OK"
- Search box: "Search"
- Node properties panel: "Properties", "Title", "Mode", "Color", "Delete"
- Code pad: "Assign", "Close"
- Rename slot: "Name", "OK"

### LGraphNode.ts

- `"? {this.type}"` fallback title, "??" pinned indicator
- "Connect: Error, no slot of name", "Invalid slot", "Target Node not found" (console.error / Error)

### LGraphGroup.ts

- "Group" (default title), "Unpin"/"Pin", "Title", "Color", "Font size", "Remove"

### LGraph.ts

- "New Subgraph" (default name)
- "Cannot convert to subgraph: nothing to convert"
- "Can only unpack Subgraph Nodes", "Missing Node"
- "Failed to create link", "Missing Parent ID"

### LiteGraphGlobal.ts

- NODE_MODES: ["Always", "On Event", "Never", "On Trigger"]
- LINK_RENDER_MODES: ["Straight", "Linear", "Spline"]

### widgets/TextWidget.ts + NumberWidget.ts

- "Value" (prompt dialog title when clicking widget center)

### Suggested Fix

The most impactful fix: migrate context menu items, dialog button labels, property panel labels, and mode enums to i18n. These are UI elements users interact with daily.

Contributor guide

Open the contributing guide

Research direction

Start by reviewing the listed strings in src/lib/litegraph/LGraphCanvas.ts, LGraphNode.ts, LGraphGroup.ts, LGraph.ts, LiteGraphGlobal.ts, and widgets/TextWidget.ts and NumberWidget.ts. Identify the project's i18n integration point, migrate the named menus, dialogs, errors, defaults, and enum labels, and verify that all listed user-facing strings can be translated without changing their behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend, internationalization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.